/* glaring title */
.intro-content {
    width: 90%;
    margin: 10%;
    text-align: center;
    font-size: 40px;
}

.glow-box {
  display: inline-block;
  padding: 5px 10px;
  border: 2px solid transparent;
  border-radius: 12px;
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: white;
  overflow: hidden;
  
  /* Base glow look */
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Border glare animation */
.glow-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 2px solid white;
  filter: blur(3px);
  opacity: 0.8;
}

/* Text glare animation (mask effect) */
.title-text {
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, 0.2),
    white,
    rgba(255, 255, 255, 0.2)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGlare 3s linear infinite;
}

@keyframes textGlare {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: 0% center;
  }
}

/* scorebox */
.mb20 {
    margin-bottom: 20px;
}

/* tsv related */
.file-label {
  padding: 8px 16px;
  background-color: #f3f3f3;
  color: #000000;
  border-radius: 8px;
  cursor: pointer;
  margin-top: .5rem;
}

.file-label:hover {
  background-color: #ffefcfff;
}

.tsv-text {
  font-size:12px;
  color:#888;
  font-weight: bold;
}

/* buttons */
.active-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #060606;
    color: rgb(249, 208, 2);
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #373737;
    border-radius: 4px;
}

.file-loaded {
  background-color: #036a00;
}

.mode-route {
  cursor: pointer;
}

.logo-image {
    width: 36px;
    height: 36px;
    cursor: pointer;
}
.logo-image:hover {
    transform: scale(1.05);
}

.dark-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #282828;
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

.dark-button:hover {
    background-color: rgb(4, 4, 15);
}

.mobile-header-stack {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 900;
}

/* Container for the vertical stack */
.team-navigation-container.bql-team-boxes {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    width: 100%;
    padding: 10px 0; 
}

/* Sequence Prefix at the top of the stack */
.team-navigation-container .sequence-prefix {
    color: #f5cf48;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* The Team Boxes */
.team-navigation-container .team-tag {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 15px; 
    border-radius: 8px;
    border: 2px solid #333;
    background-color: #121212;
    color: #dadada; 
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box;
    word-break: break-word;
    transition: all 0.2s ease;
}

/* Active Team Box */
.team-navigation-container .team-tag.active-team-tag {
    background-color: #ff7a00;
    color: #ffffff;
    border-color: #ff7a00; 
    font-weight: bold; 
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.4);
}

/* The Down Arrow */
.team-navigation-container .down-arrow {
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    margin: 2px 0;
}


.top-left,
.top-center,
.top-right {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-left {
  justify-content: flex-start;
  flex: 1;
}

.top-center {
  justify-content: center;
  flex: 1;
}

.top-right {
  justify-content: flex-end;
  flex: 1;
}


#extra-q {
    font-size: 20px;
    font-weight: bold;
    color: white;
    background-color: black;
    display: inline-block;
    padding: 10px;
}

.top-timer {
    padding-right: 10px;
    font-weight: bold;
}

.highlight-sweep {
    display: inline-block;
    background: linear-gradient(120deg, rgb(38 197 0) 20%, rgb(151 255 0) 40%, rgb(38 197 0) 60%);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sweep 4s linear infinite;
}

.musketeer-indicator {
    display: inline-block;
    background: linear-gradient(120deg, #ffa500 20%, #fff 30%, #ffa500 50%);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sweep 4s linear infinite;
}

.musketeer-text {
    font-size: 12px;
    border: 2px solid #424242;
    border-radius: 6px;
    padding: 2px 4px;
    margin-left: 10px;
    font-style: oblique;
}

.progress-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.ml-10 {
    margin-left: 10px;
}

.main-content {
    margin-top: 50px;
    margin-bottom: 30px;
}

/* Topic Section */
.topic-section {
  width: 100%;
  padding: 12px 20px;
  color: white;
  font-weight: bold;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;

  background: #4343434d;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.topic-name {
  flex: 1;
}

#q_count {
    color: #ffffff21;
}

.topic-icon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  color: white;
  transition: color 0.2s ease;
  font-size: 18px;
}

.topic-icon.red {
  color: red;
}

/* Question & Answer Box */
.white-box {
  background-color: #00000087;
  color: #ffffff;
  border-radius: 0 0 10px 10px;
  width: 100%;
  height: auto;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.question-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
}

.question-content img,
.question-content video {
  max-height: 300px;
  max-width: 400px;
  height: auto;
  width: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(1px);
  z-index: 999;
  display: none;
}

.zoomed-in {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2);
  z-index: 1000;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  width: auto;
  height: auto;
  cursor: zoom-out;
}

.question-text {
  flex: 1;
  font-size: 20px;
}

.media-content img,
.media-content video {
    max-width: 300px;
    max-height: 300px;
}

.shrinked-view {
  font-size: 12px;
  transition: font-size 0.5s ease;
}

.shrinked-view img,
.shrinked-view video {
  max-width: 100px;
  max-height: 150px;
}

.shrinked-view audio {
  width: 80%;
  max-width: 300px;
  height: 40px;
  margin-top: 5px;
  border-radius: 20px;
}

.dim {
  opacity: 0.3;
}

.bonus-order-wrapper {
    text-align: center;
    font-size: 20px;
    width: 50%;
}

/* =========================================
   MAIN LAYOUT — KEY FIX
   Page scrolls naturally. Scorecard is
   sticky. Question column flows freely.
========================================= */

.mimir-layout-container {
    display: flex;
    gap: 30px;
    width: 100%;
    height: calc(100vh - 80px);
    margin-top: 80px;
    padding: 0 20px 70px;
    overflow: hidden;          /* prevent page scrolling */
    box-sizing: border-box;
}

.mimir-layout-container.completed-game{
    justify-content: center;
}

.mimir-layout-container.completed-game .question-column{
    display:none;
}

.mimir-layout-container.completed-game .scorecard-column{
    flex:none;
    width:700px;
    max-width:100%;
}

/* =========================================
   SCORECARD COLUMN — Sticky, non-scrollable
========================================= */

.scorecard-column {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    min-width: 320px;
    height: calc(100vh - 100px);
    overflow-y: auto;

    display: flex;
    flex-direction: column;
    gap: 20px;

    /* Hide scrollbar */
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* IE & Edge */
}

.scorecard-column::-webkit-scrollbar {
    display: none;              /* Chrome, Safari */
}

/* Unified Scorecard Box */
.scorecard-box {
    background-color: #1c1c1c;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    width: 100%;
    box-sizing: border-box;
    /* flex: 1; */
}

/* Bonus Order Box */
.bonus-order-wrapper {
    background-color: #1c1c1c;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    width: 100%;
    box-sizing: border-box;
    padding: 15px 20px;
    text-align: center;
    font-size: 16px;
    color: #e5e5e5;
    margin-top: 0;
}

/* =========================================
   QUESTION COLUMN — Scrolls with the page
========================================= */

.question-column {
    flex: 1;
    height: calc(100vh - 100px);
    overflow-y: auto;

    scrollbar-width: none;
    -ms-overflow-style: none;
}

.question-column::-webkit-scrollbar {
    display: none;
}

/* Base table styling */
.points-table-score {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 14px;
    margin-top: 0px !important;
    background-color: transparent;
    border: none !important;
}

/* Header and Data cells */
.points-table-score th, 
.points-table-score td {
    padding: 12px 10px;
    border-bottom: 1px solid #2a2a2a;
    color: #e5e5e5;
}
.points-table-score thead {
    background: #000;
}

/* Headers */
.points-table-score th {
    color: #999;
    font-weight: 600;
    font-size: 12px;
    background-color: transparent;
    text-transform: uppercase;
}

/* Active row */
.points-table-score tr.active-row {
    border-left: 3px solid #ffcc00;
    background-color: rgba(255, 204, 0, 0.05);
}

.points-table-score tr.active-row td {
    color: #fff;
}
.points-table-score tr.active-row td:nth-child(2) {
    color: #ffcc00;
    font-weight: bold;
}

.changePlayerName {
    cursor: pointer;
    font-weight: 500;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word; 
    line-height: 1.3;
}
.changePlayerName:hover {
    color: #ffcc00;
}

/* Fix top margin on table */
.points-table-score {
    margin-top: 0px !important;
    width: 100%;
    font-size: 16px;
}

/* Center the action buttons */
.mimir-layout-container .button-container {
    margin-top: 20px;
    text-align: center;
    width: 100%;
}

/* Ensure question boxes take full width */
.topic-section, 
.white-box {
    width: 100% !important;
    box-sizing: border-box;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1100px) {
    .mimir-layout-container {
        flex-direction: column;
        align-items: center;
        /* No height/overflow changes needed — page still scrolls naturally */
    }
    
    .scorecard-column {
        flex: auto;
        width: 100%;
        min-width: unset;
        margin-bottom: 20px;
        
        /* Turn off sticky on smaller screens */
        position: relative;
        top: auto;
    }
}

@media (max-width: 1300px) {
  .topic-section,
  .white-box {
    width: 100%;
    max-width: 100%;
  }
  
  .main-content {
    margin-top: 60px;
    margin-left: 20px;
    margin-right: 20px;
  }
  
  .shrinked-view {
    font-size: 15px;
  }
}

@media (max-width: 1024px) {
  .mimir-layout-container {
      flex-direction: column;
      align-items: center;
  }
  
  .scorecard-column {
      flex: auto !important;
      width: 100%;
      margin-bottom: 20px;
      position: relative;
      top: auto;
  }

  .main-content {
    margin-top: 70px;
    margin-bottom: 40px;
  }

  .topic-section {
    font-size: 16px;
    padding: 8px 15px;
    margin: 0 auto;
  }

  .white-box {
    padding: 12px;
    margin: 0 auto;
  }

  .question-text {
    font-size: 22px;
  }
  
  .shrinked-view {
    font-size: 14px;
  }
  
  .question-content img,
  .question-content video {
    max-width: 250px;
    max-height: 250px;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  
  .shrinked-view img,
  .shrinked-view video {
    max-width: 70px;
    max-height: 70px;
  }
}

@media (max-width: 768px) {
    .bonus-order-wrapper {
      font-size: 16px;
      margin-top: 80px;
    }
    .intro-content {
      margin-top:70px;
      font-size: 24px;
    }
    #find {
        display: block;
    }
    #file-pre-label {
        display: none;
    }
    .topic-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        margin: auto;
    }
    
    .topic-icon {
        color: #515151;
        position: static;
        transform: none;
        order: -1;
        margin-bottom: 0px;
        font-size: 12px;
    }
    .file-label {
        padding: 2px 20px;
    }

    /* zooming */
    .zoomed-in {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%); 
        width: 100vw;
        height: 100vh;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; 
        z-index: 1000;
        cursor: zoom-out;
    }

    .white-box {
        margin: 0 auto;
        padding: 10px;
        box-sizing: border-box;
    }
    
    .question-content {
        flex-direction: column; 
        align-items: center;
        gap: 15px;
        padding: 15px;
    }
    
    .question-content img,
    .question-content video {
        max-width: 100%;
        max-height: 200px;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    .shrinked-view {
        font-size: 10px;
    }
    
    .shrinked-view img,
    .shrinked-view video {
        max-width: 70px;
        max-height: 70px;
    }
    
    .question-text {
        width: 100%;
        font-size: 16px;
        line-height: 1.4;
        text-align: left;
    }

    /* === GLASS HEADER === */
    .mobile-header-stack {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;

        display: flex;
        flex-direction: column;
        align-items: stretch;

        padding: 10px 8px;
        gap: 8px;

        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);

        border-bottom: 1px solid rgba(255,255,255,0.1);
        z-index: 9999;

        height: auto;
    }

    .top-left,
    .top-center,
    .top-right {
        position: relative !important;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .top-center { order: 1; }
    .top-left   { order: 2; }
    .top-right  { order: 3; }

    .dark-button,
    .active-button {
        padding: 6px 10px;
        font-size: 12px;
    }

    .logo-image {
        width: 28px;
        height: 28px;
    }

    .glow-box {
        font-size: 12px;
        padding: 6px 14px;
    }

    #file-pre-label {
        display: none;
    }

    .main-content {
        margin-top: 210px;
    }
  
    .points-table-score {
        margin-top: 180px;
        font-size: 10px;
        color: #e5e5e5;
        text-align: center;
        border-collapse: collapse;
        border: 2px solid rgb(37, 37, 37);
    }
}

@media (max-width: 480px) {
    .bonus-order-wrapper {
      font-size: 14px;
      margin-top: 70px;
    }
    #find {
        display: block;
    }
    .intro-content {
        margin-top:90px;
        font-size: 20px;
    }
    .topic-section {
        font-size: 14px;
        padding: 6px 0px;
        margin: 0 auto;
    }
    
    .white-box {
        padding: 10px;
        margin-bottom: 50px;
    }
    
    .button-container {
        gap: 5px;
    }
    
    .button-container button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .question-text {
        font-size: 13px;
    }
    
    .shrinked-view {
      font-size: 8px;
    }
    
    .shrinked-view img,
    .shrinked-view video {
        max-width: 100px;
        max-height: 100px;
    }
}