/* ============================================
   DOLANAN MATEMATIKA - STYLES
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue: #3b82f6;
    --blue-light: #93c5fd;
    --blue-dark: #1d4ed8;
    --red: #ef4444;
    --red-light: #fca5a5;
    --red-dark: #b91c1c;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-cell: #334155;
    --bg-cell-hover: #475569;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --gold: #fbbf24;
    --green: #22c55e;
    --border: #475569;
    --highlight: rgba(251, 191, 36, 0.35);
    --win-glow: rgba(34, 197, 94, 0.6);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

/* --- Screens --- */
.screen {
    display: none;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.screen.active {
    display: flex;
}

#game-screen.active,
#game-screen-mult.active {
    display: block;
    padding: 0;
    min-height: auto;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* --- Overlay --- */
.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.win-content {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.win-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.win-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.win-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.primary-btn {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

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

.secondary-btn {
    background: var(--bg-cell);
    color: var(--text);
    border: 2px solid var(--border);
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.secondary-btn:hover {
    background: var(--bg-cell-hover);
}

/* ============================================
   HOME SCREEN
   ============================================ */
.home-container {
    text-align: center;
    max-width: 560px;
    width: 100%;
}

.home-subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 36px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.game-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 36px 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text);
    font-family: inherit;
}

.game-tile:not(.disabled):hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
    border-color: var(--blue);
}

.game-tile:not(.disabled):active {
    transform: translateY(-1px);
}

.game-tile.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tile-icon {
    font-size: 3rem;
}

.tile-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.tile-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}


.back-home-btn {
    width: 100%;
    margin-top: 8px;
}

/* ============================================
   MENU SCREEN
   ============================================ */
.menu-container {
    text-align: center;
    max-width: 480px;
    width: 100%;
}

.game-title {
    font-size: 2.8rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--gold), #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.menu-form {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--blue);
}

.mode-selection {
    margin-bottom: 20px;
}

.mode-selection h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.mode-buttons {
    display: flex;
    gap: 12px;
}

.mode-btn {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mode-btn:hover {
    border-color: var(--blue-light);
}

.mode-btn.selected {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.1);
}

.mode-icon {
    font-size: 1.8rem;
}

.mode-label {
    font-weight: 600;
    font-size: 0.95rem;
}

#start-btn {
    width: 100%;
    margin-top: 10px;
}

/* Timer Selection */
.timer-selection {
    margin-bottom: 20px;
}

.timer-selection h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.timer-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.timer-btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 8px;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}

.timer-btn:hover {
    border-color: var(--blue-light);
}

.timer-btn.selected {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.1);
}

/* ============================================
   COIN TOSS SCREEN
   ============================================ */
.coin-container {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.coin-container h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.coin-instruction {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.coin-wrapper {
    perspective: 600px;
    margin-bottom: 30px;
}

.coin {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}

.coin.flipping {
    animation: coinFlip 2s ease-out forwards;
}

.coin.show-tail {
    animation: coinFlipTail 2s ease-out forwards;
}

.coin-face {
    width: 100%;
    height: 100%;
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    backface-visibility: hidden;
}

.coin-head {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #92400e;
}

.coin-tail {
    background: linear-gradient(135deg, #c0c0c0, #9ca3af);
    color: #374151;
    transform: rotateY(180deg);
}

.coin-choices {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.coin-btn {
    padding: 14px 28px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coin-btn:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.coin-result {
    margin-top: 20px;
}

#coin-result-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ============================================
   PLACEMENT SCREEN
   ============================================ */
.placement-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.placement-container h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

#placement-instruction {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 1.05rem;
    line-height: 1.5;
}

.placement-board-wrapper {
    margin-bottom: 25px;
}

/* ============================================
   GAME SCREEN
   ============================================ */
.game-layout {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 8px 10px;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Player Bar */
.player-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
    flex-shrink: 0;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 2px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 0.9rem;
}

.player-info.active-turn {
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.player1-info.active-turn {
    border-color: var(--blue);
}

.player2-info.active-turn {
    border-color: var(--red);
}

.player-pion {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pion-blue {
    background: var(--blue);
    box-shadow: 0 0 6px var(--blue-light);
}

.pion-red {
    background: var(--red);
    box-shadow: 0 0 6px var(--red-light);
}

.player-name-display {
    font-weight: 600;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-score {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.turn-indicator {
    font-weight: 700;
    color: var(--gold);
    font-size: 0.95rem;
    text-align: center;
    white-space: nowrap;
}

.turn-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.turn-timer {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    text-align: center;
    padding: 2px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    transition: color 0.3s, background 0.3s;
}

.turn-timer.timer-warning {
    color: var(--red);
    background: rgba(239, 68, 68, 0.15);
    animation: timerPulse 1s ease-in-out infinite;
}

/* Sum Display */
.sum-display {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 6px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

#sum-value {
    color: var(--gold);
    font-size: 1.3rem;
}

/* Game Board (10x10) */
.game-board-wrapper {
    flex: 1;
    min-height: 0;
    margin-bottom: 6px;
    display: flex;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 3px;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 6px;
    width: 100%;
}

.board-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-cell);
    border-radius: 6px;
    font-size: clamp(0.6rem, 1.5vw, 1rem);
    font-weight: 700;
    cursor: default;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    position: relative;
    user-select: none;
    min-height: 0;
    min-width: 0;
    touch-action: manipulation;
}

.board-cell.highlight {
    background: var(--highlight);
    cursor: pointer;
    animation: pulse 1.5s infinite;
    will-change: box-shadow;
}

.board-cell.highlight:hover {
    background: rgba(251, 191, 36, 0.55);
    transform: scale(1.08);
}

.board-cell.taken-1 {
    background: var(--blue);
    color: white;
    box-shadow: 0 0 8px var(--blue-light);
}

.board-cell.taken-1::after {
    content: '●';
    position: absolute;
    top: 1px;
    right: 2px;
    font-size: 0.4em;
    opacity: 0.5;
    line-height: 1;
}

.board-cell.taken-2 {
    background: var(--red);
    color: white;
    box-shadow: 0 0 8px var(--red-light);
}

.board-cell.taken-2::after {
    content: '▲';
    position: absolute;
    top: 1px;
    right: 2px;
    font-size: 0.35em;
    opacity: 0.5;
    line-height: 1;
}

.board-cell.taken-1,
.board-cell.taken-2 {
    cursor: not-allowed;
}

.board-cell.win-cell {
    animation: winGlow 0.8s ease infinite alternate;
}

.board-cell.placed-anim {
    animation: placeDown 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Addition Board (2x10) */
.addition-board-section {
    margin-bottom: 4px;
    flex-shrink: 0;
}

.addition-board-section h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-align: center;
}

.addition-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 6px;
}

/* Multiplication Board (2x9) */
.multiplication-board-section {
    margin-bottom: 4px;
    flex-shrink: 0;
}

.multiplication-board-section h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-align: center;
}

.multiplication-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 6px;
}

.mult-cell {
    padding: 6px 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-cell);
    border-radius: 6px;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    font-weight: 700;
    cursor: default;
    transition: background 0.15s, transform 0.15s;
    position: relative;
    user-select: none;
    touch-action: manipulation;
    min-height: 36px;
}

.mult-cell.clickable {
    cursor: pointer;
}

.mult-cell.clickable:hover {
    background: var(--bg-cell-hover);
    transform: scale(1.05);
}

.mult-cell.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.mult-cell.pion-here-1 {
    background: var(--blue);
    color: white;
    box-shadow: 0 0 10px var(--blue-light);
    border-radius: 50%;
}

.mult-cell.pion-here-2 {
    background: var(--red);
    color: white;
    box-shadow: 0 0 10px var(--red-light);
    border-radius: 50%;
}

.add-cell {
    padding: 6px 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-cell);
    border-radius: 6px;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    font-weight: 700;
    cursor: default;
    transition: background 0.15s, transform 0.15s;
    position: relative;
    user-select: none;
    touch-action: manipulation;
    min-height: 36px;
}

.add-cell.clickable {
    cursor: pointer;
}

.add-cell.clickable:hover {
    background: var(--bg-cell-hover);
    transform: scale(1.05);
}

.add-cell.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.add-cell.pion-here-1 {
    background: var(--blue);
    color: white;
    box-shadow: 0 0 10px var(--blue-light);
    border-radius: 50%;
}

.add-cell.pion-here-2 {
    background: var(--red);
    color: white;
    box-shadow: 0 0 10px var(--red-light);
    border-radius: 50%;
}

/* Phase Instruction */
.phase-instruction {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 6px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-top: 4px;
    flex-shrink: 0;
}

/* ============================================
   HOW TO PLAY MODAL
   ============================================ */
.how-to-play-btn {
    margin-top: 24px;
    width: 100%;
    max-width: 280px;
}

.how-to-play-content {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    max-width: 520px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.how-to-play-content h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    text-align: center;
}

.htp-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--bg-cell);
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.htp-close-btn:hover {
    background: var(--bg-cell-hover);
}

.htp-body {
    text-align: left;
}

.htp-section {
    margin-bottom: 20px;
}

.htp-section h3 {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 8px;
}

.htp-section p,
.htp-section li {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.htp-section ol,
.htp-section ul {
    padding-left: 20px;
}

.htp-section li {
    margin-bottom: 6px;
}

/* Floating help button on game screens */
.floating-help-btn {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    touch-action: manipulation;
}

.floating-help-btn:hover {
    background: var(--bg-cell-hover);
    transform: scale(1.1);
}

/* Sound toggle button */
.sound-toggle-btn {
    position: fixed;
    bottom: 16px;
    right: 70px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    touch-action: manipulation;
}

.sound-toggle-btn:hover {
    background: var(--bg-cell-hover);
    transform: scale(1.1);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 5px rgba(251, 191, 36, 0.3); }
    50% { box-shadow: 0 0 15px rgba(251, 191, 36, 0.6); }
}

@keyframes winGlow {
    from { box-shadow: 0 0 10px var(--win-glow); transform: scale(1); }
    to { box-shadow: 0 0 25px var(--win-glow); transform: scale(1.05); }
}

@keyframes placeDown {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes coinFlip {
    0% { transform: rotateY(0deg); }
    80% { transform: rotateY(1800deg); }
    100% { transform: rotateY(1800deg); }
}

@keyframes coinFlipTail {
    0% { transform: rotateY(0deg); }
    80% { transform: rotateY(1980deg); }
    100% { transform: rotateY(1980deg); }
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.08); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .game-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin: 0 auto;
    }

    .game-tile {
        padding: 28px 16px;
    }

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

    .board-cell {
        font-size: 0.65rem;
        border-radius: 4px;
    }

    .add-cell {
        padding: 5px 2px;
        font-size: 0.7rem;
    }

    .mult-cell {
        padding: 5px 2px;
        font-size: 0.7rem;
    }

    .player-bar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .player-info {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .turn-indicator {
        width: 100%;
        order: -1;
        font-size: 0.85rem;
    }

    .turn-center {
        width: 100%;
        order: -1;
    }

    .turn-timer {
        font-size: 0.85rem;
    }

    .sum-display {
        font-size: 0.95rem;
        padding: 4px;
    }

    #sum-value {
        font-size: 1.1rem;
    }

    .coin-face {
        font-size: 2rem;
    }

    .coin {
        width: 100px;
        height: 100px;
    }

    .win-content {
        padding: 25px;
    }

    .win-content h2 {
        font-size: 1.5rem;
    }

    .game-board {
        gap: 2px;
        padding: 4px;
    }

    .addition-board {
        gap: 2px;
        padding: 4px;
    }

    .multiplication-board {
        gap: 2px;
        padding: 4px;
    }

    .phase-instruction {
        font-size: 0.75rem;
        padding: 4px;
    }
}

@media (max-width: 400px) {
    .game-board {
        gap: 1px;
        padding: 3px;
    }

    .board-cell {
        font-size: 0.55rem;
        border-radius: 3px;
    }

    .addition-board {
        gap: 1px;
        padding: 3px;
    }

    .multiplication-board {
        gap: 1px;
        padding: 3px;
    }

    .add-cell {
        padding: 4px 1px;
        font-size: 0.6rem;
    }

    .mult-cell {
        padding: 4px 1px;
        font-size: 0.6rem;
    }

    .player-name-display {
        max-width: 55px;
    }
}

/* Landscape on short screens */
@media (orientation: landscape) and (max-height: 500px) {
    .game-layout {
        padding: 2px 10px;
    }

    .player-bar {
        margin-bottom: 2px;
    }

    .sum-display {
        padding: 2px;
        margin-bottom: 2px;
        font-size: 0.85rem;
    }

    .game-board-wrapper {
        margin-bottom: 2px;
    }

    .addition-board-section,
    .multiplication-board-section {
        margin-bottom: 2px;
    }

    .addition-board-section h3,
    .multiplication-board-section h3 {
        font-size: 0.7rem;
        margin-bottom: 1px;
    }

    .phase-instruction {
        font-size: 0.7rem;
        padding: 2px;
        margin-top: 2px;
    }

    .player-info {
        padding: 2px 6px;
        font-size: 0.7rem;
    }

    .turn-indicator {
        font-size: 0.75rem;
    }
}
