        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
            color: #e0e0e0;
            min-height: 98vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        .container {
            width: 95%;
            max-width: 1200px;
            height: 95vh;
            display: grid;
            grid-template-columns: 250px 1fr 250px;
            grid-template-rows: auto 1fr auto;
            gap: 20px;
            padding: 20px;
        }

        /* Header */
        .header {
            grid-column: 1 / -1;
            text-align: center;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            border: 2px solid rgba(100, 200, 255, 0.3);
            box-shadow: 0 0 20px rgba(100, 200, 255, 0.2);
            position: relative;
        }

        .stats-btn {
            position: absolute;
            left: 20px;
            top: 25%;
            transform: translateY(-50%);
            padding: 10px 20px;
            background: linear-gradient(135deg, #bd8634, #76240a);
            border: 2px solid rgba(255, 152, 0, 0.5);
            border-radius: 8px;
            color: white;
            font-weight: 700;
            font-size: 0.9em;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 0 15px rgba(255, 152, 0, 0.3);
        }

        .stats-btn:hover {
            background: linear-gradient(135deg, #ff5722, #ff9800);
            box-shadow: 0 0 25px rgba(255, 152, 0, 0.5);
            transform: translateY(-50%) scale(1.05);
        }

        .header h1 {
            font-size: 2.5em;
            font-weight: 700;
            background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 50%, #2196f3 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-shadow: 0 0 30px rgba(100, 181, 246, 0.5);
            letter-spacing: 3px;
        }

        .mode-badge {
            display: inline-block;
            margin-top: 8px;
            padding: 6px 20px;
            background: rgba(100, 200, 255, 0.2);
            border-radius: 20px;
            font-size: 0.9em;
            color: #64b5f6;
            border: 1px solid rgba(100, 200, 255, 0.4);
        }

        /* Mode Selector */
        .mode-selector {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 10px;
        }

        .mode-btn {
            padding: 8px 20px;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(100, 200, 255, 0.3);
            border-radius: 8px;
            color: #888;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .mode-btn.active {
            background: linear-gradient(135deg, #2196f3, #64b5f6);
            color: white;
            border-color: #64b5f6;
            box-shadow: 0 0 15px rgba(33, 150, 243, 0.5);
        }

        /* Left Panel - Controls */
        .controls-panel {
            grid-column: 1;
            grid-row: 2;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            padding: 20px;
            border: 2px solid rgba(100, 200, 255, 0.2);
            overflow-y: auto;
        }

        .control-group {
            margin-bottom: 15px;
        }

        .control-group label {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            font-size: 0.85em;
            color: #64b5f6;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .toggle-button {
            display: flex;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid rgba(100, 200, 255, 0.3);
        }

        .toggle-button button {
            flex: 1;
            padding: 10px;
            background: transparent;
            border: none;
            color: #888;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            font-size: 0.85em;
        }

        .toggle-button button.active {
            background: linear-gradient(135deg, #2196f3, #64b5f6);
            color: white;
            box-shadow: 0 0 15px rgba(33, 150, 243, 0.5);
        }

        .slider-container {
            margin-top: 5px;
        }

        input[type="range"] {
            width: 100%;
            height: 8px;
            border-radius: 5px;
            background: rgba(255, 255, 255, 0.1);
            outline: none;
            -webkit-appearance: none;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(135deg, #2196f3, #64b5f6);
            cursor: pointer;
            box-shadow: 0 0 10px rgba(33, 150, 243, 0.8);
        }

        input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(135deg, #2196f3, #64b5f6);
            cursor: pointer;
            box-shadow: 0 0 10px rgba(33, 150, 243, 0.8);
            border: none;
        }

        .slider-value {
            font-size: 0.85em;
            color: #64b5f6;
            font-weight: 600;
        }

        .start-button {
            width: 100%;
            padding: 15px;
            background: linear-gradient(135deg, #4caf50, #66bb6a);
            border: none;
            border-radius: 10px;
            color: white;
            font-size: 1.2em;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .start-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 0 30px rgba(76, 175, 80, 0.6);
        }

        .start-button:active {
            transform: translateY(0);
        }

        /* Center Panel - Flash Zone */
        .flash-zone {
            grid-column: 2;
            grid-row: 2;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            gap: 8px;
        }

        .flash-display {
            width: 100%;
            height: 260px;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 20px;
            border: 3px solid rgba(100, 200, 255, 0.3);
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            overflow: hidden;
            box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
        }

        .flash-number {
            font-size: 8em;
            font-weight: 700;
            color: #64b5f6;
        /*    text-shadow: 0 0 40px rgba(100, 181, 246, 0.8),
                         0 0 80px rgba(100, 181, 246, 0.6); */
            opacity: 0;
            transition: opacity 0.1s ease; 
        }

        .flash-number.show {
            opacity: 1;
        }

        /* Dynamic font sizes based on digit count */
        .flash-number.digits-1,
        .flash-number.digits-2 {
            font-size: 8em;
        }
        .flash-number.digits-3,
        .flash-number.digits-4 {
            font-size: 7em;
        }
        .flash-number.digits-5,
        .flash-number.digits-6 {
            font-size: 6.5em;
        }

        .flash-number.digits-7,
        .flash-number.digits-8 {
            font-size: 6em;
        }

        .flash-number.digits-9 {
            font-size: 5.5em;
        }

        .flash-number.digits-10 {
            font-size: 5em;
        }

        /* Multiplication & Division font sizes based on level */
        .flash-number.multdiv-level-1 {
            font-size: 8em;    /* 1×1 or exact 1×1 or 2÷1 */
        }

        .flash-number.multdiv-level-2 {
            font-size: 7.5em;  /* 2×1 or exact 2×1 or 3÷1 */
        }

        .flash-number.multdiv-level-3 {
            font-size: 7em;    /* 3×1 or exact 3×1 or 4÷1 */
        }

        .flash-number.multdiv-level-4 {
            font-size: 6.5em;  /* 4×1 or exact 4×1 or 3÷2 */
        }

        .flash-number.multdiv-level-5 {
            font-size: 6em;    /* 2×2 or exact 2×2 or 4÷2 */
        }

        .flash-number.multdiv-level-6 {
            font-size: 5.5em;  /* 3×2 or exact 3×2 or 5÷2 */
        }

        .flash-number.multdiv-level-7 {
            font-size: 5em;    /* 3×3 or exact 3×3 or 6÷2 */
        }

        .flash-number.multdiv-table {
            font-size: 8em;    /* Multiplication table */
        }

        .bead-display {
            display: flex;
            gap: 0px;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.1s ease;
            padding: 10px;
        }

        .bead-display.show {
            opacity: 1;
        }

        .abacus-rod {
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            height: 300px;
            width: 50px;
        }

        .beam {
            position: absolute;
            width: 50px;
            height: 12px;
            background: linear-gradient(to bottom, 
                #c8a882 0%, 
                #b8976f 50%, 
                #a88860 100%);
            border-radius: 0px;
            box-shadow: none; /*0 2px 8px rgba(0, 0, 0, 0.4); */
            top: 100px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1;
        }

        .unit-marker {
            position: absolute;
            width: 12px;
            height: 12px;
            background: radial-gradient(circle at 35% 35%, #ffffff, #e0e0e0);
            border-radius: 50%;
            box-shadow: none; /*0 0 8px rgba(255, 255, 255, 0.6),
                       0 2px 4px rgba(0, 0, 0, 0.3); */
            top: 100px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 2;
        }

        .bead-section {
            position: absolute;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0;
            left: 50%;
            transform: translateX(-50%);
        }

        .upper-section {
            bottom: 200px; /* Position upper beads to touch beam from above */
            flex-direction: column-reverse;
        }

        .lower-section {
            top: 112px; /* Position lower beads to touch beam from below */
        }

        .bead {
            width: 40px;
            height: 40px;
            border-radius: 50%;
        }

        .bead.upper {
            background: radial-gradient(circle at 35% 35%, #ffdf8f, #ae671b, #cc9133); /*radial-gradient(circle at 35% 35%, #5c5b45, #353917, #cc3333);*/
        }

        .bead.lower {
            background: radial-gradient(circle at 35% 35%, #f6e5bc, #9da547, #aec941); /*radial-gradient(circle at 35% 35%, #ffd05a, #dd4444, #bb2222);*/ 
        }
@keyframes beadGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.8),
                   0 0 35px rgba(255, 107, 107, 0.6),
                   0 4px 8px rgba(0, 0, 0, 0.3),
                   inset -3px -3px 8px rgba(0, 0, 0, 0.2),
                   inset 3px 3px 8px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 107, 107, 1),
                   0 0 45px rgba(255, 107, 107, 0.8),
                   0 4px 8px rgba(0, 0, 0, 0.3),
                   inset -3px -3px 8px rgba(0, 0, 0, 0.2),
                   inset 3px 3px 8px rgba(255, 255, 255, 0.3);
    }
}

        /* Timer Bar */
        .timer-bar-container {
            width: 100%;
            height: 20px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            overflow: hidden;
            border: 2px solid rgba(100, 200, 255, 0.3);
            position: relative;
        }

        .timer-bar {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #4caf50, #ff9800, #f44336);
            transition: width 0.1s linear;
            border-radius: 8px;
        }

        .answer-section {
            display: flex;
            flex-direction: column;
            gap: 5px;
            width: 100%;
            max-width: 500px;
        }

        .answer-input {
            width: 100%;
            padding: 15px;
            font-size: 1.8em;
            text-align: center;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(100, 200, 255, 0.3);
            border-radius: 10px;
            color: #64b5f6;
            font-weight: 600;
            outline: none;
            transition: all 0.3s ease;
        }

        .answer-input:focus {
            border-color: #64b5f6;
            box-shadow: 0 0 20px rgba(100, 181, 246, 0.3);
        }

        .answer-input:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .submit-button {
            padding: 12px;
            background: linear-gradient(135deg, #2196f3, #64b5f6);
            border: none;
            border-radius: 10px;
            color: white;
            font-size: 1.1em;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 0 20px rgba(33, 150, 243, 0.4);
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .submit-button:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 0 30px rgba(33, 150, 243, 0.6);
        }

        .submit-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .next-button {
            padding: 12px;
            background: linear-gradient(135deg, #4caf50, #66bb6a);
            border: none;
            border-radius: 10px;
            color: white;
            font-size: 1.1em;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
            text-transform: uppercase;
            letter-spacing: 2px;
            display: none;
        }

        .next-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 0 30px rgba(76, 175, 80, 0.6);
        }

        .next-button.show {
            display: block;
        }

        /* Right Panel - Score & Feedback */
        .score-panel {
            grid-column: 3;
            grid-row: 2;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .scoreboard {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 10px 15px;
            border: 2px solid rgba(100, 200, 255, 0.2);
            display: flex;
            align-items: center;
            gap: 15px;
            justify-content: center;
        }

        .scoreboard h3 {
            color: #64b5f6;
            font-size: 0.8em;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin: 0;
        }

        .score-display {
            font-size: 1.5em;
            font-weight: 700;
            color: #4caf50;
            text-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
        }

        .feedback-zone {
            flex: 1;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            padding: 10px;
            border: 2px solid rgba(100, 200, 255, 0.2);
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            gap: 8px;
        }

        .emoji {
            font-size: 3em;
            opacity: 0;
            transform: scale(0);
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        .emoji.show {
            opacity: 1;
            transform: scale(1);
        }

        .feedback-text {
            font-size: 1em;
            font-weight: 600;
            text-align: center;
            opacity: 0;
            transition: opacity 0.3s ease;
            margin: 5px 0;
        }

        .feedback-text.show {
            opacity: 1;
        }

        .feedback-text.correct {
            color: #4caf50;
            text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
        }

        .feedback-text.incorrect {
            color: #f44336;
            text-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
        }

        /* Instructions */
        .instructions {
            grid-column: 1 / -1;
            grid-row: 3;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 10px;
            padding: 15px;
            text-align: center;
            font-size: 0.9em;
            color: #888;
            border: 1px solid rgba(100, 200, 255, 0.1);
        }

        .status-text {
            font-size: 1.5em;
            color: #64b5f6;
            text-align: center;
            font-weight: 600;
        }

        .status-text.prompt-exclamation,
        .status-text.prompt-question {
            font-size: 6em;
            font-weight: 700;
            animation: pulse 0.5s ease-in-out;
        }

        .status-text.prompt-exclamation {
            color: #ff9800;
         /*   text-shadow: 0 0 30px rgba(255, 152, 0, 0.8); */
        }

        .status-text.prompt-question {
            color: #4caf50;
         /*   text-shadow: 0 0 30px rgba(76, 175, 80, 0.8); */
        }

        @keyframes pulse {
            0% {
                transform: scale(0.8);
                opacity: 0;
            }
            50% {
                transform: scale(1.1);
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        /* Number Keypad */
        .number-keypad {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
            padding: 8px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            border: 2px solid rgba(100, 200, 255, 0.2);
            max-width: 250px;
            margin: 0 auto;
        }

        .keypad-btn {
            padding: 8px 12px;
            background: linear-gradient(135deg, rgba(100, 200, 255, 0.2), rgba(100, 200, 255, 0.1));
            border: 2px solid rgba(100, 200, 255, 0.3);
            border-radius: 6px;
            color: white;
            font-size: 1.2em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
        }

        .keypad-btn:hover {
            background: linear-gradient(135deg, rgba(100, 200, 255, 0.3), rgba(100, 200, 255, 0.2));
            border-color: #64b5f6;
            transform: translateY(-2px);
        }

        .keypad-btn:active {
            transform: translateY(0);
        }

        .keypad-btn.special {
            background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 152, 0, 0.1));
            border-color: rgba(255, 152, 0, 0.3);
        }

        .keypad-btn.special:hover {
            background: linear-gradient(135deg, rgba(255, 152, 0, 0.3), rgba(255, 152, 0, 0.2));
            border-color: #ff9800;
        }

        .keypad-btn.enter {
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
            border-color: rgba(76, 175, 80, 0.3);
            grid-column: span 2;
        }

        .keypad-btn.enter:hover {
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(76, 175, 80, 0.2));
            border-color: #4caf50;
        }

        /* Stats Modal */
        .stats-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .stats-modal.show {
            display: flex;
        }

        .stats-content {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border-radius: 15px;
            padding: 30px;
            max-width: 900px;
            max-height: 85vh;
            overflow-y: auto;
            border: 2px solid rgba(100, 200, 255, 0.3);
            box-shadow: 0 0 40px rgba(100, 200, 255, 0.3);
        }

        .stats-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid rgba(100, 200, 255, 0.2);
        }

        .stats-header h2 {
            color: #64b5f6;
            font-size: 1.8em;
            margin: 0;
        }

        .stats-close {
            background: rgba(244, 67, 54, 0.2);
            border: 2px solid rgba(244, 67, 54, 0.5);
            color: #f44336;
            padding: 8px 15px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 700;
            transition: all 0.2s ease;
        }

        .stats-close:hover {
            background: rgba(244, 67, 54, 0.3);
            transform: scale(1.05);
        }

        .stats-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }

        .stats-tab {
            flex: 1;
            padding: 10px;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(100, 200, 255, 0.2);
            border-radius: 8px;
            color: #888;
            cursor: pointer;
            text-align: center;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .stats-tab.active {
            background: linear-gradient(135deg, #2196f3, #64b5f6);
            color: white;
            border-color: #64b5f6;
        }

        .stats-section {
            display: none;
        }

        .stats-section.active {
            display: block;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .stat-card {
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(100, 200, 255, 0.2);
            border-radius: 10px;
            padding: 15px;
            text-align: center;
        }

        .stat-label {
            color: #888;
            font-size: 0.9em;
            margin-bottom: 8px;
        }

        .stat-value {
            color: #64b5f6;
            font-size: 2em;
            font-weight: 700;
        }

        .stat-value.accent {
            color: #4caf50;
        }

        .category-stats {
            margin-bottom: 20px;
        }

        .category-header {
            color: #64b5f6;
            font-size: 1.2em;
            margin-bottom: 10px;
            padding-bottom: 5px;
            border-bottom: 1px solid rgba(100, 200, 255, 0.2);
        }

        .stat-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

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

        .stat-name {
            color: #aaa;
        }

        .stat-data {
            color: #64b5f6;
            font-weight: 600;
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .container {
                grid-template-columns: 1fr;
                grid-template-rows: auto auto 1fr auto auto;
                height: auto;
                min-height: 100vh;
            }

            .controls-panel {
                grid-column: 1;
                grid-row: 2;
            }

            .flash-zone {
                grid-column: 1;
                grid-row: 3;
                min-height: 400px;
            }

            .score-panel {
                grid-column: 1;
                grid-row: 4;
                flex-direction: column;
                gap: 10px;
            }

            .scoreboard,
            .feedback-zone {
                flex: 1;
            }

            .number-keypad {
                max-width: 100%;
                padding: 8px;
                gap: 6px;
            }

            .keypad-btn {
                padding: 8px 10px;
                font-size: 1.1em;
            }

            .instructions {
                grid-row: 5;
            }
        }
/* Help Modal Styles */
.help-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.help-modal.show {
    display: block;
    opacity: 1;
}

.help-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.help-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fffbf0; /* Cream background */
    color: #2c2c2c; /* Dark text */
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.help-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff6b6b;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    z-index: 10;
}

.help-modal-close:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.help-modal-content h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
}

.help-section {
    margin-bottom: 30px;
}

.help-section h2 {
    color: #667eea;
    font-size: 24px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-section p {
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 16px;
}

.mode-card {
    background: white;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mode-card h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 10px;
}

.parameters {
    margin-top: 15px;
    background: #f8f9ff;
    padding: 15px;
    border-radius: 6px;
}

.parameters strong {
    color: #667eea;
    display: block;
    margin-bottom: 10px;
}

.parameters ul {
    list-style: none;
    padding-left: 0;
}

.parameters li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.parameters li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #667eea;
}

.strategy-steps {
    margin-top: 20px;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.step-content {
    flex: 1;
}

.step-content strong {
    color: #333;
    font-size: 18px;
    display: block;
    margin-bottom: 8px;
}

.step-content p {
    margin-bottom: 10px;
}

.step-content ul {
    margin-left: 20px;
    margin-top: 10px;
}

.step-content ul li {
    margin-bottom: 5px;
}

.highlight {
    background: #fff3cd;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    margin-top: 10px;
    font-weight: 600;
    color: #856404;
}

.tips-list {
    list-style: none;
    padding-left: 0;
}

.tips-list li {
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    line-height: 1.6;
}

.success-message {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #4caf50;
    text-align: center;
}

.success-message h2 {
    color: #2e7d32;
}

.success-message p {
    font-size: 18px;
    margin: 0;
}

.close-button {
    display: block;
    margin: 30px auto 0;
    padding: 15px 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.close-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .help-modal-content {
        width: 95%;
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .help-modal-content h1 {
        font-size: 24px;
    }
    
    .help-section h2 {
        font-size: 20px;
    }
    
    .step {
        flex-direction: column;
        gap: 10px;
    }
}
/* Font Selection Section in Help Modal */
.font-selection-section {
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ebff 100%);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #667eea;
    margin-bottom: 30px;
}

.font-selection-section h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.font-selection-section p {
    color: #555;
    margin-bottom: 15px;
}

.font-buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.font-btn {
    background: white;
    border: 3px solid #ddd;
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 100px;
}

.font-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.font-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.font-btn.active .font-preview {
    color: white;
}

.font-btn.active .font-name {
    color: white;
    font-weight: 700;
}

.font-preview {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.font-name {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-align: center;
}

.font-info {
    font-size: 13px;
    color: #667eea;
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
}

/* Responsive for font buttons */
@media (max-width: 768px) {
    .font-buttons-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .font-btn {
        min-height: 90px;
        padding: 12px 8px;
    }
    
    .font-preview {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .font-buttons-container {
        grid-template-columns: 1fr;
    }
}
