* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    /* Unified site-wide gradient background */
    background-color: #98e7ff;
    background-image: linear-gradient(to bottom, #98e7ff, #6abde4, #4493c7, #296aa8, #1e4285);
    margin: 0;
    padding: 0;
    padding-top: 60px; /* Add padding for fixed header */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

/* Dark mode disabled sitewide */

/* Dark mode background removed */

/* Breadcrumbs and related links */
.breadcrumb {
    position: fixed;
    top: 68px; /* sits just below fixed header */
    left: 0;
    right: 0;
    z-index: 110;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.95em;
    color: #4a5568;
}

/* Enhanced in-content breadcrumb (larger, multi-row, with guides submenu) */
.product-page .breadcrumb.enhanced,
.supplement-page .breadcrumb.enhanced {
    position: relative; /* override fixed */
    top: unset;
    right: unset;
    z-index: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    padding: 18px 22px 20px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 1.05em;
    line-height: 1.4;
    color: #2552a3;
}

.breadcrumb.enhanced .breadcrumb-trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.breadcrumb.enhanced .breadcrumb-trail a {
    color: #1e4285;
    text-decoration: none;
}

.breadcrumb.enhanced .breadcrumb-trail a:hover { text-decoration: underline; }

.breadcrumb-guides {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.breadcrumb a {
    color: #2552a3;
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span:last-child {
    font-weight: 700;
    color: #1e4285;
}

@media (max-width: 640px) {
    .breadcrumb { /* legacy fixed style shrink */
        top: 64px;
        right: 10px;
        padding: 5px 8px;
        font-size: 0.85em;
        border-radius: 14px;
        box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    }
    .product-page .breadcrumb.enhanced,
    .supplement-page .breadcrumb.enhanced {
        padding: 14px 16px 16px;
        font-size: 0.95em;
        border-radius: 18px;
        box-shadow: 0 8px 22px rgba(0,0,0,0.08);
    }
    .breadcrumb-guides { max-height: 110px; overflow-y: auto; }
    .breadcrumb-guides a { font-size: 0.75em; }
}

/* Dark mode breadcrumb theme removed */

.related-links {
    text-align: center;
    margin: 20px auto 0;
    color: #666;
}

.related-links a {
    color: #2552a3;
    text-decoration: none;
    margin: 0 4px;
}

.related-links a:hover {
    text-decoration: underline;
}

.top-bar {
    width: 100%;
    background-color: transparent;
    border-bottom: none;
    padding: 8px 35px 8px 20px;
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    margin-right: 30px;
}

.domain-name {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2552a3;
    font-weight: 700;
    font-size: 1.2em;
    font-family: 'Orbitron', sans-serif;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.study-link, .mobile-study-link {
    background-color: #ea6a4b;
    color: white;
    padding: 6px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 4px 10px rgba(0, 0, 0, 0.16);
}

.study-link:hover, .mobile-study-link:hover {
    background-color: #d4553c;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
                inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 6px 14px rgba(0, 0, 0, 0.18);
}

.study-link:active, .mobile-study-link:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 5px rgba(0, 0, 0, 0.16);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
    margin-right: 15px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #1e4285; /* contrast on light cyan */
    transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin: 0 auto;
    background-color: transparent;
    border: none;
    padding: 10px 0;
    box-shadow: none;
    z-index: 1000;
    min-width: 120px;
    width: max-content;
}

.mobile-menu a {
    display: block;
    padding: 10px 16px;
    background: transparent;
    color: #1e4285;
    text-decoration: none;
    text-align: center;
}

.mobile-menu a:hover {
    color: #163068;
}

.mobile-menu.active {
    display: block;
}

.top-bar.hidden {
    transform: translateY(-100%);
}

.logo-icon {
    width: 26px;
    height: 26px;
    display: block;
    border-radius: 50%;
    filter: drop-shadow(0 3px 8px rgba(8, 17, 31, 0.18));
    flex-shrink: 0;
}

.domain-name:hover {
    background-color: #e9ecef;
    border-color: #2552a3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Site footer */
.site-footer {
    width: 100%;
    background: transparent;
    border-top: none;
    padding: 10px 20px 0;
    text-align: center;
    color: #ffffff;
    margin-top: auto;
}

.site-footer .footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 20px;
    text-align: center;
    color: #1b1b1b;
    font-size: 0.95em;
}

.site-footer a {
    color: #1b1b1b;
    font-weight: normal;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-links {
    color: #1b1b1b;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    text-align: center;
    justify-content: center;
}


.footer-links[hidden] {
    display: none;
}

.footer-links p {
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.footer-links a {
    display: inline-block;
    width: 100%;
    text-align: center;
}

.footer-links p.footer-contact {
    margin-top: 18px;
}


.footer-menu-toggle {
    border: none;
    background: transparent;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin: 0 auto;
    touch-action: manipulation;
}
.footer-menu-toggle:hover,
.footer-menu-toggle:focus-visible {
    transform: translateY(-1px);
    outline: none;
    box-shadow: none;
}

.footer-menu-toggle.open .footer-menu-bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.footer-menu-toggle.open .footer-menu-bar:nth-child(2) {
    opacity: 0;
}

.footer-menu-bar {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background-color: #1e1e1e;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.footer-menu-toggle.open .footer-menu-bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.footer-links {
    width: 100%;
}

@media (max-width: 640px) {
    .footer-menu-toggle {
        gap: 8px;
    }

    .footer-menu-bar {
        display: block;
        width: 28px;
        height: 3px;
    }

    .footer-links {
        width: min(320px, 90vw);
        margin-left: auto;
        margin-right: auto;
    }
}

.bottom-bar {
    width: 100%;
    background: transparent;
    padding: 10px 20px;
    text-align: center;
    color: #1b1b1b;
    font-size: 0.9em;
}

.bottom-bar a {
    color: #1b1b1b;
    text-decoration: none;
}

.bottom-bar a:hover {
    text-decoration: underline;
}

.bottom-static-links {
    margin: 12px 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #1b1b1b;
    font-size: 1em;
    font-weight: 400;
}

.bottom-link-separator {
    opacity: 0.8;
}

@media (prefers-color-scheme: dark) {
    /* Keep footer consistent; dark mode disabled */
    .site-footer {
        background: transparent;
        border-top: none;
        color: #ffffff;
    }
    .site-footer a {
        color: #1b1b1b;
    }
}
#game-container {
    background-color: transparent;
    padding: 20px;
    margin-top: 0px;
    text-align: center;
    max-width: min(800px, 95vw);
    width: 100%;
    overflow-x: hidden;
}

#game-container h1 {
    margin-bottom: 20px;
}
#game-container h1 {
    color: #ffffff;
    /* Keep headline on a single line across breakpoints by allowing it to shrink sooner and span wider. */
    font-size: clamp(1.85rem, 6.5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 10px;
    font-weight: bold;
    max-width: clamp(16rem, 90vw, 560px);
    margin-left: auto;
    margin-right: auto;
}

#game-container p.tagline {
    margin: 16px auto 50px auto;
    font-size: 1.35em;
    color: #1e1e1e;
    font-weight: 500;
    max-width: clamp(16rem, 90vw, 560px);
}

.tagline-emphasis {
    text-decoration: none;
}

.tagline-highlight {
    color: #1e4285;
    font-size: 1.08em;
    font-weight: 1000;
}

.mobile-tagline-break {
    display: none;
}

@media (max-width: 640px) {
    .mobile-tagline-break {
        display: block;
    }
}


#game-container > p {
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 18px;
    color: #1e1e1e;
    text-align: center;
    line-height: 1.6;
    font-weight: 500;
}

#game-container h3 {
    color: #1e1e1e;
}

#game-area {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

#grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: min(330px, 90vw);
    max-width: min(330px, 90vw);
    margin: 0 auto;
    /* Allow vertical page scrolling while touching the grid */
    touch-action: pan-y;
    -ms-touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

/* Reserved: color editing mode styles removed per user preference */

.key-hint {
    font-size: 16px;
    color: #1e1e1e;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.grid-cell {
    aspect-ratio: 1;
    background-color: #ffb703;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    font-weight: bold;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.25s ease, color 0.25s ease;
    cursor: default;
    color: #2552a3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1),
                0 4px 10px rgba(0, 0, 0, 0.14),
                0 2px 0 rgba(0, 0, 0, 0.1);
    /* Prevent text selection and iOS tap highlights during long-press */
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none; /* prevent callout on long-press (iOS/Samsung) */
}

.grid-cell.active {
    background-color: #EA6A4B;
    color: white;
    transform: scale(1.0008);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.22),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 1px 3px rgba(0, 0, 0, 0.18);
}

/* Visual mode color styles */
.grid-cell.visual-mode {
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.grid-cell.visual-mode.active {
    transform: scale(1.0008);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.22),
                inset 0 -1px 0 rgba(255, 255, 255, 0.18),
                0 1px 3px rgba(0, 0, 0, 0.18);
}

#response-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    margin-bottom: 30px;
}

#response-buttons button {
    width: min(330px, 90vw);
}

.response-btn {
    position: relative;
    background-color: #ea6a4b;
    color: white;
    padding: 15px 10px;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.12s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, color 0.25s ease, filter 0.12s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1),
                0 4px 10px rgba(0, 0, 0, 0.14),
                0 2px 0 rgba(0, 0, 0, 0.1);
    /* Lock gesture handling to the button so drag does not scroll the page */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.response-btn:hover {
    transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1),
                0 4px 10px rgba(0, 0, 0, 0.14),
                0 2px 0 rgba(0, 0, 0, 0.1);
}

.response-btn:focus-visible {
    outline: none;
}

.response-btn:active,
.response-btn.touch-active {
    transform: translateY(1px) scale(0.997);
    filter: brightness(0.995) saturate(1.01);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 6px rgba(0, 0, 0, 0.14),
                0 1px 0 rgba(0, 0, 0, 0.08);
}

.response-btn.response-correct {
    animation: response-confirm 0.24s ease-out;
    border-color: rgba(207, 255, 221, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28),
                inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 0 0 3px rgba(207, 255, 221, 0.5),
                0 0 18px rgba(124, 255, 173, 0.45),
                0 6px 16px rgba(0, 0, 0, 0.18);
}

.response-btn.response-wrong {
    animation: response-reject 0.24s ease-out;
    border-color: rgba(255, 220, 220, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28),
                inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 0 0 3px rgba(255, 210, 210, 0.45),
                0 0 18px rgba(255, 130, 130, 0.4),
                0 6px 16px rgba(0, 0, 0, 0.18);
}

.response-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.response-btn.touch-active:disabled,
.response-btn.response-correct:disabled,
.response-btn.response-wrong:disabled {
    opacity: 1;
}

@keyframes response-confirm {
    0% {
        transform: translateY(1px) scale(0.992);
        filter: brightness(1.03) saturate(1.02);
    }
    60% {
        transform: translateY(0) scale(1.008);
        filter: brightness(1.05) saturate(1.03);
    }
    100% {
        transform: translateY(0) scale(1);
        filter: brightness(1) saturate(1);
    }
}

@keyframes response-reject {
    0% {
        transform: translateY(1px) scale(0.992);
        filter: brightness(1.02) saturate(1.01);
    }
    50% {
        transform: translateX(-1px) scale(0.998);
    }
    75% {
        transform: translateX(1px) scale(0.998);
    }
    100% {
        transform: translateX(0) scale(1);
        filter: brightness(1) saturate(1);
    }
}

#controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

#controls button {
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24),
                inset 0 -1px 0 rgba(0, 0, 0, 0.16),
                0 5px 11px rgba(0, 0, 0, 0.18);
}

#controls button:hover:not(:disabled) {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
                inset 0 -1px 0 rgba(0, 0, 0, 0.16),
                0 7px 15px rgba(0, 0, 0, 0.2);
}

#controls button:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.24),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 5px rgba(0, 0, 0, 0.16);
}

button {
    padding: 10px 20px;
    margin: 0;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 4px 10px rgba(0, 0, 0, 0.16);
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
                inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 6px 14px rgba(0, 0, 0, 0.18);
}

button:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 5px rgba(0, 0, 0, 0.16);
}

#start-btn, #pause-btn, #reset-btn {
    width: 100%;
    padding: 10px 0;
}

#start-btn {
    background-color: #1e4285;
    color: white;
}

#start-btn:hover:not(:disabled) {
    background-color: #163068;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2),
                0 6px 14px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

#pause-btn {
    background-color: #1e4285;
    color: white;
}

#pause-btn:hover:not(:disabled) {
    background-color: #163068;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2),
                0 6px 14px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

#reset-btn {
    background-color: #1e4285;
    color: white;
}

#reset-btn:hover {
    background-color: #163068;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2),
                0 6px 14px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

#start-btn:active:not(:disabled),
#pause-btn:active:not(:disabled),
#reset-btn:active:not(:disabled) {
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 5px rgba(0, 0, 0, 0.16);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#mute-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.mute-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: opacity 0.3s ease;
    box-shadow: none;
}

.mute-btn:hover {
    opacity: 0.8;
}

.mute-btn.unmuted {
    opacity: 1;
}

.mute-btn:not(.unmuted) {
    opacity: 0.6;
}

#scores-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.score-item {
    font-size: 18px;
    color: #1e1e1e;
}

#trial {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 30px 0 30px;
    font-size: 18px;
    color: #1e1e1e;
    font-weight: 400;
}

#score-value, #position-score-value, #letter-score-value, #color-score-value {
    font-weight: bold;
    color: #ea6a4b;
}

#level-value, #trial-value {
    font-weight: 500;
    color: #ea6a4b;
}

#level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 80px 0 40px 0;
    font-size: 18px;
    color: #1e1e1e;
    font-weight: 400;
}

#mode-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0 15px;
    font-size: 18px;
    width: min(330px, 90vw);
    margin-left: auto;
    margin-right: auto;
}

#speed-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 25px 0 15px;
    font-size: 18px;
    width: min(330px, 90vw);
    margin-left: auto;
    margin-right: auto;
}

#speed-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

#speed-slider {
    width: 100%;
    height: 8px;
    background: #d6dbe5;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35),
                inset 0 -1px 2px rgba(0, 0, 0, 0.14);
}

#speed-slider::-webkit-slider-runnable-track {
    height: 8px;
    background: #d6dbe5;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35),
                inset 0 -1px 2px rgba(0, 0, 0, 0.14);
}

#speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1e4285;
    border: 1px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    margin-top: -7px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2),
                0 3px 8px rgba(0, 0, 0, 0.22);
}

#speed-slider::-webkit-slider-thumb:hover {
    background: #163068;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.24),
                0 5px 12px rgba(0, 0, 0, 0.24);
}

#speed-slider:active::-webkit-slider-thumb {
    transform: translateY(1px);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 5px rgba(0, 0, 0, 0.2);
}

#speed-slider::-moz-range-track {
    height: 8px;
    background: #d6dbe5;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35),
                inset 0 -1px 2px rgba(0, 0, 0, 0.14);
}

#speed-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1e4285;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2),
                0 3px 8px rgba(0, 0, 0, 0.22);
}

#speed-slider::-moz-range-thumb:hover {
    background: #163068;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.24),
                0 5px 12px rgba(0, 0, 0, 0.24);
}

#speed-slider:active::-moz-range-thumb {
    transform: translateY(1px);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 5px rgba(0, 0, 0, 0.2);
}

#speed-value {
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    text-align: center;
}

#supplement-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 30px 0 50px;
    font-size: 18px;
}

#supplement-selector label {
    color: #1e1e1e;
    font-weight: bold;
}

#supplement-dropdowns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#game-mode, .supplement-select {
    padding: 10px 0;
    font-size: 16px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 5px;
    background-color: #1e4285;
    color: white;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2),
                0 4px 10px rgba(0, 0, 0, 0.18);
    width: min(330px, 90vw);
    text-align: center;
}

#game-mode:hover, .supplement-select:hover {
    background-color: #163068;
    color: white;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
                inset 0 -1px 0 rgba(0, 0, 0, 0.22),
                0 6px 14px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

#game-mode:focus, .supplement-select:focus {
    outline: none;
    background-color: #1e4285;
    color: white;
    box-shadow: 0 0 0 2px rgba(30, 66, 133, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2),
                0 4px 10px rgba(0, 0, 0, 0.18);
}

#game-mode:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.26),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 5px rgba(0, 0, 0, 0.16);
}

#instructions-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    width: min(330px, 90vw);
    margin-left: auto;
    margin-right: auto;
    background: transparent !important;
}

.instructions-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-bottom: 0;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 400;
    border: none;
    border-radius: 5px;
    background: #1e4285;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 4px 10px rgba(0, 0, 0, 0.16);
    text-shadow: none;
}

.instructions-toggle-btn:hover {
    transform: translateY(-1px);
    background: #2552a3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
                inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 6px 14px rgba(0, 0, 0, 0.18);
}

.instructions-toggle-btn:focus {
    outline: none;
    background: #2552a3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
                inset 0 -1px 0 rgba(0, 0, 0, 0.12),
                0 4px 10px rgba(0, 0, 0, 0.16);
}

.instructions-toggle-btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 5px rgba(0, 0, 0, 0.16);
}

.instructions-note-text {
    margin: 12px auto;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222;
    font-size: 17px;
    line-height: 1.45;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
    text-align: center;
}

#instructions-toggle-container .instructions {
    margin: 10px auto 0;
    width: 100%;
    max-width: 100%;
}

.level-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0 2px;
    font-size: 20px;
    line-height: 1;
    background-color: #1e4285;
    color: white;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24),
                inset 0 -1px 0 rgba(0, 0, 0, 0.16),
                0 4px 10px rgba(0, 0, 0, 0.16);
}

#level-up,
#level-down,
#trial-up,
#trial-down {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24),
                inset 0 -1px 0 rgba(0, 0, 0, 0.16),
                0 4px 10px rgba(0, 0, 0, 0.16);
}

.level-btn:hover:not(:disabled) {
    background-color: #1e4285;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24),
                inset 0 -1px 0 rgba(0, 0, 0, 0.16),
                0 6px 14px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

#level-up:hover:not(:disabled),
#level-down:hover:not(:disabled),
#trial-up:hover:not(:disabled),
#trial-down:hover:not(:disabled) {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24),
                inset 0 -1px 0 rgba(0, 0, 0, 0.16),
                0 6px 14px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.level-btn:active:not(:disabled),
#level-up:active:not(:disabled),
#level-down:active:not(:disabled),
#trial-up:active:not(:disabled),
#trial-down:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.28),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 5px rgba(0, 0, 0, 0.16);
}

.instructions {
    margin: 30px auto 0;
    padding: 28px 30px;
    max-width: min(820px, 94vw);
    width: 100%;
    background: rgba(16, 52, 109, 0.2);
    border-radius: 24px;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14),
                0 10px 24px rgba(0, 0, 0, 0.16);
    border: none;
    display: grid;
    gap: 14px;
}

#instructions-content[hidden] {
    display: none !important;
}

.instructions h3 {
    color: #ffffff;
    font-size: 1.18em;
    line-height: 1.2;
    margin: 0;
}

.instructions h4 {
    color: #ffffff;
    font-size: 0.98em;
    margin: 0;
    font-weight: 700;
}

.instructions p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95em;
    line-height: 1.6;
}

.instructions-summary {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.96em;
    line-height: 1.6;
}

.instructions-block {
    border: none;
    border-radius: 12px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 8px 18px rgba(0, 0, 0, 0.12);
    display: grid;
    gap: 10px;
}

.instructions-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
}

.instructions-list li {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.55;
}

.instructions kbd {
    background-color: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 14px;
    color: #ffffff;
}

/* Promotional Section */
.promotional-section {
    max-width: min(800px, 95vw);
    width: 100%;
    margin: 20px 0;
    padding: 10px;
    background-color: #90E5FF;
    text-align: center;
    overflow-x: hidden;
}

.promotional-section h2 {
    color: #1e1e1e;
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: bold;
}

.promotional-section .tagline {
    font-size: 1.3em;
    color: #1e1e1e;
    margin-bottom: 10px;
    font-weight: 500;
}

.promotional-section .welcome {
    font-size: 1.1em;
    color: #1e1e1e;
    margin-bottom: 30px;
    font-style: italic;
}

.promotional-section .description {
    font-size: 1.1em;
    line-height: 1.6;
    color: #1e1e1e;
    margin-bottom: 40px;
    text-align: left;
}

.promotional-section h3 {
    color: #1e1e1e;
    font-size: 1.8em;
    margin: 30px 0 20px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.feature {
    display: flex;
    align-items: flex-start;
    text-align: left;
    padding: 15px;
    background-color: #faedcd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.feature .emoji {
    font-size: 1.5em;
    margin-right: 15px;
    margin-top: 2px;
}

.feature strong {
    color: #1e1e1e;
    display: block;
    margin-bottom: 15px;
    margin-right: 15px;
}

.cta-section {
    margin-top: 40px;
    padding: 30px;
    border-radius: 15px;
    color: #1e1e1e;
    background-color: #90E5FF;
}

.cta-section h3 {
    color: #1e1e1e;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.2em;
    margin-bottom: 25px;
}

.play-now-btn {
    background-color: #ea6a4b;
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(234, 106, 75, 0.3);
}

.play-now-btn:hover {
    background-color: #d4553c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 106, 75, 0.4);
}

.cta-buttons {
    margin-top: 30px;
    text-align: center;
}

.leaderboard-btn {
    background-color: #1e4285;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 82, 163, 0.3);
    margin: 10px;
}

.leaderboard-btn:hover {
    background-color: #1e4285;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 82, 163, 0.4);
    text-decoration: none;
}

/* Supplements Section */
.supplements-section {
    max-width: 100vw;
    width: 100%;
    padding: 40px min(24px, 5vw) 50px;
    background: #90E5FF;
    color: #1e4285;
    text-align: center;
    margin-bottom: 50px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.supplements-section:focus-visible {
    outline: 3px solid rgba(37, 82, 163, 0.45);
    outline-offset: 4px;
}

.supplements-section:hover {
    transform: translateY(-2px);
}

.supplements-section > * {
    position: relative;
}

.supplements-section h2 {
    color: #1e1e1e;
    font-size: 2.2em;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

.supplements-intro {
    font-size: 1.2em;
    color: #1e1e1e;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.supplements-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #ea6a4b;
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: 25px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin: 0 auto 24px;
}

.supplements-toggle-btn:hover {
    background-color: #d4553c;
    transform: translateY(-1px);
}

.supplements-toggle-btn:focus-visible {
    outline: 3px solid rgba(234, 106, 75, 0.35);
    outline-offset: 3px;
}

.supplements-content {
    margin-top: 10px;
}

.supplements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
    margin-left: 10%;
    margin-right: 10%;
}

.supplement-card {
    /* Unified brand background to match other sections */
    background-color: #90E5FF;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: block;
    text-decoration: none;
    color: inherit;
}

.supplement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.supplement-card h3 {
    color: #1e1e1e;
    font-size: 1.4em;
    margin-bottom: 10px;
}

.supplement-card p {
    color: #1e1e1e;
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.supplement-link {
    color: #ea6a4b;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    transition: color 0.3s ease;
}

.supplement-link:hover {
    color: #d4553c;
    text-decoration: underline;
}

.supplements-disclaimer {
    font-size: 0.9em;
    color: #999;
    font-style: italic;
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Research Section */
.research-section {
    max-width: 800px;
    width: 100%;
    padding: 40px 20px;
    background-color: #90E5FF; 
    text-align: center;
    margin-top: 0;
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
}

/* Research Section within Product Pages - inherit natural width like other sections */
.product-page .research-section {
    max-width: none;
    width: auto;
    margin-left: 0;
    margin-right: 0;
    padding: 30px;  /* Match the inline styles in product pages */
}

/* Override for research items in product pages that have inline styles */
.product-page .research-item {
    margin-bottom: 15px;
    text-align: left;
    line-height: 1.6;
}

/* Affiliate Link Section */
.affiliate-section {
    background-color: #90E5FF;
    border: 2px solid #2552a3;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
    text-align: center;
}

.affiliate-section h2 {
    color: #1e4285;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.affiliate-section p {
    color: #1e1e1e;
    margin-bottom: 20px;
    line-height: 1.6;
}

.affiliate-button {
    display: inline-block;
    background-color: #2552a3;
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.affiliate-button:hover {
    background-color: #1e4285;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.affiliate-disclaimer {
    font-size: 0.85em;
    color: #999;
    font-style: italic;
    margin-top: 15px;
}

.research-section h2 {
    color: #1e1e1e;
    font-size: 2.2em;
}

/* Leaderboard Country and Workplace Styles */
.country-flag {
    font-size: 1.2em;
    margin-right: 8px;
    vertical-align: middle;
}

.username-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workplace-info {
    color: #1e1e1e;
    font-size: 0.9em;
    font-style: italic;
}

.leaderboard-table th.country-column {
    width: 8%;
    text-align: center;
}

.leaderboard-table th.workplace-column {
    width: 25%;
}

.leaderboard-table td.country-cell {
    text-align: center;
    font-size: 1.3em;
}

/* Filter buttons for location-based filtering */
.location-filters {
    margin-top: 15px;
}

.location-filter-btn {
    background-color: #f0f8ff;
    color: #2552a3;
    padding: 6px 15px;
    border: 1px solid #2552a3;
    border-radius: 15px;
    margin: 0 3px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.location-filter-btn.active {
    background-color: #2552a3;
    color: white;
}

.location-filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


.research-intro {
    font-size: 1.2em;
    color: #1e1e1e;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.research-references {
    max-width: 900px;
    margin: 0 auto 30px;
    text-align: left;
}

.reference-item {
    background-color: #90E5FF;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 10px;
    
}

/* Ensure referenced studies match section background even if other rules override */
.research-references .reference-item {
    background-color: #90E5FF !important;
    border: 1px solid rgba(0,0,0,0.04);
}

.reference-item h3 {
    color: #1e1e1e;
    font-size: 1.3em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.reference-link {
    color: #1e4285;
    text-decoration: none;
    transition: color 0.3s ease;
}

.reference-link:hover {
    color: #2552a3;
    text-decoration: underline;
}

.reference-authors {
    color: #2552a3;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1em;
}

.reference-journal {
    color: #1e1e1e;
    font-style: italic;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.reference-summary {
    color: #333;
    line-height: 1.5;
    margin: 0;
    font-size: 1em;
}

/* Add gentle spacing when multiple summary paragraphs appear in a single reference item */
.reference-item .reference-summary + .reference-summary {
    margin-top: 10px;
}

.research-note {
    background-color: #f8f9fa ;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    margin: 30px auto 0;
    color: #856404;
    font-size: 1em;
    line-height: 1.5;
}

/* Origin Section */
.origin-section {
    max-width: 100vw;
    width: 100%;
    padding: 20px min(20px, 5vw);
    background-color: #90E5FF;
    text-align: center;
    margin-bottom: 30px;
    overflow-x: hidden;
}

.origin-section h2 {
    color: #1e1e1e;
    font-size: 2.2em;
    margin-bottom: 20px;
    font-weight: bold;
}

.origin-intro {
    font-size: 1.2em;
    color: #1e1e1e;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.origin-content {
    max-width: 700px;
    margin: 0 auto 30px;
    text-align: left;
}

.origin-content p {
    color: #1e1e1e;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.origin-content:last-of-type {
    margin-bottom: 48px;
}

.origin-content h3 {
    color: #1e1e1e;
    font-size: 1.4em;
    margin: 20px 0 10px;
    font-weight: bold;
}

.origin-content p strong {
    color: #1e1e1e;
    font-weight: bold;
}

/* FAQ Section - Origins */
.origin-faq {
    max-width: 700px;
    margin: 48px auto 40px;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

.origin-faq h3 {
    color: #1e1e1e;
    font-size: 1.4em;
    margin-bottom: 12px;
    text-align: left;
}

.origin-faq-intro {
    color: #1e1e1e;
    font-size: 1.1em;
    margin: 0 0 36px;
    text-align: left;
    max-width: 640px;
    line-height: 1.6;
}

.origin-faq-list {
    display: grid;
    gap: 6px;
}

.origin-faq-item {
    background-color: transparent;
    border-radius: 0;
    padding: 8px 16px;
    border: none;
    transition: color 0.2s ease;
    text-align: left;
}

.origin-faq-item:hover {
    box-shadow: none;
    transform: none;
}

.origin-faq-item summary {
    color: #1e1e1e;
    font-size: 1.1em;
    margin-bottom: 10px;
    cursor: pointer;
    text-align: left;
}

.origin-faq-item p {
    color: #1e1e1e;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}
.origin-link-section {
    margin-top: 15px;
    padding: 25px;
    border-radius: 10px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.origin-link-section p {
    color: #1e1e1e;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.wikipedia-link {
    display: inline-block;
    background-color: transparent;
    color: #1e1e1e;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: none;
}

.wikipedia-link:hover {
    background-color: transparent;
    transform: translateY(-2px);
    box-shadow: none;
    text-decoration: underline;
    color: #1e4285;
}

.reddit-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.reddit-link {
    display: inline;
    background-color: transparent;
    color: #ff4500;
    padding: 0;
    border-radius: 0;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: none;
}

.reddit-link:hover {
    background-color: transparent;
    transform: none;
    box-shadow: none;
    text-decoration: underline;
    color: #e63e00;
}

/* Breadcrumbs and related links */
.breadcrumb {
    width: 100%;
    margin: 10px 0 20px;
    font-size: 0.95em;
    color: #1e1e1e;
}
.breadcrumb a {
    color: #2552a3;
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

.related-links {
    max-width: 800px;
    margin: 20px auto 0;
    color: #1e1e1e;
    font-size: 0.95em;
}
.related-links a {
    color: #2552a3;
    text-decoration: none;
}
.related-links a:hover { text-decoration: underline; }

/* Section Break */
.section-break {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto;
}

.section-break-line {
    width: 300px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(37, 82, 163, 0.2) 15%,
        rgba(37, 82, 163, 0.6) 30%,
        #2552a3 50%,
        rgba(37, 82, 163, 0.6) 70%,
        rgba(37, 82, 163, 0.2) 85%,
        transparent 100%);
    border-radius: 0px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(37, 82, 163, 0.2);
}

.section-break-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.section-break-icon {
    font-size: 1.5em;
    color: #2552a3;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    min-height: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
    body {
        padding-top: 70px;
        padding-right: 5px;
        padding-bottom: 10px;
        padding-left: 5px;
    }

    #game-container {
        padding: 15px 20px;
        max-width: 100vw;
    }

    #game-container h1 {
        font-size: 2.2em;
        margin-bottom: 10px;
        width: 100%;
        max-width: clamp(16rem, 90vw, 560px);
        margin-left: auto;
        margin-right: auto;
        display: block;
        text-align: center;
    }

    #game-container p.tagline {
        font-size: 1em;
        margin: 12px auto 30px auto;
    }

    #level {
        margin: 70px 0 30px 0;
    }


    #game-area {
        flex-direction: column;
        gap: 20px;
    }

    .key-hint {
        font-size: 14px;
    }

    #grid-container {
        width: min(330px, 90vw);
        gap: 8px;
        margin: 0 auto;
    }

    .grid-cell {
        font-size: 28px;
    }

    #response-buttons {
        gap: 8px;
        margin-top: 25px;
    }

    .response-btn {
        font-size: 16px;
        padding: 18px 12px;
    }

    #controls {
        gap: 8px;
    }

    button {
        font-size: 14px;
        padding: 8px 16px;
    }

    #scores-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .score-item {
        font-size: 16px;
    }

    #level,
    #trial {
        font-weight: 400;
        color: #1e1e1e;
        font-size: 1em;
    }

    #speed-value {
        font-size: 16px;
        font-weight: 400;
        color: #ffffff;
    }

    #mode-selector,
    #supplement-selector,
    #speed-selector,
    #instructions-toggle-container {
        font-size: 16px;
        width: min(330px, 90vw);
        margin-left: auto;
        margin-right: auto;
    }

    #supplement-dropdowns {
        flex-direction: column;
        gap: 8px;
    }

    #game-mode,
    .supplement-select {
        font-size: 14px;
        padding: 8px 16px;
        width: 100%;
    }

    .instructions-toggle-btn {
        font-size: 14px;
        padding: 9px 14px;
    }

    .instructions-note-text {
        font-size: 15px;
        line-height: 1.45;
    }

    .level-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .instructions {
        margin: 30px auto 0;
        padding: 22px 20px;
        gap: 12px;
    }

    .instructions h3 {
        font-size: 1.08em;
    }

    .instructions p {
        font-size: 0.93em;
    }

    .instructions-block {
        padding: 14px 16px;
    }

    .instructions-list {
        padding-left: 18px;
        gap: 6px;
    }

    .promotional-section {
        margin: 20px 0;
        padding: 20px;
    }

    .promotional-section h2 {
        font-size: 2em;
    }

    .promotional-section .tagline {
        font-size: 1.1em;
    }

    .promotional-section .welcome {
        font-size: 1em;
    }

    .promotional-section .description {
        font-size: 1em;
    }

    .promotional-section h3 {
        font-size: 1.5em;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature {
        padding: 15px;
    }

    .feature strong {
        margin-bottom: 12px;
    }

    .cta-section {
        padding: 20px;
    }

    .cta-section p {
        font-size: 1.1em;
    }

    .play-now-btn {
        font-size: 1.2em;
        padding: 12px 30px;
    }

    .supplements-section {
        padding: 30px 20px;
    }

    .supplements-section h2 {
        font-size: 1.8em;
    }

    .supplements-intro {
        font-size: 1.1em;
        margin-bottom: 30px;
    }

    .supplements-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-left: 0;
        margin-right: 0;
    }

    .supplement-card {
        padding: 20px;
    }

    .supplement-card h3 {
        font-size: 1.3em;
    }

    .supplements-disclaimer {
        font-size: 0.85em;
    }

    .origin-section {
        padding: 30px 20px;
        margin-bottom: 30px;
    }

    .origin-section h2 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .origin-intro {
        font-size: 1.1em;
        margin-bottom: 50px;
    }

    .origin-content p {
        font-size: 1em;
        margin-bottom: 15px;
    }

    .origin-faq {
        padding: 0;
        margin: 36px auto 32px;
    }

    .origin-faq h3 {
        font-size: 1.3em;
        text-align: left;
    }

    .origin-faq-intro {
        font-size: 1em;
        margin-bottom: 36px;
        text-align: left;
    }

    /* Tighter FAQ spacing on mobile */
    .origin-faq-list {
        gap: 4px;
    }

    .origin-faq-item {
        padding: 12px 14px;
    }

    .origin-faq-item summary {
        font-size: 1.05em;
        margin-bottom: 6px;
    }

    .origin-link-section {
        padding: 20px;
    }

    .reference-summary {
        font-size: 0.95em;
    }

    .research-note {
        padding: 15px;
        font-size: 0.95em;
    }

    /* Mobile Navigation */
    .desktop-nav {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .top-bar {
        justify-content: center;
    }

    .domain-name {
        margin: 0 auto;
    }

    .nav-container {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        margin-right: 0;
    }

    .top-bar {
        padding: 16px 35px 12px 20px;
    }

    .promotional-section,
    .supplements-section,
    .origin-section,
    .research-section,
    .affiliate-section,
    .cta-section,
    .origin-link-section {
        padding-left: 20px;
        padding-right: 20px;
        max-width: 100vw;
    }
}

@media (min-width: 1025px) {
    #game-container h1 {
        max-width: clamp(20rem, 100vw, 720px);
    }
}

/* ==============================
   Product guide pages (shared)
   Standardize margins, padding, width
   ============================== */

.product-page {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Ensure in-page breadcrumb renders inline like other guides (not fixed) */
.product-page .breadcrumb,
.supplement-page .breadcrumb {
    position: static !important;
    top: auto;
    right: auto;
    z-index: auto;
    display: block;
    padding: 14px 18px;
    background: transparent;
    -webkit-backdrop-filter: none; /* remove blur */
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0 0 28px 0;
    font-size: 1.05em;
    line-height: 1.4;
}

/* Enhanced breadcrumb with guide submenu */
.breadcrumb.enhanced .breadcrumb-trail {
    font-weight: 600;
    margin: 0 0 10px 0;
}
.breadcrumb.enhanced .breadcrumb-trail a { color: #2552a3; text-decoration: none; font-weight: 600; }
.breadcrumb.enhanced .breadcrumb-trail a:hover { text-decoration: underline; }
.breadcrumb.enhanced .breadcrumb-trail span:last-child { font-weight: 700; color: #1e4285; }

.breadcrumb-guides {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.breadcrumb-guides a {
    display: inline-block;
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid #d0e2ee;
    border-radius: 14px;
    font-size: 0.78em;
    font-weight: 600;
    color: #2552a3;
    text-decoration: none;
    line-height: 1.2;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.breadcrumb-guides a:hover { background: #f0fbff; box-shadow: 0 2px 6px rgba(0,0,0,0.06); text-decoration: underline; }

/* Hide specific guides from the submenu cards globally */
.breadcrumb-guides a[href="/guides/modafinil"],
.breadcrumb-guides a[href="/guides/aniracetam"],
.breadcrumb-guides a[href="/guides/nicotine"] {
    display: none !important;
}

/* Hide the entire guides submenu in breadcrumb */
.breadcrumb-guides { display: none !important; }

/* Hide breadcrumbs on guide pages */
.guide-page .breadcrumb { display: none !important; }
:root:has(link[rel="canonical"][href*="/guides/"]) .breadcrumb { display: none !important; }

@media (max-width: 640px) {
    .product-page .breadcrumb, .supplement-page .breadcrumb { padding: 12px 14px; font-size: 0.95em; }
  .breadcrumb-guides { max-height: 92px; overflow-y: auto; }
  .breadcrumb-guides a { font-size: 0.75em; }
}

/* Hide legacy back links visually without needing to edit every page (will be removed from new markup) */
.product-page .back-link { display: none !important; }

.product-hero {
    margin: 6px 0 20px;
}

.product-hero h1 {
    color: #1e4285;
    margin: 0 0 8px;
    line-height: 1.2;
}

.product-hero .subtitle {
    color: #2552a3;
    font-size: 1.05em;
    margin: 0;
}

/* Section rhythm inside product pages */
.product-page .section {
    margin: 28px 0;
}

.benefits-section h2,
.dosage-section h2,
.research-section h2,
.warning-box h3 {
    color: #1e4285;
}

.benefit-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin: 12px 0;
}

.benefit-content h3 {
    margin-top: 0;
    color: #2552a3;
}

.dosage-section {
    margin: 24px 0;
}

.dosage-section ul {
    padding-left: 20px;
}

.dosage-section li {
    margin: 8px 0;
    line-height: 1.6;
}

.warning-box {
    background: #fff8e1;
    border: 1px solid #ffe8a1;
    border-radius: 10px;
    padding: 16px;
    margin: 24px 0;
}

.cta-box {
    background: #f3f5f8;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    margin: 28px 0;
    text-align: center;
}

.cta-box .cta-button {
    display: inline-block;
    background-color: #ea6a4b;
    color: white;
    padding: 10px 18px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 700;
}

.cta-box .cta-button:hover {
    background-color: #d4553c;
}

.faq {
    max-width: 800px;
    margin: 20px auto 0;
    color: #1e1e1e;
}

/* Front page: use consistent light text tone instead of pure white */
.home-page .study-link,
.home-page .mobile-study-link,
.home-page .site-footer,
.home-page .grid-cell.active,
.home-page .response-btn,
.home-page #start-btn,
.home-page #pause-btn,
.home-page #reset-btn,
.home-page #speed-value,
.home-page #game-mode,
.home-page .supplement-select,
.home-page #game-mode:hover,
.home-page .supplement-select:hover,
.home-page #game-mode:focus,
.home-page .supplement-select:focus,
.home-page .instructions-toggle-btn,
.home-page .level-btn,
.home-page .instructions h3,
.home-page .instructions h4,
.home-page .instructions p,
.home-page .instructions-summary,
.home-page .instructions-list li,
.home-page .instructions kbd,
.home-page .play-now-btn,
.home-page .leaderboard-btn,
.home-page .supplements-toggle-btn,
.home-page .affiliate-button,
.home-page .location-filter-btn.active,
.home-page .cta-box .cta-button {
    color: #d6dbe5;
}

button,
button:hover:not(:disabled),
button:active:not(:disabled),
button:focus,
button:focus-visible,
button:disabled,
.study-link,
.study-link:hover,
.study-link:active,
.study-link:focus,
.study-link:focus-visible,
.mobile-study-link,
.mobile-study-link:hover,
.mobile-study-link:active,
.mobile-study-link:focus,
.mobile-study-link:focus-visible,
.play-now-btn,
.play-now-btn:hover,
.play-now-btn:active,
.play-now-btn:focus,
.play-now-btn:focus-visible,
.leaderboard-btn,
.leaderboard-btn:hover,
.leaderboard-btn:active,
.leaderboard-btn:focus,
.leaderboard-btn:focus-visible,
.affiliate-button,
.affiliate-button:hover,
.affiliate-button:active,
.affiliate-button:focus,
.affiliate-button:focus-visible,
.location-filter-btn,
.location-filter-btn:hover,
.location-filter-btn:active,
.location-filter-btn:focus,
.location-filter-btn:focus-visible,
.cta-box .cta-button,
.cta-box .cta-button:hover,
.cta-box .cta-button:active,
.cta-box .cta-button:focus,
.cta-box .cta-button:focus-visible {
    box-shadow: none !important;
}

#response-buttons .response-btn,
#response-buttons .response-btn:hover,
#response-buttons .response-btn:focus,
#response-buttons .response-btn:focus-visible,
#response-buttons .response-btn:disabled {
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1),
                0 4px 10px rgba(0, 0, 0, 0.14),
                0 2px 0 rgba(0, 0, 0, 0.1) !important;
}

#response-buttons .response-btn:active,
#response-buttons .response-btn.touch-active,
#response-buttons .response-btn.response-correct,
#response-buttons .response-btn.response-wrong,
#response-buttons .response-btn.touch-active:disabled,
#response-buttons .response-btn.response-correct:disabled,
#response-buttons .response-btn.response-wrong:disabled {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 6px rgba(0, 0, 0, 0.14),
                0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

.home-page #controls button,
.home-page .level-btn,
.home-page #level-up,
.home-page #level-down,
.home-page #trial-up,
.home-page #trial-down,
.home-page #start-btn,
.home-page #pause-btn,
.home-page #reset-btn {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24),
                inset 0 -1px 0 rgba(0, 0, 0, 0.16),
                0 5px 11px rgba(0, 0, 0, 0.18) !important;
}

.home-page #controls button:hover:not(:disabled),
.home-page .level-btn:hover:not(:disabled),
.home-page #level-up:hover:not(:disabled),
.home-page #level-down:hover:not(:disabled),
.home-page #trial-up:hover:not(:disabled),
.home-page #trial-down:hover:not(:disabled),
.home-page #start-btn:hover:not(:disabled),
.home-page #pause-btn:hover:not(:disabled),
.home-page #reset-btn:hover:not(:disabled) {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
                inset 0 -1px 0 rgba(0, 0, 0, 0.16),
                0 7px 15px rgba(0, 0, 0, 0.2) !important;
}

.home-page #controls button:active:not(:disabled),
.home-page .level-btn:active:not(:disabled),
.home-page #level-up:active:not(:disabled),
.home-page #level-down:active:not(:disabled),
.home-page #trial-up:active:not(:disabled),
.home-page #trial-down:active:not(:disabled),
.home-page #start-btn:active:not(:disabled),
.home-page #pause-btn:active:not(:disabled),
.home-page #reset-btn:active:not(:disabled) {
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.24),
                inset 0 -1px 0 rgba(255, 255, 255, 0.14),
                0 2px 5px rgba(0, 0, 0, 0.16) !important;
}

.faq details {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 10px 0;
    color: inherit;
    font-size: 1.05em;
    line-height: 1.6;
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: #1e1e1e;
    font-size: 1.2em;
}

.faq p,
.faq li {
    color: inherit;
    font-size: 1.05em;
}

/* Product-page supplement sections: brand background and full-bleed inner cards */
.product-page .benefits-section,
.product-page .research-section,
.product-page .dosage-section,
.product-page .warning-box,
.product-page .cta-box {
    background-color: #90E5FF;
    border: 1px solid #6dc9e2;
    border-radius: 14px;
    padding: 24px 20px;
    margin: 28px 0;
}

.product-page .benefit-item,
.product-page .research-item {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding-left: 0; /* keep compact inside panel */
}

.product-page .benefits-section h2,
.product-page .research-section h2,
.product-page .dosage-section h2,
.product-page .warning-box h3,
.product-page .cta-box h2 { color: #1e4285; }

.product-page .benefit-content p,
.product-page .research-item,
.product-page .dosage-section p,
.product-page .dosage-section li,
.product-page .warning-box p,
.product-page .warning-box li,
.product-page .cta-box p { color: #1e1e1e; }

@media (max-width: 640px) {
  .product-page .benefits-section,
  .product-page .research-section,
  .product-page .dosage-section,
  .product-page .warning-box,
  .product-page .cta-box { padding: 20px 16px; margin: 22px 0; }
}

.back-link {
    display: inline-block;
    margin: 0 0 8px 0;
    color: #2552a3;
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover { text-decoration: underline; }

/* Mobile adjustments for product pages */

/* Supplement guide section blocks unified background */
.supplement-page .supplement-section {
        background-color: #90E5FF;
        border: 1px solid #6dc9e2; /* subtle contrast border */
        border-radius: 14px;
        padding: 24px 20px;
        margin: 28px 0;
}

.supplement-page .supplement-section h2,
.supplement-page .supplement-section h3 { color: #1e4285; }

@media (max-width: 640px) {
    .supplement-page .supplement-section { padding: 20px 16px; margin: 22px 0; }
}

/* Inner cards adopt the same brand background (full-bleed look) */
.supplement-page .supplement-section .strategy-card,
.supplement-page .supplement-section .optimization-card,
.supplement-page .supplement-section .variation-item,
.supplement-page .supplement-section .indicator,
.supplement-page .supplement-section .plateau-item,
.supplement-page .supplement-section .level-guide,
.supplement-page .supplement-section .advanced-card,
.supplement-page .supplement-section .protocol-step,
.supplement-page .supplement-section .strategy-item,
.supplement-page .supplement-section .tracking-guide,
.supplement-page .supplement-section .progression-guide,
.supplement-page .supplement-section .advanced-intro {
        background-color: inherit !important;
        border: 0 !important;
        box-shadow: none !important;
}

/* Ensure text remains readable on brand background */
.supplement-page .supplement-section p,
.supplement-page .supplement-section li { color: #1e1e1e; }
@media (max-width: 640px) {
    .product-page { padding: 16px; }
    .product-hero h1 { font-size: 1.6em; }
    .product-hero .subtitle { font-size: 1em; }
}

/* ==============================
   Aniracetam guide specific microcomponents
   (moved from inline style to shared stylesheet)
   ============================== */

.eyebrow {
    display: inline-block;
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #F59E0B;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .85em;
    margin-bottom: 12px;
}

.at-a-glance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
    gap: 14px;
    margin: 24px 0 8px;
}

.glance-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
}

.glance-card h4 {
    margin: 0 0 6px;
    color: #2552a3;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: .8em;
}

.badge-low {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-limited {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fef3c7;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; }
}

.section h2 small {
    display: block;
    color: #6b7280;
    font-size: .7em;
    font-weight: 600;
    margin-top: 6px;
}

/* FAQ micro adjustments already covered by .faq styles */

/* ==============================
   Site-wide heading color override
   Enforce requested #1e1e1e for all H1/H2/H3 across pages
   ============================== */
h1, h2, h3 {
    color: #1e1e1e !important;
}
