@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a1f2e;
    --bg-card-hover: #222839;
    --accent: #00e5ff;
    --accent-dim: rgba(0, 229, 255, 0.15);
    --accent-glow: rgba(0, 229, 255, 0.4);
    --green: #00e676;
    --green-dim: rgba(0, 230, 118, 0.15);
    --red: #ff5252;
    --red-dim: rgba(255, 82, 82, 0.15);
    --orange: #ffab40;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Animated background grid */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Floating binary digits background */
body::after {
    content: '01001 10110 01101 00101 11010 01001 10010 11100 00110 10101';
    position: fixed;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: rgba(0, 229, 255, 0.04);
    word-spacing: 40px;
    line-height: 3;
    letter-spacing: 8px;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
    white-space: pre-wrap;
}

.page-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
}

/* Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #7c4dff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 16px;
    color: var(--bg-primary);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.logo h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-controls {
    display: flex;
    gap: 8px;
}

.select-styled {
    appearance: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 32px 8px 12px;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa0a6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.select-styled:hover {
    border-color: var(--accent);
    background-color: var(--bg-card-hover);
}

.select-styled:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Main card */
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.stat-item {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
}

.stat-value.level {
    color: var(--accent);
}

.stat-value.score {
    color: var(--green);
}

.stat-value.timer {
    color: var(--red);
    transition: color 0.3s ease;
}

.stat-value.timer.warning {
    animation: pulse-red 0.5s ease infinite alternate;
}

@keyframes pulse-red {
    from { color: var(--red); text-shadow: none; }
    to { color: #ff1744; text-shadow: 0 0 10px rgba(255, 82, 82, 0.5); }
}

/* Mode selector */
.mode-section {
    margin-bottom: 24px;
}

.mode-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.mode-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border);
}

.mode-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mode-btn.active {
    background: var(--accent-dim);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 229, 255, 0.15);
}

.mode-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.mode-arrow {
    font-size: 16px;
}

/* Question area */
.question-section {
    text-align: center;
    margin-bottom: 28px;
}

.question-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.question-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    letter-spacing: 4px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    word-break: break-all;
    transition: all 0.3s ease;
}

.question-display::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.question-type-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.badge-binary {
    background: var(--accent-dim);
    color: var(--accent);
}

.badge-decimal {
    background: rgba(124, 77, 255, 0.15);
    color: #b388ff;
}

/* Answer area */
.answer-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.answer-input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    transition: all 0.2s ease;
}

.answer-input::placeholder {
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 0;
    font-weight: 400;
}

.answer-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-dim);
    background: rgba(0, 229, 255, 0.03);
}

.submit-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent), #00b0ff);
    border: none;
    border-radius: 12px;
    color: var(--bg-primary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

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

/* Feedback area */
.feedback-section {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-msg {
    font-size: 15px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.feedback-correct {
    color: var(--green);
    background: var(--green-dim);
}

.feedback-wrong {
    color: var(--red);
    background: var(--red-dim);
}

.feedback-timeup {
    color: var(--orange);
    background: rgba(255, 171, 64, 0.15);
}

/* Timer progress bar */
.timer-bar-container {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    margin-top: 24px;
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #00b0ff);
    border-radius: 2px;
    transition: width 1s linear, background 0.3s ease;
    width: 100%;
}

.timer-bar.warning {
    background: linear-gradient(90deg, var(--orange), var(--red));
}

/* Streak indicator */
.streak-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    min-height: 24px;
}

.streak-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
}

.streak-dot.filled {
    background: var(--green);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.4);
}

/* Correct answer reveal */
.correct-answer-reveal {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    animation: fadeIn 0.3s ease;
}

.correct-answer-reveal span {
    color: var(--accent);
    font-weight: 600;
}

/* GitHub button */
.github-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.github-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--accent-dim);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Intro text above game */
.content-intro {
    margin-bottom: 16px;
    text-align: center;
}

.content-intro p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.content-intro strong {
    color: var(--accent);
}

/* Ad banners */
.ad-banner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    max-width: 720px;
}

.ad-banner-mid {
    margin-top: 32px;
    margin-bottom: 32px;
}

.ad-banner-bottom {
    margin-top: 32px;
    margin-bottom: 24px;
}

.ad-banner ins {
    width: 100%;
}

/* Educational content sections */
.content-section {
    width: 100%;
    max-width: 720px;
}

.content-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 20px;
}

.content-block h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-block p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-secondary);
}

.content-block strong {
    color: var(--text-primary);
}

.content-example {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 16px;
}

.content-example h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    font-family: 'JetBrains Mono', monospace;
}

.content-example ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.content-example li {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.content-example li:last-child {
    border-bottom: none;
}

.content-example li strong {
    color: var(--accent);
}

.content-example p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.content-example p strong {
    color: var(--green);
    font-size: 16px;
}

/* Reference table */
.reference-table-wrapper {
    margin-top: 16px;
    overflow-x: auto;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

.reference-table th {
    background: var(--bg-secondary);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 16px;
    text-align: center;
    border-bottom: 2px solid var(--border);
}

.reference-table td {
    padding: 8px 16px;
    text-align: center;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.reference-table td:nth-child(odd) {
    color: var(--text-primary);
    font-weight: 600;
}

.reference-table td:nth-child(even) {
    color: var(--accent);
}

.reference-table tbody tr:hover {
    background: rgba(0, 229, 255, 0.03);
}

/* Footer */
.site-footer {
    width: 100%;
    max-width: 720px;
    text-align: center;
    padding: 24px 16px 32px;
    border-top: 1px solid var(--border);
}

.site-footer p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Learn button */
.learn-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.learn-btn:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Learn modal overlay */
.learn-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.learn-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}

.learn-modal-overlay.active .learn-modal {
    transform: translateY(0) scale(1);
}

.learn-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), #7c4dff, transparent);
    opacity: 0.8;
}

/* Scrollbar styling for modal */
.learn-modal::-webkit-scrollbar {
    width: 6px;
}

.learn-modal::-webkit-scrollbar-track {
    background: transparent;
}

.learn-modal::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.learn-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.learn-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.learn-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.learn-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Tabs */
.learn-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.learn-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.learn-tab.active {
    background: var(--accent-dim);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 229, 255, 0.15);
}

.learn-tab:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

/* Content */
.learn-content {
    animation: fadeIn 0.3s ease;
}

.learn-content.hidden {
    display: none;
}

/* Steps */
.learn-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.step-number {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: linear-gradient(135deg, var(--accent), #00b0ff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--bg-primary);
}

.step-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.step-text strong {
    color: var(--text-primary);
}

/* Example boxes */
.learn-example-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.example-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

/* Bit breakdown (BIN→DEC step 1) */
.bit-breakdown {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.bit-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.bit-digit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.bit-digit.accent {
    color: var(--accent);
}

.bit-digit.dim {
    color: var(--text-muted);
    opacity: 0.5;
}

.bit-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

.bit-pos {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
}

/* Power row (BIN→DEC step 2) */
.power-row {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.power-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: 10px;
    padding: 12px 18px;
}

.power-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
}

.power-eq {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Final calc (BIN→DEC step 3) */
.calc-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.calc-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

.calc-bit {
    font-weight: 700;
    font-size: 16px;
}

.calc-bit.accent { color: var(--accent); }
.calc-bit.dim { color: var(--text-muted); opacity: 0.5; }

.calc-times {
    color: var(--text-muted);
    font-size: 12px;
}

.calc-power {
    color: var(--text-secondary);
}

.calc-result {
    color: var(--text-primary);
    font-weight: 600;
}

.calc-plus {
    color: var(--text-muted);
    font-weight: 600;
}

.calc-total {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: var(--text-secondary);
}

.calc-total strong {
    font-size: 20px;
}

/* Division table (DEC→BIN) */
.division-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.div-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.div-num {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 28px;
    text-align: right;
}

.div-op {
    color: var(--text-muted);
    font-size: 13px;
}

.div-result {
    color: var(--text-secondary);
    min-width: 20px;
}

.div-remainder-label {
    color: var(--text-muted);
    font-size: 11px;
    margin-left: auto;
}

.div-remainder {
    font-weight: 700;
    font-size: 18px;
    min-width: 16px;
    text-align: center;
}

.div-remainder.accent { color: var(--accent); }
.div-remainder.dim { color: var(--text-muted); opacity: 0.5; }

.div-arrow {
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0.4;
}

.read-direction {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--text-secondary);
}

.read-direction strong {
    font-size: 20px;
}

/* Tips */
.learn-tip {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: rgba(255, 171, 64, 0.08);
    border: 1px solid rgba(255, 171, 64, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.tip-icon {
    font-size: 16px;
    min-width: 20px;
}

.learn-tip p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.learn-tip strong {
    color: var(--orange);
}

/* CTA button */
.learn-play-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), #00b0ff);
    border: none;
    border-radius: 12px;
    color: var(--bg-primary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.learn-play-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.accent {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 480px) {
    .game-card {
        padding: 24px 20px;
    }

    .question-display {
        font-size: 30px;
        padding: 16px;
        letter-spacing: 2px;
    }

    .stats-bar {
        gap: 8px;
    }

    .stat-item {
        padding: 10px 8px;
    }

    .answer-section {
        flex-direction: column;
    }

    .submit-btn {
        width: 100%;
    }

    .logo h1 {
        font-size: 18px;
    }

    .learn-modal {
        padding: 24px 18px;
        max-height: 90vh;
    }

    .bit-breakdown {
        gap: 16px;
    }

    .bit-digit {
        font-size: 22px;
    }

    .power-col {
        padding: 8px 12px;
    }

    .calc-row {
        gap: 4px;
    }

    .calc-item {
        font-size: 12px;
    }

    .calc-bit {
        font-size: 14px;
    }

    .div-row {
        font-size: 13px;
        padding: 6px 8px;
    }

    .content-block {
        padding: 20px 18px;
    }

    .content-example {
        padding: 16px;
    }

    .reference-table th,
    .reference-table td {
        padding: 6px 10px;
        font-size: 12px;
    }
}
