/* 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;
}
.points-table-score {
    margin-top: 50px;
    font-size: 16px;
    color: #e5e5e5;
    text-align: center;
    border-collapse: collapse;
    border: 1px solid rgb(37, 37, 37);
}

th {
    background-color: #000000;
    color: #858585;
    border-bottom: 2px solid #1a1616;
}

/* 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;
}


.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: 1200px;
  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;
}

.topic-section {
    /*background: linear-gradient(to top, #000, #111);*/
    background: #4343434d;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.topic-name {
  flex: 1; /* Ensures the name stays on the left */
}

#q_count {
    color: #ffffff21;
}

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

.topic-icon.red {
  color: red; /* Red for countdown toggle */
}

/* Question & Answer Box */
.white-box {
  background-color: #00000087;
  color: #ffffff;
  border-radius: 0 0 10px 10px;
  width: 1200px;
  height: auto;
  /*display: flex;*/
  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;
  /*text-align: justify;*/
}

.question-content img,
.question-content video {
  max-height: 300px;
  max-width: 600px;
  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: 400px;
    max-height: 300px;
}

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

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

.shrinked-view audio {
  width: 50%;     /* responsive */
  max-width: 100px;      /* prevents it from being too wide */
  height: 40px;          /* compact height */
  margin-top: 5px;       /* slight spacing */
  border-radius: 20px;   /* rounded corners for modern look */
}

.dim {
  opacity: 0.3;
}

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

@media (max-width: 1024px) {
  .main-content {
    margin-top: 70px; /* adjust if top-left grows */
    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) {
    .intro-content {
      margin-top:70px;
      font-size: 24px;
    }
    #find {
        display: block;
    }
    #file-pre-label {
        display: none;
    }
    .topic-section {
        display: flex;
        flex-direction: column;   /* stack items */
        align-items: center;      /* center horizontally */
        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 Adjustments */
    .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 CONTAINER === */
  .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;
  }


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

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

  /* SIZING */
  .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;
  }

  /* PUSH CONTENT BELOW HEADER */
  .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) {
    #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;
    }
}