/* ============================================
   HEXICON CONSOLIDATED STYLESHEET
   Universal CSS for all Hexicon pages
   ============================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&family=Roboto:wght@300;400;500;700&display=swap');

/* ============================================
   CSS RESET AND BASE STYLES
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* Color Theme */
    --bg-color: #1a1a2e;
    --hexagon-bg: #ffffff;
    --selected-hexagon: #ffd700;
    --hint-hexagon: #4caf50;
    --text-color: #e6e6e6;
    --header-color: #ffd700;
    --black-hexagon: #000000;
    --keyboard-bg: #ffffff;
    --keyboard-text: #000000;
    --completed-word: #6c757d;
    --modal-bg: rgba(0, 0, 0, 0.85);
    --button-primary: #4361ee;
    --button-text: #ffffff;
    --footer-bg: #16213e;
    --lightbulb-bg: #ffab00;
    --nav-bg: rgba(26, 26, 46, 0.95);
    --nav-border: rgba(255, 215, 0, 0.3);

    /* Cards and Sections */
    --card-bg: #2a2a4e;
    --card-border: rgba(255, 215, 0, 0.2);
    --section-bg: #222244;
    --filter-bg: #222244;

    /* Additional Colors */
    --accent-green: #4caf50;
    --accent-orange: #ff9800;
    --accent-red: #f44336;
    --shadow-dark: rgba(0, 0, 0, 0.3);

    /* Tutorial Specific */
    --tutorial-bg: #000000;
    --tutorial-text: #ffffff;
    --progress-bar-bg: #333333;
    --progress-bar-fill: #ffd700;
    --tooltip-bg: rgba(255, 215, 0, 0.9);
    --tooltip-text: #000000;
    --highlight-color: #ff3860;
}

/* ============================================
   UNIVERSAL NAVIGATION CSS - OVERRIDE ALL
   Copy this EXACT CSS to ALL three pages
   ============================================ */

/* Force consistent fonts - override any existing declarations */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&family=Roboto:wght@300;400;500;700&display=swap');

/* Navigation Container - Force consistent positioning */
.nav-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background-color: rgba(26, 26, 46, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3) !important;
    height: 64px !important;
    /* Consistent height */
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Navigation Inner Container - Force consistent layout */
.navigation {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 1.5rem !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Logo/Brand - Force exact same styling everywhere */
.nav-brand {
    font-family: 'Oswald', sans-serif !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #ffd700 !important;
    text-decoration: none !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    transition: opacity 0.2s ease !important;
}

.nav-brand:hover {
    color: #ffd700 !important;
    opacity: 0.8 !important;
    text-decoration: none !important;
}

/* Navigation Links Container - Force consistent layout */
.nav-links {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
}

.nav-links li {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Navigation Links - Force exact same styling */
.nav-link {
    color: #e6e6e6 !important;
    text-decoration: none !important;
    padding: 0.7rem 1.3rem !important;
    border-radius: 22px !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    font-family: 'Roboto', sans-serif !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    box-sizing: border-box !important;
    border: none !important;
    background: transparent !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* Default hover state - Force consistency */
.nav-link:hover {
    color: #ffd700 !important;
    background-color: rgba(255, 215, 0, 0.1) !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

/* Active page indicator - GOLD background, dark text */
.nav-link.active {
    color: #1a1a2e !important;
    background-color: #ffd700 !important;
    font-weight: 600 !important;
    transform: none !important;
}

.nav-link.active:hover {
    color: #1a1a2e !important;
    background-color: #ffd700 !important;
    opacity: 0.9 !important;
    transform: none !important;
}

/* Tutorial button special styling - ONLY when not active */
.nav-link.tutorial:not(.active) {
    background-color: #4361ee !important;
    color: #ffffff !important;
}

.nav-link.tutorial:not(.active):hover {
    background-color: #3355cc !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* Auth button styling */
.auth-button {
    cursor: pointer !important;
}

/* Mobile hamburger menu - Force consistent styling */
.nav-toggle {
    display: none !important;
    background: none !important;
    border: none !important;
    color: #e6e6e6 !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    font-family: monospace !important;
}

.nav-toggle:hover {
    background-color: rgba(255, 215, 0, 0.1) !important;
    color: #ffd700 !important;
}

/* User info styling */
.user-name {
    font-size: 0.9rem !important;
    opacity: 0.9 !important;
}

/* Mobile Responsive - Force exact same behavior */
@media (max-width: 1024px) {
    .nav-toggle {
        display: flex !important;
    }

    .nav-links {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background-color: rgba(26, 26, 46, 0.98) !important;
        flex-direction: column !important;
        padding: 1rem !important;
        border-bottom: 1px solid rgba(255, 215, 0, 0.3) !important;
        gap: 0.75rem !important;
        height: auto !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
        backdrop-filter: blur(10px) !important;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links li {
        width: 100% !important;
        height: auto !important;
    }

    .nav-link {
        width: 100% !important;
        text-align: center !important;
        padding: 1rem !important;
        justify-content: center !important;
        height: 48px !important;
        font-size: 1rem !important;
    }

    .navigation {
        padding: 0 1rem !important;
    }

    .nav-brand {
        font-size: 1.4rem !important;
    }
}

/* Force content spacing - Apply to main containers */
.main-content,
.content-container {
    margin-top: 60px;
    padding-top: 0;
}

/* Special handling for tutorial page layout */
.tutorial-container {
    margin-top: 0;
    /* Tutorial content already has margin-top from content-container */
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Main Container */
.content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    width: 100%;
    padding: 5px 0 10px 0;
    position: relative;
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
    gap: 5px;
    margin-top: 60px;
}

/* Header & Game Stats Layout */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    width: 100%;
}

/* Game Title */
.game-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--header-color);
    margin: 0 0 0.1rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Back Button */
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--button-primary);
    color: var(--text-color);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-button:hover {
    background-color: #3355cc;
}

/* Game Subtitle for Tutorial */
.game-subtitle {
    font-size: 1rem;
    text-align: center;
    margin-top: 0;
    color: var(--text-color);
}

/* Performance display styling */
.difficulty-display {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: var(--header-color);
    margin: 0.1rem 0 0.3rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.difficulty-stars {
    font-size: 1rem;
    letter-spacing: 1px;
}

.difficulty-label {
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Word List Container */
.word-list-container {
    text-align: center;
    margin-bottom: 3px;
    width: 100%;
    max-width: 800px;
}

.word-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    color: var(--text-color);
    text-transform: uppercase;
    margin: 0;
}

.word-list span {
    margin: 0 5px;
    transition: all 0.3s ease;
    position: relative;
    padding: 0 3px;
}

/* Completed Word Animation */
.word-complete {
    animation: wordComplete 1s ease;
}

@keyframes wordComplete {
    0% {
        transform: scale(1);
        color: var(--text-color);
    }

    50% {
        transform: scale(1.2);
        color: var(--header-color);
    }

    100% {
        transform: scale(1);
        color: var(--completed-word);
    }
}

/* ============================================
   MAIN GAME HEXAGON GRID (Default)
   ============================================ */

/* Hexagon Grid */
.hexagon-container {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: 400px;
    margin: 0 auto 10px;
    /* Reduced from 20px to 10px */
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    left: 0;
}

/* Individual Hexagon */
.hexagon {
    width: 78px;
    height: 67.5px;
    /* Height = width * 0.866 to maintain aspect ratio */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    transform: rotate(30deg);
    transition: transform 0.2s ease, background-color 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    background-color: var(--hexagon-bg);
}

.hexagon:hover:not([data-locked="true"]) {
    transform: rotate(30deg) scale(1.05);
}

.hexagon span {
    font-size: 2.5rem;
    color: #333;
    font-family: 'Oswald', sans-serif;
    font-weight: bold;
    transform: rotate(-30deg);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Black Hexagons */
.hexagon.black {
    background-color: var(--black-hexagon);
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
}

/* Remove the problematic center hexagon */
#hex0 {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    width: 0;
    height: 0;
    position: absolute;
    top: -9999px;
    left: -9999px;
    z-index: -100;
}

/* Main Game Hexagon layout with tight spacing */
/* Row 1 - Top Row */
#hex1 {
    left: 50px;
    top: 35px;
}

#hex2 {
    left: 122px;
    top: 35px;
}

#hex3 {
    left: 194px;
    top: 35px;
}

#hex4 {
    left: 266px;
    top: 35px;
}

#hex5 {
    left: 338px;
    top: 35px;
}

#hex6 {
    left: 410px;
    top: 35px;
}

/* Row 2 */
#hex7 {
    left: 14px;
    top: 97px;
}

#hex27 {
    left: 86px;
    top: 97px;
}

/* Black hexagon */
#hex8 {
    left: 158px;
    top: 97px;
}

#hex28 {
    left: 230px;
    top: 97px;
}

/* Black hexagon */
#hex9 {
    left: 302px;
    top: 97px;
}

#hex29 {
    left: 374px;
    top: 97px;
}

/* Black hexagon */
#hex10 {
    left: 446px;
    top: 97px;
}

/* Row 3 */
#hex11 {
    left: 50px;
    top: 159px;
}

#hex12 {
    left: 122px;
    top: 159px;
}

#hex13 {
    left: 194px;
    top: 159px;
}

#hex14 {
    left: 266px;
    top: 159px;
}

#hex15 {
    left: 338px;
    top: 159px;
}

#hex16 {
    left: 410px;
    top: 159px;
}

/* Row 4 */
#hex17 {
    left: 14px;
    top: 221px;
}

#hex30 {
    left: 86px;
    top: 221px;
}

/* Black hexagon */
#hex18 {
    left: 158px;
    top: 221px;
}

#hex31 {
    left: 230px;
    top: 221px;
}

/* Black hexagon */
#hex19 {
    left: 302px;
    top: 221px;
}

#hex32 {
    left: 374px;
    top: 221px;
}

/* Black hexagon */
#hex20 {
    left: 446px;
    top: 221px;
}

/* Row 5 - Bottom Row */
#hex21 {
    left: 50px;
    top: 283px;
}

#hex22 {
    left: 122px;
    top: 283px;
}

#hex23 {
    left: 194px;
    top: 283px;
}

#hex24 {
    left: 266px;
    top: 283px;
}

#hex25 {
    left: 338px;
    top: 283px;
}

#hex26 {
    left: 410px;
    top: 283px;
}

/* ============================================
   TUTORIAL PAGE SPECIFIC STYLES
   ============================================ */

/* Tutorial Page Body Override */
.tutorial-page .content-container {
    margin-top: 60px;
}

/* Progress Bar for Tutorial */
.progress-container {
    width: 80%;
    max-width: 400px;
    height: 8px;
    background-color: var(--progress-bar-bg);
    border-radius: 4px;
    margin: 10px auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--progress-bar-fill);
    width: 8.33%; /* Start at first step (1/12) */
    transition: width 0.3s ease;
}

/* Tutorial Layout */
.tutorial-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Game Board Section for Tutorial */
.game-section {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hint Counter for Tutorial */
.hint-counter {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    color: var(--header-color);
    margin-bottom: 20px;
}

/* Tutorial Panel */
.tutorial-panel {
    flex: 0 0 45%;
    background-color: var(--tutorial-bg);
    color: var(--tutorial-text);
    border-radius: 10px;
    padding: 20px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tutorial-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--header-color);
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tutorial-content {
    flex-grow: 1;
}

.tutorial-content p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
    color: var(--tutorial-text);
}

.tutorial-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--header-color);
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tutorial-word {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--header-color);
    margin: 10px 0;
}

.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.nav-button {
    background-color: var(--button-primary);
    color: var(--button-text);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.nav-button:hover {
    background-color: #3355cc;
}

.nav-button:disabled {
    background-color: #888;
    cursor: not-allowed;
}

/* Tutorial Hexagon Grid - Smaller than main game */
.tutorial-hexagon-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 300px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
}

/* Tutorial Individual Hexagon - Smaller than main game */
.tutorial-hexagon {
    width: 55px;
    height: 47.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    transform: rotate(30deg);
    transition: transform 0.2s ease, background-color 0.2s ease;
    user-select: none;
    background-color: var(--hexagon-bg);
}

.tutorial-hexagon:hover:not([data-locked="true"]) {
    transform: rotate(30deg) scale(1.05);
}

.tutorial-hexagon span {
    font-size: 1.8rem;
    color: #333;
    font-family: 'Oswald', sans-serif;
    font-weight: bold;
    transform: rotate(-30deg);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Tutorial Black Hexagons */
.tutorial-hexagon.black {
    background-color: var(--black-hexagon);
    pointer-events: none;
}

/* Tutorial Hexagon highlighting */
.tutorial-hexagon.highlight {
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    z-index: 10;
}

.selected-tutorial-hex {
    background-color: yellow !important;
    z-index: 200 !important;
}

@keyframes errorPulse {
    0% {
        box-shadow: 0 0 5px 2px rgba(255, 0, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 15px 5px rgba(255, 0, 0, 0.8);
    }
    100% {
        box-shadow: 0 0 5px 2px rgba(255, 0, 0, 0.6);
    }
}

.tutorial-hexagon.error-highlight {
    animation: errorPulse 1s infinite;
    z-index: 50;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Tutorial Hexagon Layout - Smaller Grid for Tutorial */
.tutorial-hexagon-container #hex1 { left: 30px; top: 25px; }
.tutorial-hexagon-container #hex2 { left: 83px; top: 25px; }
.tutorial-hexagon-container #hex3 { left: 136px; top: 25px; }
.tutorial-hexagon-container #hex4 { left: 189px; top: 25px; }
.tutorial-hexagon-container #hex5 { left: 242px; top: 25px; }
.tutorial-hexagon-container #hex6 { left: 295px; top: 25px; }

.tutorial-hexagon-container #hex7 { left: 5px; top: 71px; }
.tutorial-hexagon-container #hex27 { left: 58px; top: 71px; }
.tutorial-hexagon-container #hex8 { left: 111px; top: 71px; }
.tutorial-hexagon-container #hex28 { left: 164px; top: 71px; }
.tutorial-hexagon-container #hex9 { left: 217px; top: 71px; }
.tutorial-hexagon-container #hex29 { left: 270px; top: 71px; }
.tutorial-hexagon-container #hex10 { left: 323px; top: 71px; }

.tutorial-hexagon-container #hex11 { left: 30px; top: 117px; }
.tutorial-hexagon-container #hex12 { left: 83px; top: 117px; }
.tutorial-hexagon-container #hex13 { left: 136px; top: 117px; }
.tutorial-hexagon-container #hex14 { left: 189px; top: 117px; }
.tutorial-hexagon-container #hex15 { left: 242px; top: 117px; }
.tutorial-hexagon-container #hex16 { left: 295px; top: 117px; }

.tutorial-hexagon-container #hex17 { left: 5px; top: 163px; }
.tutorial-hexagon-container #hex30 { left: 58px; top: 163px; }
.tutorial-hexagon-container #hex18 { left: 111px; top: 163px; }
.tutorial-hexagon-container #hex31 { left: 164px; top: 163px; }
.tutorial-hexagon-container #hex19 { left: 217px; top: 163px; }
.tutorial-hexagon-container #hex32 { left: 270px; top: 163px; }
.tutorial-hexagon-container #hex20 { left: 323px; top: 163px; }

.tutorial-hexagon-container #hex21 { left: 30px; top: 209px; }
.tutorial-hexagon-container #hex22 { left: 83px; top: 209px; }
.tutorial-hexagon-container #hex23 { left: 136px; top: 209px; }
.tutorial-hexagon-container #hex24 { left: 189px; top: 209px; }
.tutorial-hexagon-container #hex25 { left: 242px; top: 209px; }
.tutorial-hexagon-container #hex26 { left: 295px; top: 209px; }

/* Tutorial Hexagon Sizing - Override default hexagon size when in tutorial container */
.tutorial-hexagon-container .hexagon {
    width: 55px;
    height: 47.5px;
}

.tutorial-hexagon-container .hexagon span {
    font-size: 1.8rem;
}

/* Tutorial Virtual Keyboard - Override default keyboard size when in tutorial */
.tutorial-page .virtual-keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
    max-width: 400px;
    transform-origin: center top;
    position: relative;
    z-index: 10;
}

.tutorial-page .virtual-keyboard .keyboard-row {
    display: flex;
    justify-content: center;
    gap: 3px;
}

.tutorial-page .virtual-keyboard button {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    background-color: var(--keyboard-bg);
    color: var(--keyboard-text);
    border: none;
    border-radius: 5px;
    font-family: 'Oswald', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.tutorial-page .virtual-keyboard button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
}

.tutorial-page .virtual-keyboard button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Tutorial Lightbulb Button */
.tutorial-page .virtual-keyboard .lightbulb-button {
    background-color: var(--lightbulb-bg) !important;
    color: #000000 !important;
    font-size: 1.2rem !important;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3) !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative;
}

.tutorial-page .virtual-keyboard .lightbulb-button.available {
    animation: pulse-glow 1.5s infinite;
}

/* Highlight Animation for Shared Letters */
@keyframes highlightLetter {
    0% {
        transform: rotate(-30deg) scale(1);
    }
    50% {
        transform: rotate(-30deg) scale(1.2);
        color: var(--highlight-color);
    }
    100% {
        transform: rotate(-30deg) scale(1);
    }
}

.highlight-letter {
    animation: highlightLetter 1s ease;
}

@keyframes highlightLetterPersistent {
    0% {
        transform: rotate(-30deg) scale(1);
        color: #333;
    }
    50% {
        transform: rotate(-30deg) scale(1.2);
        color: #ff3860;
    }
    100% {
        transform: rotate(-30deg) scale(1);
        color: #333;
    }
}

.highlight-letter-persistent {
    animation: highlightLetterPersistent 1.5s ease infinite;
}

.letter-animation {
    animation: placeLetter 0.5s ease-out;
}

@keyframes placeLetter {
    0% {
        transform: rotate(-30deg) scale(0);
        opacity: 0;
    }
    70% {
        transform: rotate(-30deg) scale(1.2);
    }
    100% {
        transform: rotate(-30deg) scale(1);
        opacity: 1;
    }
}

/* Tooltip Styles for Tutorial */
.tooltip {
    position: absolute;
    background-color: #ffd700;
    color: #000000;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9rem;
    z-index: 1000;
    max-width: 200px;
    text-align: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    animation: fadeIn 0.3s;
    font-weight: bold;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tooltip::before {
    content: '';
    position: absolute;
    border-width: 6px;
    border-style: solid;
}

.tooltip.top::before {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-color: var(--tooltip-bg) transparent transparent transparent;
}

.tooltip.bottom::before {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-color: transparent transparent var(--tooltip-bg) transparent;
}

.tooltip.left::before {
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-color: transparent transparent transparent var(--tooltip-bg);
}

.tooltip.right::before {
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-color: transparent var(--tooltip-bg) transparent transparent;
}

.tooltip.custom-hex6::before {
    content: '';
    position: absolute;
    bottom: 10px;
    left: -12px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent var(--tooltip-bg) transparent transparent;
}

.tooltip.custom-hex6-mobile::before {
    content: '';
    position: absolute;
    top: 10px;
    right: -12px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent var(--tooltip-bg);
}

/* Media Queries for Tutorial Responsiveness */
@media screen and (max-width: 992px) {
    .tutorial-container {
        flex-direction: column;
        align-items: center;
    }

    .game-section,
    .tutorial-panel {
        flex: 0 0 100%;
        width: 100%;
        max-width: 500px;
        margin-bottom: 20px;
    }

    .tutorial-panel {
        min-height: 300px;
    }
}

@media screen and (max-width: 600px) {
    .game-title {
        font-size: 1.8rem;
    }

    .back-button {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .tutorial-hexagon-container .hexagon {
        width: 45px;
        height: 39px;
    }

    .tutorial-hexagon-container .hexagon span {
        font-size: 1.5rem;
    }

    .tutorial-page .virtual-keyboard button {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .tutorial-title {
        font-size: 1.5rem;
    }

    .tutorial-content p {
        font-size: 0.9rem;
    }

    .tutorial-word {
        font-size: 1.3rem;
    }

    .nav-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .tutorial-hexagon-container .hexagon:not([style*="pointer-events: none"]):not(.black) {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    }

    .tutorial-page .virtual-keyboard button:not([disabled]) {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    }
}

/* ============================================
   MAIN GAME VIRTUAL KEYBOARD
   ============================================ */

/* Virtual Keyboard - Positioned closer to hexagons */
.virtual-keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0;
    gap: 3px;
    width: 100%;
    max-width: 800px;
    transform-origin: center top;
    position: relative;
    z-index: 10;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 3px;
}

.virtual-keyboard button {
    width: 42px;
    height: 42px;
    font-size: 1.5rem;
    background-color: var(--keyboard-bg);
    color: var(--keyboard-text);
    border: none;
    border-radius: 5px;
    font-family: 'Oswald', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    /* Added to center content */
    justify-content: center;
    /* Added to center content */
    align-items: center;
    /* Added to center content */
}

.virtual-keyboard button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
}

.virtual-keyboard button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Improved Lightbulb Button */
.lightbulb-button {
    background-color: var(--lightbulb-bg) !important;
    /* Warmer, more visible background */
    color: #000000 !important;
    font-size: 1.5rem !important;
    /* Reduced from 1.8rem to better fit */
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.7) !important;
    /* Add subtle glow to lightbulb */
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3) !important;
    /* Enhanced shadow */
    padding: 0 !important;
    /* Ensure padding doesn't push content out */
    overflow: hidden !important;
    /* Prevent overflow */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative;
}

/* Animation for pulsing glow when hint is available */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 171, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 171, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 171, 0, 0);
    }
}

/* Style for when hint is available */
.lightbulb-button.available {
    animation: pulse-glow 1.5s infinite;
}

/* Style for when hint is not available */
.lightbulb-button.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Timer overlay for countdown animation */
.lightbulb-button .timer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    clip-path: circle(0% at center);
    transition: clip-path 30s linear;
    pointer-events: none;
    z-index: 2;
}

/* Increase the contrast and make the animation more visible */
.lightbulb-button.counting {
    opacity: 0.6;
}

.lightbulb-button.counting .timer-overlay {
    clip-path: circle(100% at center);
    background-color: var(--lightbulb-bg);
}

/* Alternative version with numerical countdown */
.lightbulb-button .countdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    font-size: 1.2rem;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
}

.lightbulb-button.counting .countdown {
    opacity: 1;
}

/* Game controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 5px;
}

.control-button {
    background-color: var(--button-primary);
    color: var(--button-text);
    border: none;
    padding: 8px 20px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
}

.control-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* Help Button */
.help-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-color);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-button:hover {
    color: var(--header-color);
    border-color: var(--header-color);
}

/* Timer display */
#game-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 0;
    width: 100%;
}

.timer-display,
.hint-count {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    /* Match the size of timer-display */
    color: var(--header-color);
    font-weight: 700;
}

/* Date indicator */
#date-indicator {
    font-size: 0.9rem;
    color: var(--header-color);
    opacity: 0.8;
    text-align: center;
    margin-top: 5px;
}

/* Animation for timer when time penalty is added */
@keyframes pulse-timer {
    0% {
        transform: scale(1);
        color: var(--header-color);
    }

    50% {
        transform: scale(1.1);
        color: #ff5252;
        /* Red flash to indicate penalty */
    }

    100% {
        transform: scale(1);
        color: var(--header-color);
    }
}

.pulse-timer {
    animation: pulse-timer 1s ease;
}

/* Reset Game button styling */
#resetGameButton {
    background-color: #ff3333;
    /* Red background */
    color: white;
}

#resetGameButton:hover {
    background-color: #cc0000;
    /* Darker red on hover */
}

/* Footer */
footer {
    text-align: center;
    padding: 0.4rem;
    background-color: var(--footer-bg);
    color: var(--text-color);
    width: 100%;
    font-size: 0.9rem;
    margin-top: auto;
}

footer a {
    color: var(--header-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ============================================
   MODAL STYLES
   ============================================ */

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    position: relative;
    animation: modalAppear 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@keyframes modalAppear {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1010;
    /* Ensure it's above other content */
}

.modal-close:hover {
    background-color: #d32f2f;
    transform: scale(1.05);
}

/* Ensure modal appears above everything */
#completionModal {
    z-index: 2000;
}

/* Tutorial Modal */
.tutorial-content {
    padding: 30px;
    color: #333;
}

.tutorial-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--bg-color);
}

.tutorial-section {
    margin-bottom: 25px;
}

.tutorial-section h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--bg-color);
}

.tutorial-content p {
    color: #333 !important;
    line-height: 1.6;
}

.tutorial-content ol {
    color: #333 !important;
}

.tutorial-content ol li {
    color: #333 !important;
    margin-bottom: 5px;
}

.tutorial-content ul {
    color: #333 !important;
}

.tutorial-content ul li {
    color: #333 !important;
    margin-bottom: 3px;
}







/* Completion Modal */
.completion-content {
    padding: 30px;
    text-align: center;
    color: #333;
     max-width: 600px;
    margin: 0 auto;
    /* Dark text color for better contrast */
}

/* Score and time display */
#finalScore,
#completionTime {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #333;
    margin: 10px 0;
}

/* Share section heading */
.completion-content h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    color: #333;
    margin: 25px 0 15px;
}

.completion-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    color: #4361ee;
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
    animation: celebrationPulse 2s infinite;
}

@keyframes celebrationPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.share-preview {
    margin-top: 15px;
    background-color: #f8f8f8;
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
    white-space: pre-wrap;
    color: #333;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 14px;
    width: 100%;
    max-width: 300px;
    margin: 15px auto;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.share-button {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.twitter {
    background-color: #1DA1F2;
    color: white;
}

.facebook {
    background-color: #4267B2;
    color: white;
}

.whatsapp {
    background-color: #25D366;
    color: white;
}

.copy {
    background-color: #10b981;
    color: white;
}

#completionVisual {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 20px auto;
    width: fit-content;
}

.visual-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.visual-cell {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin: 2px;
    flex-shrink: 0;
}

.hint-cell {
    background-color: #4caf50;
}

.filled-cell {
    background-color: #ffa500;
}

.empty-cell {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
}

.completion-results {
    margin: 15px auto;
    width: fit-content;
}

/* Calendar Modal Styles */
.calendar-content {
    padding: 30px;
    color: #333;
}

.calendar-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--bg-color);
}

.calendar-month {
    margin-bottom: 20px;
}

.calendar-month h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--bg-color);
}

.calendar-days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.calendar-day {
    width: 40px;
    height: 40px;
    background-color: var(--button-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* Sign-in modal styles */
.sign-in-modal .modal-content {
    max-width: 600px;
}

.sign-in-content {
    padding: 30px;
    text-align: center;
    color: #333;
}

.sign-in-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--bg-color);
}

.sign-in-content ul {
    text-align: left;
    margin: 20px auto;
    max-width: 300px;
}

.sign-in-content li {
    margin-bottom: 8px;
    color: #333;
}

/* ============================================
   AUTHENTICATION STYLES
   ============================================ */

/* Authentication button styles - Higher specificity */
.nav-links .auth-button {
    background-color: #4285f4 !important;
    color: white !important;
    border: none !important;
    padding: 0.7rem 1.3rem !important;
    border-radius: 22px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.nav-links .auth-button:hover {
    background-color: #3367d6 !important;
    transform: translateY(-1px) !important;
}

/* Force authentication button visibility control with higher specificity */
.nav-links li#signInButton[style*="display: none"] {
    display: none !important;
}

.nav-links li#signInButton[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
}

.nav-links li#signOutButton[style*="display: none"] {
    display: none !important;
}

.nav-links li#signOutButton[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
}

.nav-links li#userInfo[style*="display: none"] {
    display: none !important;
}

.nav-links li#userInfo[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
}

/* User name styling - Updated for Player's Dashboard */
.nav-links .user-name {
    color: #ffd700 !important; /* Changed from #4caf50 (green) to #ffd700 (yellow) */
    font-weight: 600 !important;
    max-width: 200px !important; /* Increased from 150px to accommodate "Player's Dashboard" text */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    background: transparent !important;
    border: 1px solid #ffd700 !important; /* Updated border to match new color */
    cursor: default !important;
    padding: 0.7rem 1.3rem !important; /* Added padding to match other nav elements */
    border-radius: 22px !important; /* Added border radius to match nav styling */
    transition: all 0.2s ease !important; /* Added transition for smooth hover */
}

/* User name hover state */
.nav-links .user-name:hover {
    background-color: rgba(255, 215, 0, 0.1) !important; /* Yellow tint on hover */
    transform: translateY(-1px) !important; /* Subtle lift on hover */
}

/* Prevent nav-link styles from overriding auth buttons */
.nav-links .auth-button.nav-link {
    background-color: #4285f4 !important;
    color: white !important;
}

.nav-links .auth-button.nav-link:hover {
    background-color: #3367d6 !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

/* Ensure proper spacing and layout */
.nav-links li {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .nav-links .auth-button {
        width: 100% !important;
        text-align: center !important;
        padding: 1rem !important;
        justify-content: center !important;
        height: 48px !important;
        font-size: 1rem !important;
    }

     .nav-links .user-name {
        color: #ffd700 !important; /* Ensure yellow color on mobile */
        border: 1px solid #ffd700 !important; /* Yellow border on mobile */
        max-width: none !important;
        width: 100% !important;
        text-align: center !important;
        padding: 1rem !important;
        height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 22px !important; /* Consistent border radius */
        background: transparent !important;
        box-sizing: border-box !important;
    }
    
    .nav-links .user-name:hover {
        background-color: rgba(255, 215, 0, 0.1) !important; /* Yellow hover on mobile */
    }
}

/* ============================================
   PRIVACY PAGE STYLES 
   ============================================ */

/* Main content container for privacy page */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: calc(100vh - 120px);
    /* Account for nav and footer */
}

.main-content h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: var(--header-color);
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.main-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: var(--header-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--header-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-content h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    color: var(--header-color);
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.main-content p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color);
}

.main-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.main-content li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.main-content strong {
    color: var(--header-color);
    font-weight: 600;
}

/* Contact info section styling */
.contact-info {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    border: 1px solid var(--card-border);
}

.contact-info h2,
.contact-info h3 {
    color: var(--header-color);
    margin-top: 1.5rem;
}

.contact-info h2:first-child {
    margin-top: 0;
}

.contact-info p {
    color: var(--text-color);
}

/* Last updated section */
.last-updated {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    font-style: italic;
    color: rgba(230, 230, 230, 0.7);
}

/* Mobile responsive for privacy page */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
        margin-top: 80px;
        /* Extra space for mobile nav */
    }

    .main-content h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .main-content h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    .main-content h3 {
        font-size: 1.2rem;
        margin-top: 1.5rem;
    }

    .contact-info {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .main-content ul {
        padding-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.8rem;
    }

    .main-content h1 {
        font-size: 1.8rem;
    }

    .main-content h2 {
        font-size: 1.3rem;
    }

    .main-content h3 {
        font-size: 1.1rem;
    }

    .contact-info {
        padding: 1rem;
    }
}

/* ============================================
   ABOUT PAGE STYLES
   ============================================ */

/* About page specific variables and gradients */
:root {
    --about-gradient-primary: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(255, 215, 0, 0.1));
}

/* About Content Container */
.about-content-container {
    margin-top: 64px;
    padding: 2rem 0;
    min-height: calc(100vh - 64px);
    background-color: var(--bg-color);
}

/* About-specific container */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.about-hero-section {
    text-align: center;
    padding: 4rem 0;
    background: var(--about-gradient-primary);
    margin-bottom: 3rem;
}

.about-hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--header-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.about-hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* Content Sections */
.about-content-section {
    margin-bottom: 4rem;
}

.about-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: var(--header-color);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Story Section */
.about-story-section {
    background-color: var(--section-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 4rem;
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.about-story-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

.about-story-content p {
    margin-bottom: 1.5rem;
}

.about-highlight-text {
    color: var(--header-color);
    font-weight: 600;
}

/* Creator Section */
.about-creator-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-creator-image {
    text-align: center;
}

.about-creator-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 25px var(--shadow-dark);
    border: 4px solid var(--header-color);
}

.about-creator-avatar-icon {
    font-size: 4rem;
    color: var(--header-color);
}

.about-creator-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: var(--header-color);
    margin-bottom: 0.5rem;
}

.about-creator-title {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.8;
}

.about-creator-bio {
    font-size: 1.1rem;
    line-height: 1.7;
}

.about-creator-bio p {
    margin-bottom: 1.5rem;
}

/* Stats Grid */
.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.about-stat-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-dark);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease;
}

.about-stat-card:hover {
    transform: translateY(-5px);
}

.about-stat-number {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: var(--header-color);
    display: block;
    margin-bottom: 0.5rem;
}

.about-stat-label {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Contact Section */
.about-contact-section {
    background-color: var(--section-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.about-contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.about-contact-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.about-contact-card:hover {
    transform: translateY(-3px);
    border-color: var(--header-color);
}

.about-contact-icon {
    font-size: 2.5rem;
    color: var(--header-color);
    margin-bottom: 1rem;
}

.about-contact-method {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: var(--header-color);
    margin-bottom: 0.5rem;
}

.about-contact-details {
    color: var(--text-color);
    font-size: 1rem;
}

.about-contact-link {
    color: var(--header-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.about-contact-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Technology Section */
.about-tech-section {
    margin-bottom: 4rem;
}

.about-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-tech-item {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.about-tech-item:hover {
    transform: translateY(-3px);
    border-color: var(--header-color);
}

.about-tech-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--header-color);
}

.about-tech-name {
    font-weight: 600;
    color: var(--text-color);
}

/* Call to Action */
.about-cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--about-gradient-primary);
    border-radius: 20px;
    margin-bottom: 3rem;
}

.about-cta-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: var(--header-color);
    margin-bottom: 1rem;
}

.about-cta-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.about-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.about-cta-button {
    background-color: var(--button-primary);
    color: var(--button-text);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.about-cta-button:hover {
    background-color: #3355cc;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.about-cta-button.about-secondary {
    background-color: transparent;
    border: 2px solid var(--header-color);
    color: var(--header-color);
}

.about-cta-button.about-secondary:hover {
    background-color: var(--header-color);
    color: var(--bg-color);
}

/* Footer */
.about-footer {
    background-color: var(--section-bg);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.about-footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-footer-text {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.about-footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.about-footer-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.about-footer-link:hover {
    color: var(--header-color);
}

/* Mobile Responsive for About Page */
@media (max-width: 992px) {
    .about-creator-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .about-hero-title {
        font-size: 2.5rem;
    }

    .about-section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .about-hero-title {
        font-size: 2rem;
    }

    .about-hero-subtitle {
        font-size: 1.1rem;
    }

    .about-story-section,
    .about-contact-section {
        padding: 2rem 1rem;
    }

    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .about-contact-methods {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .about-tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .about-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .about-hero-title {
        font-size: 1.8rem;
    }

    .about-creator-avatar {
        width: 150px;
        height: 150px;
    }

    .about-creator-avatar-icon {
        font-size: 3rem;
    }

    .about-stats-grid {
        grid-template-columns: 1fr;
    }

    .about-tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   SHOP PAGE STYLES
   ============================================ */

/* Shop Content Container */
.shop-content-container {
    margin-top: 64px;
    padding: 2rem 0;
    min-height: calc(100vh - 64px);
    background-color: var(--bg-color);
}

/* Shop-specific container */
.shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.shop-hero-section {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(255, 215, 0, 0.1));
    margin-bottom: 3rem;
}

.shop-hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--header-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.shop-hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.shop-hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.shop-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.shop-feature-icon {
    font-size: 1.2rem;
}

/* Filter Section */
.shop-filter-section {
    background-color: var(--filter-bg);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px var(--shadow-dark);
}

.shop-filter-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: var(--header-color);
    margin-bottom: 1rem;
    text-align: center;
}

.shop-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.shop-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shop-filter-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.shop-filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-filter-select:focus {
    outline: none;
    border-color: var(--header-color);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.shop-clear-filters {
    background-color: var(--button-primary);
    color: var(--button-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.shop-clear-filters:hover {
    background-color: #3355cc;
    transform: translateY(-1px);
}

/* Books Grid */
.shop-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Book Card */
.shop-book-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px var(--shadow-dark);
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    position: relative;
}

.shop-book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow-dark);
    border-color: var(--header-color);
}

.shop-book-image {
    position: relative;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.shop-book-cover {
    width: 180px;
    height: 220px;
    background-color: var(--bg-color);
    border-radius: 8px;
    border: 3px solid var(--header-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.shop-cover-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    color: var(--header-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.shop-cover-subtitle {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.8;
}

.shop-difficulty-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.shop-difficulty-beginner {
    background-color: var(--accent-green);
    color: white;
}

.shop-difficulty-intermediate {
    background-color: var(--accent-orange);
    color: white;
}

.shop-difficulty-advanced {
    background-color: var(--accent-red);
    color: white;
}

.shop-book-content {
    padding: 1.5rem;
}

.shop-book-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    color: var(--header-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.shop-book-description {
    color: var(--text-color);
    margin-bottom: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.shop-book-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.shop-feature-tag {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--header-color);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.shop-book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.shop-puzzle-count {
    font-weight: 600;
    color: var(--text-color);
}

.shop-book-price {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: var(--header-color);
    font-weight: 700;
}

.shop-buy-button {
    width: 100%;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
}

.shop-buy-button:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 124, 0, 0.4);
    text-decoration: none;
    color: white;
}

.shop-amazon-logo {
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* No Results */
.shop-no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-color);
    opacity: 0.7;
}

.shop-no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.shop-no-results h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--header-color);
    margin-bottom: 0.5rem;
}

/* Footer */
.shop-footer {
    background-color: var(--filter-bg);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.shop-footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.shop-footer-title {
    font-family: 'Oswald', sans-serif;
    color: var(--header-color);
    margin-bottom: 1rem;
}

.shop-footer-text {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.shop-footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.shop-footer-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.shop-footer-link:hover {
    color: var(--header-color);
}

/* Mobile Responsive for Shop Page */
@media (max-width: 768px) {
    .shop-hero-title {
        font-size: 2.2rem;
    }

    .shop-hero-subtitle {
        font-size: 1rem;
    }

    .shop-hero-features {
        gap: 1rem;
    }

    .shop-books-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .shop-filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-filter-group {
        width: 100%;
    }

    .shop-book-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .shop-container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .shop-hero-title {
        font-size: 1.8rem;
    }

    .shop-book-card {
        margin: 0 0.5rem;
    }

    .shop-filter-section {
        margin: 0 0.5rem 2rem;
    }

    .shop-feature-item {
        font-size: 0.9rem;
    }

    .shop-book-cover {
        width: 160px;
        height: 200px;
    }

    .shop-cover-title {
        font-size: 1rem;
    }

    .shop-book-content {
        padding: 1rem;
    }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Media Queries for Responsiveness */
@media screen and (max-width: 1200px) {
    .hexagon-container {
        transform: scale(0.9);
    }
}

@media screen and (max-width: 992px) {
    .hexagon-container {
        transform: scale(0.85);
        margin-bottom: 40px;
    }

    .virtual-keyboard button {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    /* Adjust lightbulb size */
    .lightbulb-button {
        font-size: 1.4rem !important;
    }
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .share-button {
        padding: 8px 15px;
        min-width: 80px;
        font-size: 14px;
    }

    .completion-content {
        padding: 20px;
    }

    .completion-content h2 {
        font-size: 1.8rem;
    }

    .modal-content {
        width: 95%;
        margin: 0 auto;
    }
}

@media screen and (max-width: 768px) {
    .hexagon-container {
        transform: scale(0.7);
        margin-bottom: 5px;
        /* Reduced from 15px to bring keyboard closer */
        height: 280px;
        /* Reduced from 400px */
    }

    .virtual-keyboard button {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }

    .lightbulb-button {
        font-size: 1.3rem !important;
    }

    .hexagon {
        transform-origin: center;
    }

    /* Mobile positioning - shifted further left to center */
    #hex1 {
        left: -10px;
    }

    #hex2 {
        left: 62px;
    }

    #hex3 {
        left: 134px;
    }

    #hex4 {
        left: 206px;
    }

    #hex5 {
        left: 278px;
    }

    #hex6 {
        left: 350px;
    }

    #hex7 {
        left: -46px;
    }

    #hex8 {
        left: 98px;
    }

    #hex9 {
        left: 242px;
    }

    #hex10 {
        left: 386px;
    }

    #hex11 {
        left: -10px;
    }

    #hex12 {
        left: 62px;
    }

    #hex13 {
        left: 134px;
    }

    #hex14 {
        left: 206px;
    }

    #hex15 {
        left: 278px;
    }

    #hex16 {
        left: 350px;
    }

    #hex17 {
        left: -46px;
    }

    #hex18 {
        left: 98px;
    }

    #hex19 {
        left: 242px;
    }

    #hex20 {
        left: 386px;
    }

    #hex21 {
        left: -10px;
    }

    #hex22 {
        left: 62px;
    }

    #hex23 {
        left: 134px;
    }

    #hex24 {
        left: 206px;
    }

    #hex25 {
        left: 278px;
    }

    #hex26 {
        left: 350px;
    }

    #hex27 {
        left: 26px;
    }

    #hex28 {
        left: 170px;
    }

    #hex29 {
        left: 314px;
    }

    #hex30 {
        left: 26px;
    }

    #hex31 {
        left: 170px;
    }

    #hex32 {
        left: 314px;
    }
}

@media screen and (max-height: 800px) {
    .content-container {
        padding: 0 0 5px 0;
    }

    .game-title {
        font-size: 1.8rem;
    }

    .timer-display,
    .hint-count {
        font-size: 1.3rem;
        margin: 0;
    }

    .word-list {
        font-size: 1.3rem;
    }

    .hexagon-container {
        transform: scale(0.8);
        margin-bottom: 15px;
        height: 380px;
    }

    .virtual-keyboard button {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }

    .control-button {
        padding: 6px 15px;
        font-size: 1rem;
    }
}

@media screen and (max-height: 700px) {
    .hexagon-container {
        transform: scale(0.7);
        margin-bottom: 10px;
    }

    .virtual-keyboard {
        gap: 2px;
    }

    .virtual-keyboard button {
        width: 35px;
        height: 35px;
    }

    .game-controls {
        margin-top: 5px;
    }
}

@media screen and (max-width: 480px) {
    .game-title {
        font-size: 1.6rem;
    }

    .hexagon-container {
        transform: scale(0.6);
        /* Reduced scale to fit better */
        margin-bottom: 0px;
        /* Remove margin to bring keyboard up */
        transform-origin: center top;
        height: 240px;
        /* Reduced height */
    }

    /* Smaller mobile positioning - shifted left to center better */
    #hex1 {
        left: -15px;
    }

    #hex2 {
        left: 57px;
    }

    #hex3 {
        left: 129px;
    }

    #hex4 {
        left: 201px;
    }

    #hex5 {
        left: 273px;
    }

    #hex6 {
        left: 345px;
    }

    #hex7 {
        left: -51px;
    }

    #hex8 {
        left: 93px;
    }

    #hex9 {
        left: 237px;
    }

    #hex10 {
        left: 381px;
    }

    #hex11 {
        left: -15px;
    }

    #hex12 {
        left: 57px;
    }

    #hex13 {
        left: 129px;
    }

    #hex14 {
        left: 201px;
    }

    #hex15 {
        left: 273px;
    }

    #hex16 {
        left: 345px;
    }

    #hex17 {
        left: -51px;
    }

    #hex18 {
        left: 93px;
    }

    #hex19 {
        left: 237px;
    }

    #hex20 {
        left: 381px;
    }

    #hex21 {
        left: -15px;
    }

    #hex22 {
        left: 57px;
    }

    #hex23 {
        left: 129px;
    }

    #hex24 {
        left: 201px;
    }

    #hex25 {
        left: 273px;
    }

    #hex26 {
        left: 345px;
    }

    #hex27 {
        left: 21px;
    }

    #hex28 {
        left: 165px;
    }

    #hex29 {
        left: 309px;
    }

    #hex30 {
        left: 21px;
    }

    #hex31 {
        left: 165px;
    }

    #hex32 {
        left: 309px;
    }

    .virtual-keyboard button {
        width: 32px;
        /* Smaller buttons */
        height: 32px;
        font-size: 1.1rem;
    }

    .virtual-keyboard {
        transform: scale(1.0);
        margin-top: 0;
        gap: 3px;
    }

    .lightbulb-button {
        font-size: 1.1rem !important;
        line-height: 1 !important;
    }

    .word-list {
        font-size: 1rem;
        /* Smaller text */
        gap: 6px;
    }

    .word-list span {
        margin: 0 1px;
    }

    .control-button {
        padding: 5px 10px;
        /* Smaller buttons */
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 400px) {
    .hexagon-container {
        transform: scale(0.6);
        margin-bottom: 5px;
    }

    .keyboard-row {
        gap: 3px;
    }

    .virtual-keyboard button {
        width: 32px;
        height: 32px;
    }
}

@media screen and (max-width: 360px) {
    .hexagon-container {
        transform: scale(0.58);
        margin-bottom: 5px;
    }

    .virtual-keyboard {
        transform: scale(0.95);
    }

    .lightbulb-button {
        font-size: 1rem !important;
    }

    /* Very small mobile positioning */
    #hex1 {
        left: 5px;
    }

    #hex2 {
        left: 77px;
    }

    #hex3 {
        left: 149px;
    }

    #hex4 {
        left: 221px;
    }

    #hex5 {
        left: 293px;
    }

    #hex6 {
        left: 365px;
    }

    #hex7 {
        left: -31px;
    }

    #hex8 {
        left: 113px;
    }

    #hex9 {
        left: 257px;
    }

    #hex10 {
        left: 401px;
    }

    #hex11 {
        left: 5px;
    }

    #hex12 {
        left: 77px;
    }

    #hex13 {
        left: 149px;
    }

    #hex14 {
        left: 221px;
    }

    #hex15 {
        left: 293px;
    }

    #hex16 {
        left: 365px;
    }

    #hex17 {
        left: -31px;
    }

    #hex18 {
        left: 113px;
    }

    #hex19 {
        left: 257px;
    }

    #hex20 {
        left: 401px;
    }

    #hex21 {
        left: 5px;
    }

    #hex22 {
        left: 77px;
    }

    #hex23 {
        left: 149px;
    }

    #hex24 {
        left: 221px;
    }

    #hex25 {
        left: 293px;
    }

    #hex26 {
        left: 365px;
    }

    #hex27 {
        left: 41px;
    }

    #hex28 {
        left: 185px;
    }

    #hex29 {
        left: 329px;
    }

    #hex30 {
        left: 41px;
    }

    #hex31 {
        left: 185px;
    }

    #hex32 {
        left: 329px;
    }

    .keyboard-row {
        gap: 2px;
    }

    .virtual-keyboard button {
        width: 30px;
        height: 30px;
    }
}

/* Mobile responsive fixes for completion visual */
@media (max-width: 480px) {
    .visual-row {
        gap: 2px;
    }

    .visual-cell {
        width: 18px;
        height: 18px;
        margin: 1px;
    }

    #completionVisual {
        gap: 2px;
        max-width: 100%;
        overflow-x: auto;
        padding: 0 10px;
    }

    .share-preview {
        font-size: 12px;
        padding: 10px;
        max-width: 280px;
    }
}

@media (max-width: 400px) {
    .visual-cell {
        width: 16px;
        height: 16px;
        margin: 1px;
    }

    .visual-row {
        gap: 1px;
    }

    #completionVisual {
        gap: 1px;
        padding: 0 5px;
    }

    .share-preview {
        font-size: 11px;
        padding: 8px;
        max-width: 260px;
    }
}

@media (max-width: 360px) {
    .visual-cell {
        width: 14px;
        height: 14px;
        margin: 0.5px;
    }

    .visual-row {
        gap: 0.5px;
    }

    #completionVisual {
        gap: 0.5px;
        padding: 0 2px;
    }

    .share-preview {
        font-size: 10px;
        padding: 6px;
        max-width: 240px;
    }
}

/* Add a vertical scaling fix based on viewport height */
@media screen and (max-height: 650px) {
    body {
        zoom: 0.95;
    }
}

@media screen and (max-height: 580px) {
    body {
        zoom: 0.9;
    }
}

@media screen and (max-height: 520px) {
    body {
        zoom: 0.8;
    }
}




/* ============================================
   HOW TO PLAY PAGE STYLES
   Add these styles to the end of hexicon.css
   ============================================ */

/* Main content wrapper */
.main-content {
    margin-top: 64px;
    padding: 0;
    min-height: calc(100vh - 64px);
    background-color: var(--bg-color);
}

/* Container for content sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(255, 215, 0, 0.1));
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--header-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Content sections */
.content-section {
    margin-bottom: 4rem;
    background-color: var(--section-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    color: var(--header-color);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Video section */
.video-container {
    max-width: 800px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 2rem;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid var(--header-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-fallback {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--card-border);
}

.video-fallback h3 {
    color: var(--header-color);
    margin-bottom: 1rem;
    font-family: 'Oswald', sans-serif;
}

.youtube-link {
    display: inline-block;
    background-color: #ff0000;
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.youtube-link:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
    text-decoration: none;
    color: white;
}

.video-description {
    text-align: center;
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Steps grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.step-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-3px);
}

.step-number {
    background: linear-gradient(135deg, var(--button-primary), #3355cc);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.step-content h3 {
    color: var(--header-color);
    margin-bottom: 0.5rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
}

.step-content p {
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
}

/* Strategy grid */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.strategy-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease;
}

.strategy-card:hover {
    transform: translateY(-3px);
    border-color: var(--header-color);
}

.strategy-card h3 {
    color: var(--header-color);
    margin-bottom: 1.5rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
}

.strategy-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.strategy-card li {
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.strategy-card li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--header-color);
    font-size: 0.8rem;
    top: 0.2rem;
}

.strategy-card strong {
    color: var(--header-color);
}

/* Rating section */
.rating-intro {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.6;
}

.rating-section {
    margin-bottom: 3rem;
}

.rating-section h3 {
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.rating-explanation {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.rating-levels {
    display: grid;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

.rating-level {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.rating-level:hover {
    transform: translateX(5px);
    border-color: var(--header-color);
}

.rating-stars {
    font-size: 1.2rem;
    margin-right: 1rem;
    min-width: 100px;
}

.rating-level.legendary .rating-stars { color: #ff6b35; }
.rating-level.master .rating-stars { color: #8b5cf6; }
.rating-level.expert .rating-stars { color: #ef4444; }
.rating-level.advanced .rating-stars { color: #f59e0b; }
.rating-level.skilled .rating-stars { color: #10b981; }
.rating-level.competent .rating-stars { color: #6b7280; }
.rating-level.novice .rating-stars { color: #9ca3af; }

.rating-info {
    flex-grow: 1;
}

.rating-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: var(--header-color);
    font-size: 1.1rem;
}

.rating-time {
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

.rating-desc {
    color: var(--text-color);
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.7;
}

/* Penalty section */
.penalty-section {
    margin-bottom: 3rem;
}

.penalty-section h3 {
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.penalty-explanation {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.penalty-table {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.penalty-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
    align-items: center;
    text-align: center;
}

.penalty-row:last-child {
    border-bottom: none;
}

.penalty-header {
    background-color: var(--header-color);
    color: var(--bg-color);
    font-weight: 600;
    font-family: 'Oswald', sans-serif;
}

.penalty-row:not(.penalty-header) {
    color: var(--text-color);
}

.penalty-row:nth-child(even):not(.penalty-header) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Calculator section */
.calculator-section {
    margin-bottom: 3rem;
}

.calculator-section h3 {
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.calculator {
    max-width: 600px;
    margin: 0 auto;
}

.calculator-inputs {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    color: var(--header-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: 'Oswald', sans-serif;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-inputs input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--card-border);
    border-radius: 5px;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    font-size: 1rem;
}

.time-inputs span {
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.input-group input[type="number"] {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--card-border);
    border-radius: 5px;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    font-size: 1rem;
}

.calculator-result {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    text-align: center;
}

.result-breakdown {
    margin-bottom: 2rem;
}

.result-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--text-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-line:last-child {
    border-bottom: none;
}

.result-total {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--header-color);
    border-top: 2px solid var(--header-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.result-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.result-stars {
    font-size: 1.5rem;
}

.result-level {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
}

.result-rating.legendary .result-stars,
.result-rating.legendary .result-level { color: #ff6b35; }
.result-rating.master .result-stars,
.result-rating.master .result-level { color: #8b5cf6; }
.result-rating.expert .result-stars,
.result-rating.expert .result-level { color: #ef4444; }
.result-rating.advanced .result-stars,
.result-rating.advanced .result-level { color: #f59e0b; }
.result-rating.skilled .result-stars,
.result-rating.skilled .result-level { color: #10b981; }
.result-rating.competent .result-stars,
.result-rating.competent .result-level { color: #6b7280; }
.result-rating.novice .result-stars,
.result-rating.novice .result-level { color: #9ca3af; }
.result-rating.learning .result-stars,
.result-rating.learning .result-level { color: #d1d5db; }

/* Examples section */
.examples-section {
    margin-bottom: 3rem;
}

.examples-section h3 {
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.example-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease;
}

.example-card:hover {
    transform: translateY(-3px);
    border-color: var(--header-color);
}

.example-header {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: var(--header-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
}

.example-details {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.example-details > div {
    margin-bottom: 0.3rem;
}

.example-result {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.example-rating {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
}

.example-rating.legendary { color: #ff6b35; }
.example-rating.master { color: #8b5cf6; }
.example-rating.expert { color: #ef4444; }
.example-rating.advanced { color: #f59e0b; }
.example-rating.skilled { color: #10b981; }

/* Puzzle types grid */
.puzzle-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.puzzle-type-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease;
}

.puzzle-type-card:hover {
    transform: translateY(-3px);
    border-color: var(--header-color);
}

.puzzle-type-card h3 {
    color: var(--header-color);
    margin-bottom: 1.5rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    text-align: center;
}

.puzzle-specs {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
}

.spec-item span:last-child {
    color: var(--text-color);
    text-align: right;
}

/* Difficulty scale */
.difficulty-scale {
    margin-top: 3rem;
}

.difficulty-scale h3 {
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.scale-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.scale-level {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    text-align: center;
    transition: all 0.3s ease;
}

.scale-level:hover {
    transform: translateY(-3px);
    border-color: var(--header-color);
}

.scale-range {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.scale-name {
    color: var(--text-color);
    font-weight: 600;
}

.scale-level.beginner .scale-range { color: #4ade80; }
.scale-level.easy .scale-range { color: #22d3ee; }
.scale-level.moderate .scale-range { color: #60a5fa; }
.scale-level.challenging .scale-range { color: #a78bfa; }
.scale-level.hard .scale-range { color: #f472b6; }
.scale-level.very-hard .scale-range { color: #fb7185; }
.scale-level.expert-level .scale-range { color: #f97316; }
.scale-level.master-level .scale-range { color: #ef4444; }
.scale-level.legendary-level .scale-range { color: #dc2626; }

/* Call to action */
.cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(255, 215, 0, 0.1));
    border-radius: 20px;
    margin-bottom: 3rem;
}

.cta-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: var(--header-color);
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-button {
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--button-primary), #3355cc);
    color: white;
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
    text-decoration: none;
    color: white;
}

.cta-button.secondary {
    background-color: transparent;
    border: 2px solid var(--header-color);
    color: var(--header-color);
}

.cta-button.secondary:hover {
    background-color: var(--header-color);
    color: var(--bg-color);
    text-decoration: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .content-section {
        padding: 2rem 1rem;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .strategy-grid {
        grid-template-columns: 1fr;
    }
    
    .puzzle-types-grid {
        grid-template-columns: 1fr;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .scale-levels {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .penalty-row {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .scale-levels {
        grid-template-columns: 1fr;
    }
    
    .penalty-row {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 0.5rem;
    }
    
    .penalty-row > div {
        padding: 0.2rem 0;
    }
    
    .step-card {
        flex-direction: column;
        text-align: center;
    }
    
    .time-inputs {
        justify-content: center;
    }
}/* ============================================
   TUTORIAL PAGE SPECIFIC STYLES
   Add these styles to the end of hexicon.css
   ============================================ */

/* Tutorial Content Container */
.tutorial-content-container {
    margin-top: 64px;
    padding: 2rem 0;
    min-height: calc(100vh - 64px);
    background-color: var(--bg-color);
}

/* Tutorial-specific container */
.tutorial-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.tutorial-hero-section {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(255, 215, 0, 0.1));
    margin-bottom: 3rem;
}

.tutorial-hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--header-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tutorial-hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* Section Titles */
.tutorial-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    color: var(--header-color);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Video Section */
.tutorial-video-section {
    margin-bottom: 4rem;
    background-color: var(--section-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.tutorial-video-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.tutorial-video-frame {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--header-color);
}

.tutorial-video-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

.tutorial-video-fallback {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--card-border);
}

.tutorial-video-error h3 {
    color: var(--header-color);
    margin-bottom: 1rem;
    font-family: 'Oswald', sans-serif;
}

.tutorial-youtube-link {
    display: inline-block;
    background-color: #ff0000;
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.tutorial-youtube-link:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
    text-decoration: none;
    color: white;
}

.tutorial-video-description {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Quick Start Section */
.tutorial-quick-start {
    margin-bottom: 4rem;
}

.tutorial-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tutorial-step-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow-dark);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.tutorial-step-card:hover {
    transform: translateY(-3px);
}

.tutorial-step-number {
    background: linear-gradient(135deg, var(--button-primary), #3355cc);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.tutorial-step-content h3 {
    color: var(--header-color);
    margin-bottom: 0.5rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
}

.tutorial-step-content p {
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
}

/* Strategies Section */
.tutorial-strategies {
    margin-bottom: 4rem;
}

.tutorial-strategy-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tutorial-strategy-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow-dark);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease;
}

.tutorial-strategy-card:hover {
    transform: translateY(-3px);
    border-color: var(--header-color);
}

.tutorial-strategy-card h3 {
    color: var(--header-color);
    margin-bottom: 1.5rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
}

.tutorial-strategy-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tutorial-strategy-card li {
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.tutorial-strategy-card li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--header-color);
    font-size: 0.8rem;
    top: 0.2rem;
}

.tutorial-strategy-card strong {
    color: var(--header-color);
}

/* Performance Section */
.tutorial-performance {
    margin-bottom: 4rem;
}

.tutorial-performance-intro {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.tutorial-rating-section {
    background-color: var(--section-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.tutorial-rating-section h3 {
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tutorial-rating-explanation {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.tutorial-rating-levels {
    display: grid;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tutorial-rating-level {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.tutorial-rating-level:hover {
    transform: translateX(5px);
    border-color: var(--header-color);
}

.tutorial-rating-stars {
    font-size: 1.2rem;
    margin-right: 1rem;
    min-width: 80px;
}

.tutorial-rating-level.legendary .tutorial-rating-stars { color: #ff6b35; }
.tutorial-rating-level.master .tutorial-rating-stars { color: #8b5cf6; }
.tutorial-rating-level.expert .tutorial-rating-stars { color: #ef4444; }
.tutorial-rating-level.advanced .tutorial-rating-stars { color: #f59e0b; }
.tutorial-rating-level.skilled .tutorial-rating-stars { color: #10b981; }
.tutorial-rating-level.competent .tutorial-rating-stars { color: #6b7280; }
.tutorial-rating-level.novice .tutorial-rating-stars { color: #9ca3af; }

.tutorial-rating-info {
    flex-grow: 1;
}

.tutorial-rating-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: var(--header-color);
    font-size: 1.1rem;
}

.tutorial-rating-time {
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

.tutorial-rating-desc {
    color: var(--text-color);
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.7;
}

/* Hint Penalties Section */
.tutorial-hint-penalties {
    background-color: var(--section-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.tutorial-hint-penalties h3 {
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tutorial-penalty-explanation {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.tutorial-penalty-table {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.tutorial-penalty-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
    align-items: center;
    text-align: center;
}

.tutorial-penalty-row:last-child {
    border-bottom: none;
}

.tutorial-penalty-header {
    background-color: var(--header-color);
    color: var(--bg-color);
    font-weight: 600;
    font-family: 'Oswald', sans-serif;
}

.tutorial-penalty-row:not(.tutorial-penalty-header) {
    color: var(--text-color);
}

.tutorial-penalty-row:nth-child(even):not(.tutorial-penalty-header) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Interactive Calculator */
.tutorial-interactive-examples {
    background-color: var(--section-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.tutorial-interactive-examples h3 {
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.tutorial-calculator {
    max-width: 600px;
    margin: 0 auto;
}

.tutorial-calculator-inputs {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

.tutorial-input-group {
    margin-bottom: 1.5rem;
}

.tutorial-input-group:last-of-type {
    margin-bottom: 2rem;
}

.tutorial-input-group label {
    display: block;
    color: var(--header-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: 'Oswald', sans-serif;
}

.tutorial-time-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tutorial-time-inputs input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--card-border);
    border-radius: 5px;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    font-size: 1rem;
}

.tutorial-time-inputs span {
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.tutorial-input-group input[type="number"] {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--card-border);
    border-radius: 5px;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    font-size: 1rem;
}

.tutorial-calculate-btn {
    background: linear-gradient(135deg, var(--button-primary), #3355cc);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    width: 100%;
}

.tutorial-calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.tutorial-calculator-result {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    text-align: center;
}

.tutorial-result-breakdown {
    margin-bottom: 2rem;
}

.tutorial-result-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--text-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tutorial-result-line:last-child {
    border-bottom: none;
}

.tutorial-result-total {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--header-color);
    border-top: 2px solid var(--header-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.tutorial-result-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tutorial-result-stars {
    font-size: 1.5rem;
}

.tutorial-result-level {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
}

.tutorial-result-rating.legendary .tutorial-result-stars,
.tutorial-result-rating.legendary .tutorial-result-level { color: #ff6b35; }
.tutorial-result-rating.master .tutorial-result-stars,
.tutorial-result-rating.master .tutorial-result-level { color: #8b5cf6; }
.tutorial-result-rating.expert .tutorial-result-stars,
.tutorial-result-rating.expert .tutorial-result-level { color: #ef4444; }
.tutorial-result-rating.advanced .tutorial-result-stars,
.tutorial-result-rating.advanced .tutorial-result-level { color: #f59e0b; }
.tutorial-result-rating.skilled .tutorial-result-stars,
.tutorial-result-rating.skilled .tutorial-result-level { color: #10b981; }
.tutorial-result-rating.competent .tutorial-result-stars,
.tutorial-result-rating.competent .tutorial-result-level { color: #6b7280; }
.tutorial-result-rating.novice .tutorial-result-stars,
.tutorial-result-rating.novice .tutorial-result-level { color: #9ca3af; }
.tutorial-result-rating.learning .tutorial-result-stars,
.tutorial-result-rating.learning .tutorial-result-level { color: #d1d5db; }

/* Example Scenarios */
.tutorial-example-scenarios {
    background-color: var(--section-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.tutorial-example-scenarios h3 {
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.tutorial-scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.tutorial-scenario-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease;
}

.tutorial-scenario-card:hover {
    transform: translateY(-3px);
    border-color: var(--header-color);
}

.tutorial-scenario-header {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: var(--header-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
}

.tutorial-scenario-details {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.tutorial-scenario-details > div {
    margin-bottom: 0.3rem;
}

.tutorial-scenario-result {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.tutorial-scenario-rating {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
}

.tutorial-scenario-rating.legendary { color: #ff6b35; }
.tutorial-scenario-rating.master { color: #8b5cf6; }
.tutorial-scenario-rating.expert { color: #ef4444; }
.tutorial-scenario-rating.advanced { color: #f59e0b; }
.tutorial-scenario-rating.skilled { color: #10b981; }

/* Difficulty Levels Section */
.tutorial-difficulty-levels {
    margin-bottom: 4rem;
}

.tutorial-difficulty-intro {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.tutorial-difficulty-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tutorial-difficulty-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow-dark);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease;
}

.tutorial-difficulty-card:hover {
    transform: translateY(-3px);
    border-color: var(--header-color);
}

.tutorial-difficulty-card h3 {
    color: var(--header-color);
    margin-bottom: 1.5rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    text-align: center;
}

.tutorial-difficulty-specs {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.tutorial-spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tutorial-spec-item:last-child {
    border-bottom: none;
}

.tutorial-spec-label {
    font-weight: 600;
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
}

.tutorial-spec-item span:last-child {
    color: var(--text-color);
    text-align: right;
}

/* Difficulty Scale */
.tutorial-difficulty-scale {
    background-color: var(--section-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.tutorial-difficulty-scale h3 {
    color: var(--header-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.tutorial-scale-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.tutorial-scale-level {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    text-align: center;
    transition: all 0.3s ease;
}

.tutorial-scale-level:hover {
    transform: translateY(-3px);
    border-color: var(--header-color);
}

.tutorial-scale-range {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tutorial-scale-name {
    color: var(--text-color);
    font-weight: 600;
}

.tutorial-scale-level.beginner .tutorial-scale-range { color: #4ade80; }
.tutorial-scale-level.easy .tutorial-scale-range { color: #22d3ee; }
.tutorial-scale-level.moderate .tutorial-scale-range { color: #60a5fa; }
.tutorial-scale-level.challenging .tutorial-scale-range { color: #a78bfa; }
.tutorial-scale-level.hard .tutorial-scale-range { color: #f472b6; }
.tutorial-scale-level.very-hard .tutorial-scale-range { color: #fb7185; }
.tutorial-scale-level.expert-level .tutorial-scale-range { color: #f97316; }
.tutorial-scale-level.master-level .tutorial-scale-range { color: #ef4444; }
.tutorial-scale-level.legendary-level .tutorial-scale-range { color: #dc2626; }

/* Call to Action */
.tutorial-cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(255, 215, 0, 0.1));
    border-radius: 20px;
    margin-bottom: 3rem;
}

.tutorial-cta-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: var(--header-color);
    margin-bottom: 1rem;
}

.tutorial-cta-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
    line-height: 1.6;
}

.tutorial-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tutorial-cta-button {
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
}

.tutorial-cta-button.primary {
    background: linear-gradient(135deg, var(--button-primary), #3355cc);
    color: white;
}

.tutorial-cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
    text-decoration: none;
    color: white;
}

.tutorial-cta-button.secondary {
    background-color: transparent;
    border: 2px solid var(--header-color);
    color: var(--header-color);
}

.tutorial-cta-button.secondary:hover {
    background-color: var(--header-color);
    color: var(--bg-color);
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tutorial-hero-title {
        font-size: 2.2rem;
    }

    .tutorial-hero-subtitle {
        font-size: 1rem;
    }

    .tutorial-section-title {
        font-size: 1.8rem;
    }

    .tutorial-video-section,
    .tutorial-rating-section,
    .tutorial-hint-penalties,
    .tutorial-interactive-examples,
    .tutorial-example-scenarios,
    .tutorial-difficulty-scale {
        padding: 2rem 1rem;
    }

    .tutorial-steps-grid {
        grid-template-columns: 1fr;
    }

    .tutorial-strategy-categories {
        grid-template-columns: 1fr;
    }

    .tutorial-difficulty-categories {
        grid-template-columns: 1fr;
    }

    .tutorial-scenarios-grid {
        grid-template-columns: 1fr;
    }

    .tutorial-scale-levels {
        grid-template-columns: repeat(2, 1fr);
    }

    .tutorial-penalty-row {
        font-size: 0.9rem;
        padding: 0.8rem;
    }

    .tutorial-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .tutorial-container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .tutorial-hero-title {
        font-size: 1.8rem;
    }

    .tutorial-scale-levels {
        grid-template-columns: 1fr;
    }

    .tutorial-penalty-row {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 0.5rem;
    }

    .tutorial-penalty-row > div {
        padding: 0.2rem 0;
    }

    .tutorial-step-card {
        flex-direction: column;
        text-align: center;
    }

    .tutorial-time-inputs {
        justify-content: center;
    }
}




/* ============================================
   DASHBOARD PAGE STYLES
   Add these styles to the end of hexicon.css
   ============================================ */

/* Dashboard Header - using game header structure */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
    flex-wrap: wrap;
}

.dashboard-title-section {
    flex: 1;
    min-width: 300px;
}

.dashboard-subtitle {
    font-size: 1rem;
    text-align: center;
    margin-top: 0;
    color: var(--text-color);
    opacity: 0.9;
}

/* User info card in header */
.dashboard-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--card-bg);
    padding: 1.2rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 15px var(--shadow-dark);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--button-primary), #3355cc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-display-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--header-color);
    margin: 0;
}

.user-tier-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-tier-badge.premium {
    background-color: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.user-tier-badge.free {
    background-color: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.user-tier-badge.lifetime {
    background-color: rgba(255, 107, 53, 0.15);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

/* Dashboard sections - using existing section styling */
.dashboard-section {
    margin-bottom: 3rem;
    background-color: var(--section-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow-dark);
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: var(--header-color);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

/* Quick Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--header-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Tier Messages */
.tier-message {
    margin-bottom: 1rem;
}

.tier-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.9rem;
}

.tier-success {
    background-color: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-size: 0.9rem;
}

/* Table Controls */
.table-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.date-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-filter-group label {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
}

.date-picker {
    padding: 0.5rem 1rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

.date-picker:focus {
    outline: none;
    border-color: var(--header-color);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.date-picker::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.clear-date-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: bold;
}

.clear-date-btn:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.search-input, .filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
}

.search-input {
    min-width: 200px;
}

.search-input::placeholder {
    color: rgba(230, 230, 230, 0.5);
}

/* Records Table */
.records-table-container {
    position: relative;
    overflow-x: auto;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.records-table th {
    background-color: var(--header-color);
    color: var(--bg-color);
    padding: 1rem;
    text-align: left;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
     text-align: center !important;
}

.records-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.records-table th.sortable:hover {
    background-color: rgba(255, 215, 0, 0.9);
}

.sort-arrow {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.records-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-color);
     text-align: center !important;
}

.records-table tr:last-child td {
    border-bottom: none;
}

.records-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Table cell specific styling */
.time-cell, .effective-time-cell {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
}

.hints-cell {
    text-align: center;
    font-weight: 600;
}

.penalty-cell {
    text-align: center;
    color: #f59e0b;
    font-weight: 500;
}

.rating-cell {
    text-align: center;
}

.rating-badge {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
}

.actions-cell {
    text-align: center;
}

.action-button {
    background-color: var(--button-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.action-button:hover {
    background-color: #3355cc;
    transform: translateY(-1px);
}

.retry-button {
    background-color: #10b981;
}

.retry-button:hover {
    background-color: #059669;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-color);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--header-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.empty-state p {
    margin-bottom: 2rem;
    opacity: 0.8;
}

/* Upgrade Prompt */
.upgrade-prompt {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(255, 215, 0, 0.1));
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    text-align: center;
}

.upgrade-content {
    max-width: 500px;
    margin: 0 auto;
}

.upgrade-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upgrade-prompt h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--header-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.upgrade-prompt p {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.upgrade-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.upgrade-feature {
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upgrade-button {
    background: linear-gradient(135deg, var(--button-primary), #3355cc);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

/* Recent Activity */
.recent-activity {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    transition: transform 0.2s ease;
}

.activity-item:hover {
    transform: translateX(5px);
}

.activity-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-content {
    flex-grow: 1;
}

.activity-title {
    color: var(--header-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.activity-details {
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

.activity-time {
    color: var(--text-color);
    font-size: 0.8rem;
    opacity: 0.6;
    white-space: nowrap;
}

.activity-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-color);
    opacity: 0.8;
}

.activity-empty a {
    color: var(--header-color);
    text-decoration: none;
}

.activity-empty a:hover {
    text-decoration: underline;
}

/* CTA Buttons */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--button-primary), #3355cc);
    color: white;
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
    text-decoration: none;
    color: white;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: var(--text-color);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-left: 4px solid var(--header-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h2 {
    font-family: 'Oswald', sans-serif;
    color: var(--header-color);
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: var(--text-color);
    opacity: 0.8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1.5rem;
    }
    
    .dashboard-title-section {
        min-width: auto;
        width: 100%;
    }
    
    .game-title {
        font-size: 2.5rem;
    }
    
    .dashboard-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .dashboard-user-info {
        width: 100%;
        max-width: 400px;
        justify-content: center;
        min-width: auto;
        padding: 1rem;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .user-display-name {
        font-size: 1rem;
    }
    
    .user-tier-badge {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }
    
    .dashboard-section {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .section-controls {
        align-items: stretch;
    }
    
    .table-controls {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .date-filter-group {
        justify-content: space-between;
        width: 100%;
    }
    
    .date-filter-group label {
        font-size: 0.85rem;
    }
    
    .date-picker {
        min-width: auto;
        flex: 1;
        margin-right: 0.5rem;
        font-size: 0.85rem;
    }
    
    .clear-date-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .filter-select {
        width: 100%;
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .upgrade-features {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .upgrade-prompt {
        padding: 1.5rem 1rem;
    }
    
    .upgrade-prompt h3 {
        font-size: 1.5rem;
    }
    
    /* Mobile table - make it card-based */
    .records-table-container {
        overflow: visible;
    }
    
    .records-table,
    .records-table thead,
    .records-table tbody,
    .records-table th,
    .records-table td,
    .records-table tr {
        display: block;
    }
    
    .records-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .records-table tr {
        border: 1px solid var(--card-border);
        border-radius: 12px;
        margin-bottom: 1rem;
        padding: 1rem;
        background-color: var(--card-bg);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .records-table td {
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        padding: 0.75rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .records-table td:last-child {
        border-bottom: none;
        justify-content: center;
        padding-top: 1rem;
    }
    
    .records-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--header-color);
        font-family: 'Oswald', sans-serif;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
        flex-shrink: 0;
        width: 120px;
    }
    
    .records-table td .rating-badge {
        font-size: 0.8rem;
    }
    
    .action-button {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
    }
    
    .dashboard-subtitle {
        font-size: 1rem;
    }
    
    .dashboard-section {
        padding: 1rem 0.75rem;
        margin-bottom: 1.5rem;
        border-radius: 15px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .stats-grid {
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1.25rem 0.75rem;
    }
    
    .stat-icon {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .records-table tr {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .records-table td {
        padding: 0.5rem 0;
        font-size: 0.9rem;
    }
    
    .records-table td:before {
        width: 100px;
        font-size: 0.75rem;
    }
    
    .activity-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .activity-time {
        order: -1;
        font-size: 0.85rem;
        opacity: 0.8;
    }
    
    .activity-icon {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .activity-title {
        font-size: 0.9rem;
    }
    
    .activity-details {
        font-size: 0.85rem;
    }
    
    .upgrade-prompt {
        padding: 1rem 0.75rem;
    }
    
    .upgrade-prompt h3 {
        font-size: 1.3rem;
    }
    
    .upgrade-prompt p {
        font-size: 1rem;
    }
}





/* Add this CSS to hexicon.css for the user dropdown */

/* User Dropdown Styling */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.user-name {
    cursor: pointer;
    color: #4caf50 !important;
    font-weight: 600 !important;
    padding: 0.7rem 1.3rem !important;
    border-radius: 22px !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    border: 1px solid #4caf50 !important;
    display: flex !important;
    align-items: center !important;
    font-size: 0.95rem !important;
}

.user-name:hover {
    background-color: rgba(76, 175, 80, 0.1) !important;
    transform: translateY(-1px) !important;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: rgba(26, 26, 46, 0.98);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.3);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(10px);
    margin-top: 5px;
}

.user-dropdown:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: #e6e6e6;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
    text-align: left;
    border-radius: 0;
}

.dropdown-item:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.dropdown-item:hover {
    background-color: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    transform: translateX(5px);
}

.dropdown-divider {
    height: 1px;
    background-color: rgba(255, 215, 0, 0.2);
    margin: 8px 0;
}

/* Mobile dropdown adjustments */
@media (max-width: 768px) {
    .user-dropdown-menu {
        position: fixed;
        top: auto;
        right: 1rem;
        left: 1rem;
        width: auto;
        min-width: auto;
        margin-top: 10px;
    }
    
    .user-dropdown:hover .user-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .dropdown-item {
        padding: 16px 20px;
        font-size: 1rem;
        text-align: center;
    }
}

/* Ensure dropdown appears above other elements */
.nav-container {
    z-index: 1000;
}

.user-dropdown {
    z-index: 1001;
}





/* ============================================
   PHASE 1 SCORING SYSTEM STYLES
   Add these styles to the end of hexicon.css
   ============================================ */

/* Score Display Styling */
#score-display {
    font-family: 'Oswald', sans-serif !important;
    font-size: 1.6rem !important;
    color: #ffd700 !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
    margin: 0 10px !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

/* Game Stats Layout - ensure score fits nicely */
#game-stats {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    margin: 0 !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

/* Floating Score Animation */
@keyframes floatUpScore {
    0% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(0.8); 
    }
    15% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.2); 
    }
    30% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.0); 
    }
    70% { 
        opacity: 1; 
        transform: translate(-50%, -70%) scale(1.0); 
    }
    100% { 
        opacity: 0; 
        transform: translate(-50%, -90%) scale(0.8); 
    }
}

/* Score pulse effect for updates */
.score-pulse {
    animation: scorePulse 0.4s ease !important;
}

@keyframes scorePulse {
    0% { transform: scale(1); color: #ffd700; }
    50% { transform: scale(1.1); color: #4caf50; }
    100% { transform: scale(1); color: #ffd700; }
}

/* Completion Modal Score Display */
.completion-content #finalScore {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: #4361ee;
    margin: 15px 0;
    font-weight: 700;
}

/* Mobile Responsive Adjustments */
@media screen and (max-width: 768px) {
    #game-stats {
        gap: 15px !important;
        /* flex-direction: column !important; */ /* REMOVED - this was causing stats to stack */
        align-items: center !important;
    }
    
    #score-display {
        font-size: 1.4rem !important;
        margin: 5px 0 !important;
        /* order: -1; */ /* REMOVED - not needed if staying in one row */
    }
    
    .timer-display,
    .hint-count {
        font-size: 1.4rem !important;
    }
}

@media screen and (max-width: 480px) {
    #score-display {
        font-size: 1.2rem !important;
    }
    
    #game-stats {
        gap: 10px !important;
    }
    
    /* Smaller floating score on mobile */
    @keyframes floatUpScore {
        0% { 
            opacity: 1; 
            transform: translate(-50%, -50%) scale(0.6); 
        }
        15% { 
            opacity: 1; 
            transform: translate(-50%, -50%) scale(1.0); 
        }
        30% { 
            opacity: 1; 
            transform: translate(-50%, -50%) scale(0.8); 
        }
        70% { 
            opacity: 1; 
            transform: translate(-50%, -70%) scale(0.8); 
        }
        100% { 
            opacity: 0; 
            transform: translate(-50%, -90%) scale(0.6); 
        }
    }
}

/* Ensure score display doesn't interfere with existing elements */
.timer-display,
.hint-count,
#score-display {
    flex-shrink: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #score-display {
        color: #ffffff !important;
        text-shadow: 3px 3px 6px rgba(0,0,0,0.9) !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    @keyframes floatUpScore {
        0% { opacity: 1; }
        100% { opacity: 0; }
    }
    
    .score-pulse {
        animation: none !important;
    }
    
    #score-display {
        transition: none !important;
    }
}




/* Add these styles to hexicon.css for the updated completion modal */

/* Enhanced completion modal styles */
.completion-content #finalScore {
    font-family: 'Oswald', sans-serif !important;
    font-size: 2.2rem !important;
    color: #4361ee !important;
    margin: 15px 0 !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1) !important;
}

#completionTime {
    font-size: 1.1rem !important;
    color: #666 !important;
    margin-bottom: 10px !important;
}

/* Word breakdown section */
#wordBreakdown {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
}

#wordBreakdown::-webkit-scrollbar {
    width: 6px;
}

#wordBreakdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#wordBreakdown::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#wordBreakdown::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Achievement section styling */
#completionAchievements {
    animation: slideIn 0.5s ease-out 0.3s both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive for completion modal */
@media (max-width: 768px) {
    .completion-content #finalScore {
        font-size: 1.8rem !important;
    }
    
    #wordBreakdown,
    #completionAchievements {
        margin: 15px 0 !important;
        padding: 12px !important;
    }
    
    #completionAchievements > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    
    #completionAchievements div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .completion-content #finalScore {
        font-size: 1.6rem !important;
    }
    
    #wordBreakdown div[style*="display: flex"] {
        flex-direction: column !important;
        text-align: center !important;
        gap: 5px !important;
    }
}





/* ============================================
   ACHIEVEMENT BADGE SIZING SYSTEM
   Add these styles to the end of hexicon.css
   ============================================ */

/* Base achievement badge styling */
.achievement-badge {
    transition: transform 0.3s ease;
    border-radius: 8px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* Context-specific sizes for 256px source images */

/* 1. Hero Display (Dashboard showcase, detailed views) */
.achievement-badge-hero {
    width: 256px;
    height: 256px;
}

/* 2. Large Display (Achievement unlock modals) */
.achievement-badge-large {
    width: 128px;
    height: 128px;
}

/* 3. Medium Display (Completion modal, dashboard grid) */
.achievement-badge-medium {
    width: 80px;
    height: 80px;
}

/* 4. Small Display (Notifications, compact views) */
.achievement-badge-small {
    width: 48px;
    height: 48px;
}

/* 5. Tiny Display (Inline mentions, mobile compact) */
.achievement-badge-tiny {
    width: 32px;
    height: 32px;
}

/* Hover effects scale appropriately with base size */
.achievement-badge:hover {
    transform: scale(1.05);
}

/* Achievement unlock modal styling */
.achievement-unlock-modal .achievement-badge {
    width: 128px;
    height: 128px;
    margin: 1rem 0;
    animation: achievementGlow 1s infinite alternate;
}

/* Meta-achievement unlock modal (larger) */
.meta-achievement-unlock-modal .achievement-badge {
    width: 140px;
    height: 140px;
    margin: 1rem 0;
    animation: metaAchievementGlow 1.5s infinite alternate;
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.7));
}

/* Achievement animations */
@keyframes achievementModalAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes achievementBounce {
    0% { transform: scale(0.3) rotate(-10deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    70% { transform: scale(0.95) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes achievementGlow {
    from { 
        filter: brightness(1) drop-shadow(0 0 15px rgba(255,215,0,0.7)); 
        transform: scale(1);
    }
    to { 
        filter: brightness(1.3) drop-shadow(0 0 30px rgba(255,215,0,1)); 
        transform: scale(1.05);
    }
}

@keyframes metaAchievementGlow {
    from { 
        filter: brightness(1) drop-shadow(0 0 15px rgba(255,215,0,0.7)); 
        transform: scale(1);
    }
    to { 
        filter: brightness(1.3) drop-shadow(0 0 30px rgba(255,215,0,1)); 
        transform: scale(1.05);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .achievement-badge-hero {
        width: 200px;
        height: 200px;
    }
    
    .achievement-badge-large {
        width: 100px;
        height: 100px;
    }
    
    .achievement-unlock-modal .achievement-badge {
        width: 100px;
        height: 100px;
    }
    
    .meta-achievement-unlock-modal .achievement-badge {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .achievement-badge-hero {
        width: 160px;
        height: 160px;
    }
    
    .achievement-unlock-modal .achievement-badge {
        width: 80px;
        height: 80px;
    }
    
    .meta-achievement-unlock-modal .achievement-badge {
        width: 100px;
        height: 100px;
    }
}






/* ============================================
   CROSS-BROWSER ACHIEVEMENT SYSTEM CSS FIX
   Add this to hexicon.css to replace existing achievement styles
   ============================================ */

/* Achievement Stats Summary - Cross-browser compatible */
.achievement-stats-summary {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -moz-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    gap: 2rem;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.achievement-stat {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    text-align: center;
    min-width: 80px;
}

.achievement-stat .stat-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--header-color);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.achievement-stat .stat-label {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    line-height: 1.2;
}

/* Achievement Categories - Enhanced cross-browser support */
.achievement-categories {
    margin-top: 2rem;
    width: 100%;
}

.achievement-category-tabs {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 100%;
    
    /* Fallback for older browsers */
    text-align: center;
}

.category-tab {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.9rem;
    line-height: 1.2;
    
    /* Cross-browser button reset */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    text-decoration: none;
    
    /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Ensure consistent sizing */
    box-sizing: border-box;
    display: inline-block;
    vertical-align: top;
}

.category-tab:hover {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: var(--header-color);
    -webkit-transform: translateY(-1px);
    -moz-transform: translateY(-1px);
    -ms-transform: translateY(-1px);
    -o-transform: translateY(-1px);
    transform: translateY(-1px);
}

.category-tab.active {
    background-color: var(--header-color);
    color: var(--bg-color);
    border-color: var(--header-color);
    font-weight: 600;
}

.category-tab.active:hover {
    background-color: var(--header-color);
    color: var(--bg-color);
    opacity: 0.9;
    -webkit-transform: none;
    -moz-transform: none;
    -ms-transform: none;
    -o-transform: none;
    transform: none;
}

/* Achievement Grid - Maximum cross-browser compatibility */
.achievement-grid {
    /* CSS Grid with fallbacks */
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: (minmax(200px, 1fr))[auto-fit];
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    min-height: 200px;
    width: 100%;
    
    /* Flexbox fallback for older browsers */
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    
    /* Final override for CSS Grid support */
    display: grid;
}

/* Achievement Item Cards - Enhanced compatibility */
.achievement-item {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    
    /* Flexbox fallback sizing */
    -webkit-box-flex: 0;
    -webkit-flex: 0 1 calc(50% - 0.75rem);
    -moz-flex: 0 1 calc(50% - 0.75rem);
    -ms-flex: 0 1 calc(50% - 0.75rem);
    flex: 0 1 calc(50% - 0.75rem);
    min-width: 200px;
    max-width: 300px;
    
    /* Ensure consistent height */
    min-height: 280px;
    
    /* Grid item sizing */
    width: 100%;
}

.achievement-item:hover {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    -o-transform: translateY(-5px);
    transform: translateY(-5px);
    border-color: var(--header-color);
    -webkit-box-shadow: 0 8px 25px var(--shadow-dark);
    -moz-box-shadow: 0 8px 25px var(--shadow-dark);
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.achievement-item.locked {
    opacity: 0.4;
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
    filter: grayscale(100%);
}

.achievement-item.locked:hover {
    opacity: 0.6;
    -webkit-filter: grayscale(50%);
    -moz-filter: grayscale(50%);
    -ms-filter: grayscale(50%);
    -o-filter: grayscale(50%);
    filter: grayscale(50%);
}

/* Achievement Badge Container */
.achievement-badge-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
    width: 80px;
    height: 80px;
}

.achievement-badge-medium {
    width: 80px !important;
    height: 80px !important;
    border-radius: 8px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    
    /* Image rendering optimization */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    
    /* Prevent image distortion */
    object-fit: contain;
    object-position: center;
}

.achievement-badge-medium:hover {
    -webkit-transform: scale(1.05);
    -moz-transform: scale(1.05);
    -ms-transform: scale(1.05);
    -o-transform: scale(1.05);
    transform: scale(1.05);
}

/* Achievement Text Elements */
.achievement-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--header-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.achievement-description {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.achievement-count {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--header-color);
    margin-bottom: 0.5rem;
}

.achievement-next-tier {
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.7;
    line-height: 1.2;
}

/* Loading State */
.achievement-loading {
    -ms-grid-column: 1;
    -ms-grid-column-span: -1;
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-color);
    
    /* Flexbox fallback */
    width: 100%;
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 100%;
    -moz-flex: 1 1 100%;
    -ms-flex: 1 1 100%;
    flex: 1 1 100%;
}

.achievement-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 215, 0, 0.2);
    border-left: 3px solid var(--header-color);
    border-radius: 50%;
    -webkit-animation: spin 1s linear infinite;
    -moz-animation: spin 1s linear infinite;
    -ms-animation: spin 1s linear infinite;
    -o-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Cross-browser animation keyframes */
@-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}
@-moz-keyframes spin {
    0% { -moz-transform: rotate(0deg); }
    100% { -moz-transform: rotate(360deg); }
}
@-ms-keyframes spin {
    0% { -ms-transform: rotate(0deg); }
    100% { -ms-transform: rotate(360deg); }
}
@-o-keyframes spin {
    0% { -o-transform: rotate(0deg); }
    100% { -o-transform: rotate(360deg); }
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   ENHANCED MOBILE RESPONSIVE DESIGN
   ============================================ */

/* Large tablets */
@media (max-width: 1024px) {
    .achievement-grid {
        -ms-grid-columns: (minmax(180px, 1fr))[auto-fit];
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.25rem;
    }
    
    .achievement-item {
        -webkit-flex: 0 1 calc(50% - 0.625rem);
        -moz-flex: 0 1 calc(50% - 0.625rem);
        -ms-flex: 0 1 calc(50% - 0.625rem);
        flex: 0 1 calc(50% - 0.625rem);
        min-width: 180px;
        padding: 1.25rem;
    }
}

/* Standard tablets */
@media (max-width: 768px) {
    .achievement-stats-summary {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -moz-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 1rem;
    }
    
    .achievement-category-tabs {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -moz-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .category-tab {
        width: 100%;
        text-align: center;
        padding: 1rem;
        font-size: 1rem;
        
        /* Ensure full width on mobile */
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        display: block;
    }
    
    .achievement-grid {
        -ms-grid-columns: (minmax(150px, 1fr))[auto-fit];
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .achievement-item {
        -webkit-flex: 0 1 calc(50% - 0.5rem);
        -moz-flex: 0 1 calc(50% - 0.5rem);
        -ms-flex: 0 1 calc(50% - 0.5rem);
        flex: 0 1 calc(50% - 0.5rem);
        min-width: 150px;
        padding: 1rem;
        min-height: 250px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .achievement-stats-summary {
        gap: 0.75rem;
        padding: 0 1rem;
    }
    
    .achievement-stat .stat-value {
        font-size: 1.3rem;
    }
    
    .achievement-stat .stat-label {
        font-size: 0.75rem;
    }
    
    .achievement-category-tabs {
        padding: 0 0.5rem;
        gap: 0.75rem;
    }
    
    .category-tab {
        padding: 0.875rem;
        font-size: 0.95rem;
        border-radius: 20px;
    }
    
    .achievement-grid {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .achievement-item {
        -webkit-flex: 1 1 100%;
        -moz-flex: 1 1 100%;
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 1rem;
        min-height: 220px;
    }
    
    .achievement-badge-container {
        width: 64px;
        height: 64px;
        margin-bottom: 0.75rem;
    }
    
    .achievement-badge-medium {
        width: 64px !important;
        height: 64px !important;
    }
    
    .achievement-name {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }
    
    .achievement-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .achievement-count {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }
    
    .achievement-next-tier {
        font-size: 0.7rem;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    .achievement-category-tabs {
        padding: 0 0.25rem;
    }
    
    .category-tab {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .achievement-grid {
        padding: 0 0.25rem;
    }
    
    .achievement-item {
        padding: 0.875rem;
        min-height: 200px;
    }
    
    .achievement-badge-container {
        width: 56px;
        height: 56px;
    }
    
    .achievement-badge-medium {
        width: 56px !important;
        height: 56px !important;
    }
}

/* ============================================
   BROWSER-SPECIFIC FIXES
   ============================================ */

/* Firefox-specific fixes */
@-moz-document url-prefix() {
    .achievement-grid {
        display: -moz-box;
        -moz-box-orient: horizontal;
        -moz-box-pack: center;
    }
    
    .achievement-item {
        -moz-box-flex: 1;
    }
    
    .category-tab {
        -moz-user-select: none;
    }
}

/* Safari/WebKit specific fixes */
@supports (-webkit-appearance: none) {
    .achievement-grid {
        display: -webkit-flex;
        -webkit-flex-wrap: wrap;
        -webkit-justify-content: center;
    }
    
    .achievement-item {
        -webkit-flex: 0 1 calc(50% - 0.75rem);
    }
}

/* Edge/IE specific fixes */
@supports (-ms-ime-align: auto) {
    .achievement-grid {
        display: -ms-flexbox;
        -ms-flex-wrap: wrap;
        -ms-flex-pack: center;
    }
    
    .achievement-item {
        -ms-flex: 0 1 calc(50% - 0.75rem);
    }
}

/* Ensure consistent rendering across all browsers */
.achievement-categories,
.achievement-category-tabs,
.achievement-grid,
.achievement-item {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}






/* ============================================
   RECENT ACHIEVEMENT ACTIVITY CROSS-BROWSER FIXES
   Add this to your hexicon.css file
   ============================================ */

/* Recent Achievement Activity Section */
.recent-achievements {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    width: 100%;
}

.subsection-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    color: var(--header-color);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* Achievement Activity Feed - Enhanced Cross-Browser Support */
.achievement-activity-feed {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
    
    /* Custom scrollbar for webkit browsers */
    scrollbar-width: thin;
    scrollbar-color: var(--header-color) var(--card-bg);
}

.achievement-activity-feed::-webkit-scrollbar {
    width: 6px;
}

.achievement-activity-feed::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 3px;
}

.achievement-activity-feed::-webkit-scrollbar-thumb {
    background: var(--header-color);
    border-radius: 3px;
}

.achievement-activity-feed::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.8);
}

/* Achievement Activity Item - Cross-Browser Compatible */
.achievement-activity-item {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 1rem;
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -ms-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    
    /* Prevent flex items from overflowing */
    min-width: 0;
    
    /* Cross-browser transform support */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
    
    /* Cross-browser backface visibility */
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
}

.achievement-activity-item:hover {
    -webkit-transform: translateX(5px);
    -moz-transform: translateX(5px);
    -ms-transform: translateX(5px);
    -o-transform: translateX(5px);
    transform: translateX(5px);
    border-color: var(--header-color);
    -webkit-box-shadow: 0 4px 15px var(--shadow-dark);
    -moz-box-shadow: 0 4px 15px var(--shadow-dark);
    box-shadow: 0 4px 15px var(--shadow-dark);
}

/* Achievement Activity Badge */
.achievement-activity-badge {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    -webkit-flex-shrink: 0;
    -moz-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    
    /* Image rendering optimization */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    
    /* Prevent image distortion */
    object-fit: contain;
    object-position: center;
    
    /* Cross-browser transition */
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Achievement Activity Content */
.achievement-activity-content {
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
    -moz-flex-grow: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    min-width: 0; /* Prevents flex item overflow */
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 0.25rem;
}

.achievement-activity-title {
    font-weight: 600;
    color: var(--header-color);
    margin-bottom: 0.25rem;
    font-size: 1rem;
    line-height: 1.3;
    
    /* Text overflow handling */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    
    /* Cross-browser font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.achievement-activity-details {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.4;
    
    /* Text overflow handling */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Achievement Activity Time */
.achievement-activity-time {
    color: var(--text-color);
    font-size: 0.8rem;
    opacity: 0.6;
    white-space: nowrap;
    -webkit-flex-shrink: 0;
    -moz-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    text-align: right;
    min-width: 60px;
}

/* Empty State for Activity Feed */
.activity-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1rem;
    line-height: 1.5;
}

.activity-empty a {
    color: var(--header-color);
    text-decoration: none;
    font-weight: 600;
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -ms-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.activity-empty a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* ============================================
   ENHANCED SOCIAL FOOTER - Cross-browser Mobile Fix
   VS Code Warning-Free Version
   ============================================ */

/* ENHANCED SOCIAL FOOTER - Cross-browser Mobile Fix */
.social-footer {
    background-color: #ffd700 !important;
    padding: 2rem 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Force layout consistency */
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
}

.social-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
    /* Center the container */
    display: block !important;
    text-align: center !important;
}

.social-links {
    /* Enhanced cross-browser flexbox with fallbacks */
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: -moz-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    
    /* Center alignment with multiple fallbacks */
    -webkit-box-pack: center !important;
    -webkit-justify-content: center !important;
    -moz-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    
    /* Vertical alignment */
    -webkit-box-align: center !important;
    -webkit-align-items: center !important;
    -moz-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    
    /* Horizontal layout */
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -webkit-flex-direction: row !important;
    -moz-box-orient: horizontal !important;
    -moz-box-direction: normal !important;
    -ms-flex-direction: row !important;
    flex-direction: row !important;
    
    /* Allow wrapping if needed */
    -webkit-flex-wrap: wrap !important;
    -ms-flex-wrap: wrap !important;
    flex-wrap: wrap !important;
    
    /* Consistent spacing */
    gap: 1rem !important;
    
    /* Fallback for browsers without gap support */
    margin: 0 -0.5rem !important;
    
    /* Ensure full width */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    
    /* Prevent layout issues */
    min-height: 60px !important;
    
    /* Additional mobile fixes */
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

.social-link {
    /* Enhanced button styling */
    display: -webkit-inline-box !important;
    display: -webkit-inline-flex !important;
    display: -moz-inline-box !important;
    display: -ms-inline-flexbox !important;
    display: inline-flex !important;
    
    /* Center icon content */
    -webkit-box-pack: center !important;
    -webkit-justify-content: center !important;
    -moz-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    
    -webkit-box-align: center !important;
    -webkit-align-items: center !important;
    -moz-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    
    /* Consistent sizing */
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    
    /* Spacing for gap fallback */
    margin: 0 0.5rem !important;
    
    /* Visual styling */
    background-color: #2a2a4e !important;
    color: #ffd700 !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    
    /* Typography */
    font-size: 1.2rem !important;
    line-height: 1 !important;
    
    /* Enhanced transitions */
    -webkit-transition: all 0.3s ease !important;
    -moz-transition: all 0.3s ease !important;
    -ms-transition: all 0.3s ease !important;
    -o-transition: all 0.3s ease !important;
    transition: all 0.3s ease !important;
    
    /* Prevent shrinking */
    -webkit-flex-shrink: 0 !important;
    -ms-flex-negative: 0 !important;
    flex-shrink: 0 !important;
    
    /* Box model */
    box-sizing: border-box !important;
    border: none !important;
    outline: none !important;
    
    /* Mobile touch optimization */
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    
    /* Layout stability */
    position: relative !important;
    overflow: hidden !important;
}

.social-link:hover,
.social-link:focus {
    background-color: #4361ee !important;
    color: white !important;
    -webkit-transform: translateY(-2px) scale(1.05) !important;
    -moz-transform: translateY(-2px) scale(1.05) !important;
    -ms-transform: translateY(-2px) scale(1.05) !important;
    -o-transform: translateY(-2px) scale(1.05) !important;
    transform: translateY(-2px) scale(1.05) !important;
}

.social-link i {
    font-size: inherit !important;
    line-height: 1 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile Responsive for Social Footer */
@media (max-width: 768px) {
    /* Enhanced mobile social footer */
    .social-footer {
        padding: 1.5rem 0 !important;
    }

    .social-container {
        padding: 0 0.5rem !important;
    }

    .social-links {
        gap: 0.75rem !important;
        margin: 0 -0.375rem !important;
        min-height: 50px !important;
        /* Force horizontal layout even on small screens */
        -webkit-flex-wrap: nowrap !important;
        -ms-flex-wrap: nowrap !important;
        flex-wrap: nowrap !important;
    }

    .social-link {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        min-height: 45px !important;
        margin: 0 0.375rem !important;
        font-size: 1.1rem !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screen social footer */
    .social-footer {
        padding: 1.25rem 0 !important;
    }

    .social-links {
        gap: 0.5rem !important;
        margin: 0 -0.25rem !important;
        /* Ensure horizontal layout */
        overflow-x: visible !important;
        white-space: nowrap !important;
    }

    .social-link {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        margin: 0 0.25rem !important;
        font-size: 1rem !important;
    }
}

/* Samsung Internet Browser Specific Fixes */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .social-links {
        /* Force GPU acceleration for Samsung browsers */
        -webkit-transform: translate3d(0, 0, 0) !important;
        transform: translate3d(0, 0, 0) !important;
        -webkit-perspective: 1000px !important;
        perspective: 1000px !important;
    }
    
    .social-link {
        /* Prevent layout collapse */
        will-change: transform !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        transform: translate3d(0, 0, 0) !important;
    }
}

/* Android Chrome Specific Fixes */
@supports (-webkit-appearance: none) {
    .social-links {
        /* Additional webkit flex fixes */
        display: -webkit-flex !important;
        -webkit-flex-direction: row !important;
        -webkit-justify-content: center !important;
        -webkit-align-items: center !important;
        /* Standard properties for compatibility */
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* Backup layout for older browsers */
@supports not (display: flex) {
    .social-links {
        display: block !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
    
    .social-link {
        display: inline-block !important;
        vertical-align: middle !important;
    }
}

.account-icon {
    /* Match the button dimensions exactly */
    height: 44px;  /* Same as nav buttons */
    width: 44px;   /* Make it square/circular */
    border-radius: 50%;
    
    /* Add fallback color and vendor prefixes for gradient */
    background-color: #ffd700; /* Fallback color */
    background: -webkit-linear-gradient(135deg, #ffd700, #ffed4e);
    background: -moz-linear-gradient(135deg, #ffd700, #ffed4e);
    background: -o-linear-gradient(135deg, #ffd700, #ffed4e);
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'Oswald', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.2);
    margin-left: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    
    /* Ensure perfect vertical alignment */
    vertical-align: middle;
    line-height: 1;
    
    /* Match button styling for consistency */
    box-sizing: border-box;
    
    /* Additional mobile-specific fixes */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Force hardware acceleration on mobile */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

.account-icon:hover {
    transform: scale(1.05) translateZ(0);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.4);
}

/* Ensure the container aligns properly with other nav items */
#accountIconContainer {
    display: flex !important;
    align-items: center !important;
    height: 44px; /* Match nav button height */
    margin-left: 0;
}

/* Make sure all nav items have consistent alignment */
.nav-links {
    align-items: center;
}

.nav-links li {
    display: flex;
    align-items: center;
    height: 44px; /* Consistent height for all nav items */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .account-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        margin-left: 0; /* Remove left margin on mobile */
        
        /* Ensure gradient works on mobile */
        background-color: #ffd700; /* Stronger fallback for mobile */
        background: -webkit-linear-gradient(135deg, #ffd700, #ffed4e);
        background: linear-gradient(135deg, #ffd700, #ffed4e);
    }
    
    #accountIconContainer {
        height: 38px;
        justify-content: center; /* Center the icon horizontally */
        width: 100%; /* Take full width of container */
    }
    
    .nav-links li {
        height: 38px;
    }
    
    /* Ensure mobile navigation items are centered */
    .nav-links.active li {
        justify-content: center;
        text-align: center;
    }
}

/* Additional mobile-specific media queries for problematic devices */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .account-icon {
        /* Force repaint on high-DPI displays */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* Dashboard Button Cursor Fix - Add this to hexicon.css */

.user-name {
    cursor: pointer !important;
}

/* Make sure all clickable nav elements have pointer cursor */
.nav-link,
.auth-button,
.user-name,
.account-icon {
    cursor: pointer !important;
}

/* Ensure the dashboard button behaves like other nav buttons */
#userName {
    cursor: pointer !important;
    text-decoration: none;
}

/* Additional specificity for the dashboard button in all states */
.user-name:hover,
.user-name:active,
.user-name:focus {
    cursor: pointer !important;
}




/* ADD this CSS to your dashboard.html <style> section or hexicon.css */

.dashboard-header {
    text-align: center;
    margin-bottom: 0.5rem; /* Minimal gap */
    padding: 1rem 0 0 0; /* No bottom padding */
}

.dashboard-title-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
}

.account-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    border: 3px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
    flex-shrink: 0;
}

.user-info {
    text-align: center;
}

.user-greeting {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #ffd700;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.dashboard-subtitle {
    font-size: 1.2rem;
    color: #a0a0a0;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

/* Dashboard section spacing */
.dashboard-section {
    margin-bottom: 2rem;
    padding: 0;
}

.dashboard-section:first-of-type {
    margin-top: 0;
}

/* Quick Stats section - remove extra spacing */
.section-title {
    margin-top: 0;
    margin-bottom: 1rem; /* Reduced from 1.5rem */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-welcome {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-greeting {
        font-size: 2rem;
    }
    
    .account-icon-large {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .dashboard-subtitle {
        font-size: 1rem;
    }
}




/* Practice Mode Navigation */
.practice-navigation {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    animation: slideInFromTop 0.4s ease;
}

.practice-nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 15px;
}

.practice-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.practice-icon {
    font-size: 1.2rem;
}

.practice-text {
    font-weight: 600;
    font-size: 1rem;
}

.practice-note {
    font-size: 0.8rem;
    opacity: 0.8;
    font-style: italic;
}

.practice-actions {
    display: flex;
    gap: 10px;
}

.practice-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.practice-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Mobile responsive for practice mode */
@media (max-width: 768px) {
    .practice-navigation {
        padding: 10px 15px;
        margin-bottom: 15px;
    }
    
    .practice-nav-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .practice-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .practice-actions {
        justify-content: center;
    }
    
    .practice-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}



/* Game Start Overlay Styles */
.game-start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.game-start-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.start-overlay-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.start-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.start-overlay-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #ffd700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.start-overlay-content p {
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #e0e0e0;
}

.start-hint {
    font-size: 0.9rem;
    color: #c0c0c0;
    background: rgba(255, 215, 0, 0.1);
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.start-puzzle-button {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a2e;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    margin: 1.5rem 0;
}

.start-puzzle-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.start-puzzle-button:active {
    transform: translateY(0);
}

.start-overlay-footer {
    font-size: 0.8rem;
    color: #a0a0a0;
    margin-top: 1rem;
}

.hexagon-container {
    position: relative;
}

@keyframes startMessageAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

@media (max-width: 768px) {
    .start-overlay-content {
        max-width: 90%;
        padding: 1.5rem;
    }
    
    .start-overlay-content h2 {
        font-size: 1.3rem;
    }
    
    .start-puzzle-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}


@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}


.start-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.tutorial-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tutorial-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .start-buttons {
        gap: 12px;
    }
    
    .tutorial-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}










/* Score breakdown in table cells */
.score-cell {
    text-align: right;
    padding: 0.5rem;
}

.score-breakdown {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.total-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4caf50;
}

.achievement-bonus {
    font-size: 0.8rem;
    color: #ffd700;
    font-weight: 600;
    background: rgba(255, 215, 0, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Enhanced stats grid for 6 items */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Improved rating badges */
.rating-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid currentColor;
}

/* Enhanced table responsiveness for new column */
@media (max-width: 768px) {
    .records-table {
        font-size: 0.85rem;
    }
    
    .leaderboard-entry {
        grid-template-columns: 50px 1fr auto auto;
        gap: 0.5rem;
    }
    
    /* Hide less important columns on mobile */
    .records-table th:nth-child(4), /* Penalty column */
    .records-table td:nth-child(4),
    .records-table th:nth-child(5), /* Effective Time column */
    .records-table td:nth-child(5) {
        display: none;
    }
}

/* Score animation effects */
.score-breakdown .total-score {
    transition: all 0.3s ease;
}

.score-breakdown .total-score:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px #4caf50;
}

/* Achievement bonus glow effect */
.achievement-bonus {
    animation: bonusGlow 2s ease-in-out infinite alternate;
}

@keyframes bonusGlow {
    from {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    }
    to {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    }
}

/* Tier-based rating colors */
.rating-badge[style*="#ff6b35"] { /* LEGENDARY */
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.4);
}

.rating-badge[style*="#8b5cf6"] { /* MASTER */
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: white;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.4);
}

.rating-badge[style*="#ef4444"] { /* EXPERT */
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}

.rating-badge[style*="#f59e0b"] { /* ADVANCED */
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a1a2e;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.rating-badge[style*="#10b981"] { /* SKILLED */
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}



.score-breakdown-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
}

.score-breakdown-section h3 {
    color: #ffd700;
    margin: 0 0 15px 0;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
}

.breakdown-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-label {
    font-size: 0.95rem;
    color: #e0e0e0;
}

.breakdown-value {
    font-weight: 600;
    font-size: 1rem;
    color: #ffffff;
}

.breakdown-positive {
    color: #4caf50 !important;
}

.breakdown-negative {
    color: #f44336 !important;
}

.breakdown-subtotal {
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    margin-top: 10px;
    padding-top: 15px;
}

.breakdown-subtotal .breakdown-value {
    color: #ffd700;
    font-size: 1.1rem;
}

.breakdown-final {
    border-top: 3px solid #ffd700;
    margin-top: 15px;
    padding-top: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 5px;
}

.breakdown-final-score {
    color: #ffd700 !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
}

.breakdown-achievements-header {
    font-size: 0.9rem;
    color: #ffd700;
    margin: 10px 0 5px 0;
    font-weight: 600;
}

.achievement-bonus-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
    color: #c0c0c0;
}

.achievement-bonus-item .bonus-points {
    color: #4caf50;
    font-weight: 600;
}

.breakdown-explanation {
    font-size: 0.85rem;
    color: #a0a0a0;
    text-align: center;
    line-height: 1.4;
    margin-top: 10px;
}

.breakdown-explanation p {
    margin: 0;
}

@media (max-width: 768px) {
    .breakdown-row {
        font-size: 0.9rem;
    }
    
    .breakdown-value {
        font-size: 0.95rem;
    }
    
 .breakdown-final-score {
    color: #ffd700 !important; /* Bright gold */
    font-weight: 700 !important;
    font-size: 1.2em !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
}


/* Main results section styling */
.main-results {
    text-align: center;
    margin: 20px 0;
   padding: 0;
    background: none;
    border: none;
    border-radius: 15px;
    color: white;
}

.final-score-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 10px 0;
}

.main-results #finalScore {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.main-results #completionTime {
    color: #e0e0e0;
    font-size: 1.1rem;
}

.completion-stats {
    font-size: 1.1rem;
    color: #666;
    margin: 10px 0;
}

/* Performance pills */
.performance-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.pill {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.pill.speed { background: #4caf50; }
.pill.hints { background: #8b5cf6; }
.pill.accuracy { background: #10b981; }
.pill.score { background: #ffd700; color: #333; }


/* Share section - buttons only */
.share-section {
    text-align: center;
    margin: 25px 0;
}

.share-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}


/* Sign-in prompt always visible */
.sign-in-prompt-visible {
     display: block !important;
    margin: 15px 0 !important;
    padding: 15px !important;
    background: linear-gradient(135deg, #4285f4, #34a853);
    border-radius: 12px;
    color: white;
    text-align: center;
}



/* Sign-in prompt - always visible */
.sign-in-prompt {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

.benefits-list {
    text-align: left;
    max-width: 400px;
    margin: 15px auto;
}

.benefits-list li {
    margin: 8px 0;
    font-size: 0.95rem;
}

.sign-in-button {
    background: white;
    color: #4285f4;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    margin: 15px 0 10px 0;
    font-size: 1rem;
}

.sign-in-note {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 5px 0 0 0;
}

/* Breakdown toggle */
.breakdown-toggle {
    text-align: center;
    margin: 20px 0;
}

.breakdown-toggle-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    font-weight: 500;
}

/* Bottom actions - centered */
.bottom-actions {
    text-align: center;
    margin: 25px 0;
}

/* Hidden content for sharing */
#hiddenShareContent {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .performance-pills {
        gap: 8px;
    }
    
    .pill {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .share-buttons {
        gap: 10px;
    }
}


.sign-in-prompt-visible h3 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 1.3rem;
}

.sign-in-prompt-visible ul {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.sign-in-button {
    background: white;
    color: #4285f4;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    margin: 15px 0 10px 0;
    transition: transform 0.2s ease;
}

.sign-in-button:hover {
    transform: translateY(-1px);
}

.sign-in-note {
    margin: 10px 0 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Collapsible breakdown */
.breakdown-toggle {
    margin: 20px 0 0 0;
    text-align: center;
}

.breakdown-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.breakdown-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toggle-arrow {
    transition: transform 0.3s ease;
}

.breakdown-toggle-btn.expanded .toggle-arrow {
    transform: rotate(180deg);
}

.breakdown-toggle-btn.expanded .toggle-text::after {
    content: " Breakdown";
}

.breakdown-toggle-btn:not(.expanded) .toggle-text::after {
    content: " Score Breakdown";
}

/* Collapsed state */
.score-breakdown-section.collapsed {
    display: none !important;
    max-height: 0 !important;
    opacity: 0 !important;
}

.score-breakdown-section:not(.collapsed) {
    display: block !important;
    max-height: 1000px !important;
    opacity: 1 !important;
}

/* Fix final score visibility */
.breakdown-final-score {
    color: #ffd700 !important;
    font-weight: 700 !important;
    font-size: 1.2em !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}






.control-button:disabled,
.lightbulb-button:disabled,
.virtual-keyboard button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.lightbulb-button.disabled {
    opacity: 0.3 !important;
    background: #666 !important;
}

.hexagon[data-locked="true"] {
    pointer-events: none !important;
    opacity: 0.8;
}


.breakdown-toggle-btn * {
    pointer-events: none !important;
}

.breakdown-toggle-btn {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 0 auto !important;
    font-weight: 500 !important;
}

.breakdown-toggle-btn .toggle-text,
.breakdown-toggle-btn .toggle-arrow {
    color: #333 !important;
}

.breakdown-toggle-btn:hover {
    background: #e5e5e5 !important;
}



/* Fix final score visibility */
.score-breakdown-section .breakdown-final .breakdown-final-score,
.breakdown-final-score {
    color: #ffd700 !important;
    font-weight: 700 !important;
    font-size: 1.4rem !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important;
    background: rgba(0,0,0,0.3) !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    display: inline-block !important;
}

/* Ensure the final score row has better contrast */
.breakdown-final {
    background: rgba(255, 215, 0, 0.15) !important;
    border: 2px solid #ffd700 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin-top: 15px !important;
}

.breakdown-final .breakdown-label {
    color: #ffd700 !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7) !important;
}


/* Fix the "FINAL SCORE" label text */
.breakdown-final .breakdown-label {
    color: #ffd700 !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important;
    font-size: 1.1rem !important;
}

/* Alternative: Make the entire final row have better contrast */
.breakdown-final {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1)) !important;
    border: 2px solid #ffd700 !important;
    color: #ffd700 !important;
}

/* Ensure all text in final row is bright */
.breakdown-final * {
    color: #ffd700 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}






/* Force cache-busting with extreme specificity */
html body .content-container header div#game-stats,
html body .content-container header #game-stats,
body .content-container header #game-stats,
.content-container header #game-stats,
header #game-stats,
#game-stats {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    margin: 0 auto !important;  /* Center the container itself */
    width: auto !important;     /* Let it size to content instead of 100% */
    max-width: 100% !important; /* Prevent overflow */
    flex-wrap: wrap !important;
}

/* Target every possible element that could be the stat displays */
html body .content-container header #game-stats > *,
html body .content-container header #game-stats .timer-display,
html body .content-container header #game-stats .hint-count,
html body .content-container header #game-stats #timer-display,
html body .content-container header #game-stats #hint-count-display,
html body .content-container header #game-stats #edit-count-display,
body .content-container header #game-stats > *,
.content-container header #game-stats > *,
header #game-stats > *,
#game-stats > *,
#timer-display,
#hint-count-display,
#edit-count-display,
.timer-display,
.hint-count {
    font-family: 'Oswald', sans-serif !important;
    font-size: 1.5rem !important;
    color: #ffd700 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex: 1 1 auto !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 5px !important;
   
}

/* Mobile specific overrides */
@media screen and (max-width: 768px) {
    html body .content-container header #game-stats,
    body .content-container header #game-stats,
    .content-container header #game-stats,
    header #game-stats,
    #game-stats {
        margin: 18px auto 12px auto !important;
        padding: 10px 20px !important;
        gap: 10px !important;
    }
    
    html body .content-container header #game-stats > *,
    body .content-container header #game-stats > *,
    .content-container header #game-stats > *,
    header #game-stats > *,
    #game-stats > *,
    #timer-display,
    #hint-count-display,
    #edit-count-display,
    .timer-display,
    .hint-count {
        font-size: 1.4rem !important;
    }
    
    /* ADD THIS NEW RULE: */
    .help-button {
        top: 10px !important;
        right: 10px !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 1.1rem !important;
        z-index: 100 !important;
    }


.help-button {
        display: none !important;
    }
}

@media screen and (max-width: 480px) {
    html body .content-container header #game-stats,
    body .content-container header #game-stats,
    .content-container header #game-stats,
    header #game-stats,
    #game-stats {
        margin: 20px auto 15px auto !important;
        padding: 12px 25px !important;
        justify-content: space-evenly !important;
    }
    
    html body .content-container header #game-stats > *,
    body .content-container header #game-stats > *,
    .content-container header #game-stats > *,
    header #game-stats > *,
    #game-stats > *,
    #timer-display,
    #hint-count-display,
    #edit-count-display,
    .timer-display,
    .hint-count {
        font-size: 1.3rem !important;
        flex: 1 1 33.333% !important;
    }
}

/* Extremely aggressive override for stubborn mobile browsers */
* [id*="game-stats"] {
    display: flex !important;
    flex-direction: row !important;
}

* [id*="timer-display"],
* [id*="hint-count"],
* [id*="edit-count"] {
    font-size: 1.3rem !important;
    color: #ffd700 !important;
    display: inline-block !important;
}


/* Dynamic rating badge styling - uses rating color as background */
.rating-badge {
    padding: 4px 8px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    /* Default fallback */
    background: rgba(107, 114, 128, 0.2) !important;
    color: #6b7280 !important;
}

/* Specific color combinations for each rating */
.rating-badge[style*="#ff6b35"] { /* LEGENDARY */
    background: #ff6b35 !important;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

.rating-badge[style*="#8b5cf6"] { /* MASTER */
    background: #8b5cf6 !important;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

.rating-badge[style*="#ef4444"] { /* EXPERT */
    background: #ef4444 !important;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

.rating-badge[style*="#f59e0b"] { /* ADVANCED */
    background: #f59e0b !important;
    color: #1a1a2e !important; /* Dark text for yellow background */
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8) !important;
}

.rating-badge[style*="#10b981"] { /* SKILLED */
    background: #10b981 !important;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

.rating-badge[style*="#6b7280"] { /* COMPETENT */
    background: #6b7280 !important;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

.rating-badge[style*="#9ca3af"] { /* NOVICE */
    background: #9ca3af !important;
    color: #1a1a2e !important; /* Dark text for light background */
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8) !important;
}




/* Force navigation to appear above everything */
.nav-container {
    position: relative !important;
    z-index: 9999 !important;
}

.nav-links {
    position: relative !important;
    z-index: 10000 !important;
}

.nav-links.active {
    position: absolute !important;
    z-index: 10001 !important;
}

/* Ensure modal stays below */
.game-start-overlay {
    z-index: 1000 !important;
}