/* F1 Reflex Percentage Bar */
body{
  user-select: none !important;
}
.main-text{
 margin-top: 100px;
}
.f1-bar-container {
    width: 100%;
    max-width: 340px;
    margin: 18px auto 10px auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.f1-bar-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 2px;
}
.f1-bar-bg {
    width: 100%;
    height: 22px;
    background: #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    position: relative;
}
.f1-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff0303 0%, #ffe600 60%, #00c853 100%);
    border-radius: 12px;
    transition: width 0.7s cubic-bezier(.4,2,.6,1);
}

.f1-title {
    text-align: center;
    font-size: var(--big-font);
    font-weight: 700;
    color: var(--third-color);
    margin: 54px 0 8px 0;
    letter-spacing: 0.01em;
    font-family: 'Poppins', sans-serif;
    position: relative;
}
.f1-title span {
    color: #ff0303;
    font-weight: 800;
}

/* Make HUD elements fit nicely inside the stat blocks */
.odd-hud .timer {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 2px 0 0 0;
    color: #111;
}

.odd-hud .f1-bar-container {
    max-width: none;
    width: 100%;
    margin: 2px 0 0 0;
    gap: 6px;
}

.odd-hud .f1-bar-bg {
    height: 16px;
    border-radius: 999px;
}

.odd-hud .f1-bar-fill {
    border-radius: 999px;
}

.odd-hud .f1-bar-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}
/* Reflex Test Game Styles */
.f1-reflex-game-section {
    max-width: 500px;
    margin: 60px auto 0 auto;
    padding: 32px 24px;
    /* background: #fff; */
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.74);
    text-align: center;
    position: relative;
    height: 460px;
    box-sizing: border-box;
}

/* Canvas for timer */
#reflex-canvas {
    width: 100%;
    height: 100%;
    margin: 0;
    display: block;
}

/* Overlay styles */
.reflex-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px;
    width: 100%;
}

.overlay-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 340px;
}

.overlay-stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
}

.overlay-stat.full-width {
    width: 100%;
}

.overlay-stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overlay-stat-value {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
}

.overlay-btn {
    padding: 14px 50px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    background: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Poppins', sans-serif;
}

.overlay-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.overlay-btn:active {
    transform: scale(0.98);
}

.traffic-lights {
    position: absolute;
    left: 50%;
    top: 62%;
    transform: translate(-50%, -50%);
    width: calc(100% - 48px);
    max-width: 460px;
    display: flex;
    justify-content: space-between;
    margin: 0;
    gap: 22px;
    z-index: 2;
}
.traffic-light {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    background: #111;
    border-radius: 18px;
    padding: 16px 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.light-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
}
.light {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #222;
    border: 3px solid #797979;
    transition: background 0.2s, box-shadow 0.2s;
}
.light.red {
    background: #c00;
    box-shadow: 0 0 12px #f44;
}
.light.green {
    background: #0c0;
    box-shadow: 0 0 16px #4f4;
}
.timer {
    font-size: 2.2rem;
    font-weight: 600;
    margin: 18px 0 8px 0;
    color: #222;
}
.result {
    font-size: 1.3rem;
    font-weight: 500;
    margin: 10px 0 18px 0;
    color: rgb(0, 0, 0);
}
#restart-btn,
#start-btn {
    padding: 10px 28px;
    font-size: 1.1rem;
    border-radius: 8px;
    border: none;
    background: #ff0000;
    color: #fff;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}
#restart-btn:hover,
#start-btn:hover {
    background: #000000;
}

.footer {
    width: 100vw;
    max-width: 100vw;
    left: 0;
    right: 0;
    margin: 0;
    padding: 32px 0 18px 0;
    background: rgba(0,0,0,0.10);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1.5px solid #e0e0e0;
    box-shadow: 0 -2px 16px 0 rgba(0,0,0,0.04);
}
.last-text p {
    color: #222;
    font-size: 1rem;
    text-align: center;
    margin: 0 0 12px 0;
    letter-spacing: 0.01em;
    font-weight: 500;
}
.footer_socials {
    display: flex;
    gap: 18px;
    margin-bottom: 0;
}
.footer_socials i {
    font-size: 22px;
    padding: 12px;
    background: #fff;
    border-radius: 50%;
    color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.18s, color 0.18s, transform 0.18s;
}
.footer_socials i:hover {
    background: #ff0303;
    color: #fff;
    transform: scale(1.13);
}

/* Overlay styles matching Quick Math */
.reflex-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 14, 22, 0.68);
  backdrop-filter: blur(8px);
  z-index: 30;
}

.reflex-overlay-card {
  width: min(420px, calc(100% - 48px));
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  padding: 22px 22px 20px;
  text-align: center;
  box-shadow: 0 28px 70px rgba(0,0,0,0.35);
}

.reflex-overlay-title {
  font-size: 2.1rem;
  font-weight: 900;
  color: #0d1020;
  letter-spacing: 0.01em;
}

.reflex-overlay-subtitle {
  margin-top: 6px;
  font-size: 1.02rem;
  font-weight: 600;
  color: rgba(13, 16, 32, 0.75);
}

.reflex-score-label {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(13, 16, 32, 0.55);
}

.reflex-score {
  margin-top: 6px;
  font-size: 4.1rem;
  font-weight: 900;
  line-height: 1;
  color: #0d1020;
}

.reflex-score-small {
  font-size: 2.4rem;
  opacity: 0.9;
}

.reflex-score-label-tight {
  margin-top: 12px;
}

.overlay-btn {
  margin-top: 18px;
  padding: 12px 42px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  background: linear-gradient(90deg, #111 0%, #2a2f4a 100%);
  box-shadow: 0 18px 44px rgba(0,0,0,0.22);
  transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
  font-family: 'Poppins', sans-serif;
}

.overlay-btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.1);
  box-shadow: 0 22px 52px rgba(0,0,0,0.28);
}

.overlay-btn:active {
  transform: translateY(0px) scale(0.99);
}

@media (max-width: 600px) {
    .main-text {
        margin-top: 60px;
    }
  .f1-reflex-game-section {
        max-width: 90%;
        margin: 20px auto 0 auto;
        padding: 12px 14px;
    }
    .footer {
        padding: 18px 0 10px 0;
    }
    .footer_socials i {
        font-size: 18px;
        padding: 8px;
    }
    .last-text p {
        font-size: 0.85rem;
    }

    /* Compact traffic lights for small screens */
    .traffic-lights {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -45%);
        width: calc(100% - 24px);
        max-width: 360px;
        gap: 8px;
        justify-content: center;
        padding: 0;
        flex-direction: row;
        align-items: center;
    }
    .traffic-light {
        padding: 8px 10px;
        border-radius: 12px;
        gap: 8px;
        min-width: 0;
    }
    .light-row { gap: 6px; }
    .light {
        width: 28px;
        height: 28px;
        border-width: 2px;
    }
    .timer { font-size: 1.4rem; margin: 10px 0 6px 0; }
    .result { font-size: 1rem; }
}
