/*
 * צוללות - Daily Puzzle Styles
 * Newspaper magazine aesthetic with #1D3B84 navy and white
 */

:root {
    --primary: #1D3B84;
    --primary-light: #2a4fa0;
    --bg: #ffffff;
    --text: #1e293b;
    --water-bg: #eff6ff;
    --water-stroke: #1D3B84;
    --error: #ef4444;
    --success: #22c55e;
    --satisfied: #cbd5e1;
    --cell-size: clamp(32px, 8vw, 44px);
    --clue-gap: 20px;
    --border-thick: 4px;
}

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

/* Base */
body {
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* ===================
   HEADER - Newspaper Style
   =================== */
.site-header {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    text-align: center;
    border-bottom: 8px solid var(--primary);
}

.site-header h1 {
    font-size: clamp(2.8rem, 12vw, 4.5rem);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -2px;
    line-height: 1;
}

.header-meta {
    display: flex;
    justify-content: space-between;
    border-top: 2px solid var(--primary);
    margin-top: 15px;
    padding-top: 12px;
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

/* ===================
   ADS
   =================== */
.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 25px 15px;
}

.ad-slot {
    background: #fafafa;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.ad-placeholder {
    color: #bbb;
    font-size: 0.75rem;
}

.ad-banner {
    width: 100%;
    max-width: 728px;
    height: 90px;
}

.ad-rectangle {
    width: 160px;
    height: 600px;
}

/* Mobile-only ad - hidden on desktop */
.ad-mobile-only {
    display: none;
}

.ad-mobile-rectangle {
    width: 100%;
    max-width: 336px;
    min-height: 280px;
}

/* ===================
   MAIN CONTENT
   =================== */
.main-content {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.game-area {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.game-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Side ad - positioned to right side, centered to grid */
.ad-sidebar {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* ===================
   TIMER
   =================== */
.timer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    direction: ltr;
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 70px;
    text-align: center;
}

.btn-timer {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-timer:hover {
    background: var(--primary);
    color: white;
}

/* ===================
   TOOLBAR (Timer + Actions)
   =================== */
.toolbar {
    display: flex;
    direction: ltr;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.toolbar-actions {
    display: none;
}

@media (max-width: 520px) {
    .toolbar {
        justify-content: space-between;
        width: calc(10 * var(--cell-size) + 8px);
        padding: 0;
        margin-bottom: 10px;
    }

    .toolbar .timer-container {
        margin-bottom: 0;
        gap: 6px;
    }

    .toolbar .timer-display {
        font-size: 1.3rem;
        min-width: 50px;
    }

    .toolbar .btn-timer {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .toolbar-actions {
        display: flex;
        gap: 6px;
    }

    .toolbar-actions .btn {
        padding: 8px 12px;
        font-size: 1.2rem;
        background: transparent;
        border: 1.5px solid var(--border);
        color: var(--text);
        border-radius: 6px;
        min-width: 36px;
    }

    .toolbar-actions .btn:active {
        background: var(--border);
    }
}

/* ===================
   PAUSE OVERLAY
   =================== */
.pause-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.pause-overlay.show {
    display: flex;
}

.pause-content {
    text-align: center;
    direction: rtl;
}

.pause-time {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.pause-text {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 30px;
}

/* ===================
   VICTORY OVERLAY
   =================== */
.victory-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 253, 245, 0.98);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.victory-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

.victory-content {
    text-align: center;
    direction: rtl;
    padding: 40px;
}

.victory-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.victory-stats {
    display: flex;
    flex-direction: row;
    direction: ltr;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.victory-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.7;
}

.victory-grid {
    font-family: monospace;
    font-size: 14px;
    line-height: 1.1;
    text-align: center;
    margin-bottom: 20px;
    direction: ltr;
    white-space: pre;
}

.victory-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ===================
   PUZZLE GRID ASSEMBLY
   =================== */
.puzzle-assembly {
    display: inline-grid;
    direction: ltr; /* CRITICAL: Isolate grid from RTL */
    grid-template-columns: var(--cell-size) auto var(--cell-size);
    grid-template-rows: auto auto;
    margin: 20px auto;
    align-items: center;
}

/* Left spacer (balances row-clues on right) */
.puzzle-assembly::before {
    content: '';
    grid-row: 2;
    grid-column: 1;
    width: var(--cell-size);
    margin-left: var(--clue-gap);
}

/* Column Clues (above board) */
.col-clues {
    grid-row: 1;
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(10, var(--cell-size));
    margin-bottom: var(--clue-gap);
}

/* Game Board */
.game-board {
    grid-row: 2;
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(10, var(--cell-size));
    grid-template-rows: repeat(10, var(--cell-size));
    border: var(--border-thick) solid var(--primary);
    box-shadow: 0 10px 40px rgba(29, 59, 132, 0.15);
}

/* Row Clues (right of board) */
.row-clues {
    grid-row: 2;
    grid-column: 3;
    display: grid;
    grid-template-rows: repeat(10, var(--cell-size));
    margin-right: var(--clue-gap);
}

/* Clue Cells */
.clue-cell {
    width: var(--cell-size);
    height: var(--cell-size);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.2s;
    direction: ltr;
}

.clue-cell:hover {
    background: rgba(29, 59, 132, 0.05);
    border-radius: 4px;
}

.clue-cell.satisfied {
    color: var(--satisfied);
}

.clue-cell.error {
    color: var(--error);
}

/* ===================
   GRID CELLS
   =================== */
.cell {
    width: var(--cell-size);
    height: var(--cell-size);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    border: 0.5px solid #e2e8f0;
    transition: background-color 0.1s;
}

.cell:hover {
    background-color: #f8fafc;
}

/* Locked Cell (initial hints) */
.cell.locked {
    background-color: #f0f4ff;
    cursor: default;
}

.cell.locked:hover {
    background-color: #f0f4ff;
}

/* Unknown Cell - Empty (no dot) */
.cell.state-unknown {
    /* Just white, nothing */
}

/* Water Cell - Three wavy lines (90% of cell) */
.cell.state-water {
    background-color: var(--water-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M4 12 Q10 7 16 12 T28 12 T36 12' fill='none' stroke='%231D3B84' stroke-width='1.5' stroke-linecap='round' opacity='0.4'/%3E%3Cpath d='M4 20 Q10 15 16 20 T28 20 T36 20' fill='none' stroke='%231D3B84' stroke-width='1.5' stroke-linecap='round' opacity='0.4'/%3E%3Cpath d='M4 28 Q10 23 16 28 T28 28 T36 28' fill='none' stroke='%231D3B84' stroke-width='1.5' stroke-linecap='round' opacity='0.4'/%3E%3C/svg%3E");
    background-size: 90%;
    background-position: center;
    background-repeat: no-repeat;
}

/* Ship Cell */
.cell.state-ship {
    /* Container only - ship shape is child element */
}

/* ===================
   SHIP SHAPES (all 90% of cell)
   =================== */
.ship-part {
    background-color: var(--primary);
    position: absolute;
    width: 90%;
    height: 90%;
    left: 5%;
    top: 5%;
}

/* Submarine (single cell - confirmed isolated) */
.ship-part.sub {
    border-radius: 50%;
}

/* Unknown ship part (ambiguous neighbors) - small navy dot */
.ship-part.unknown {
    border-radius: 50%;
    width: 30%;
    height: 30%;
    left: 35%;
    top: 35%;
}

/* Ship ends with rounded caps - 90% size */
.ship-part.top {
    border-radius: 999px 999px 4px 4px;
}

.ship-part.bot {
    border-radius: 4px 4px 999px 999px;
}

.ship-part.left {
    border-radius: 999px 4px 4px 999px;
}

.ship-part.right {
    border-radius: 4px 999px 999px 4px;
}

/* Middle segments - square, 90% */
.ship-part.mid-v {
    border-radius: 0;
}

.ship-part.mid-h {
    border-radius: 0;
}

/* ===================
   ERROR MARKERS
   =================== */
.diagonal-error {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
}

.diagonal-error.corner-se {
    bottom: -4px;
    right: -4px;
}

.diagonal-error.corner-ne {
    top: -4px;
    right: -4px;
}

/* Check result error highlight */
.cell.cell-error {
    background-color: #fef2f2 !important;
    box-shadow: inset 0 0 0 2px var(--error);
}

/* ===================
   FLEET LEGEND
   =================== */
.fleet-legend {
    margin-top: 25px;
    padding: 15px 20px;
    background: #f8fafc;
    border: 2px solid var(--primary);
    border-radius: 4px;
    direction: rtl;
}

.fleet-legend h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.fleet-items {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.fleet-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fleet-item span {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.fleet-ship {
    height: 20px;
    display: flex;
    gap: 2px;
    direction: ltr; /* Force LTR for consistent ship visualization */
}

.fleet-ship span {
    width: 18px;
    height: 18px;
    background: var(--primary);
    display: block;
}

.fleet-ship span:first-child {
    border-radius: 10px 3px 3px 10px;
}

.fleet-ship span:last-child {
    border-radius: 3px 10px 10px 3px;
}

.fleet-ship span:only-child {
    border-radius: 50%;
}

.fleet-ship span:not(:first-child):not(:last-child) {
    border-radius: 3px;
}

/* ===================
   CONTROLS
   =================== */
.game-controls {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    direction: rtl;
    align-items: center;
}

.btn {
    padding: 12px 24px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid var(--primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 59, 132, 0.25);
}

.btn-secondary {
    background: white;
    color: var(--primary);
}

.btn-secondary:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.btn-icon {
    padding: 10px 12px;
    font-size: 1.2rem;
    background: transparent;
    border: none;
    color: var(--primary);
    opacity: 0.6;
}

.btn-icon:hover {
    opacity: 1;
}

/* ===================
   SETTINGS PANEL
   =================== */
.settings-panel {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border: 2px solid var(--primary);
    border-radius: 8px;
    direction: rtl;
}

.settings-panel.show {
    display: block;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.setting-row:last-of-type {
    margin-bottom: 10px;
}

.setting-row label {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
    white-space: nowrap;
}

.setting-row select {
    padding: 8px 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #ccc;
    border-radius: 6px;
    background: white;
    color: var(--text);
    cursor: pointer;
    flex: 1;
    min-width: 120px;
}

.setting-row select:focus {
    outline: none;
    border-color: var(--primary);
}

.setting-note {
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
    margin: 0;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
}

/* ===================
   STATS IN SETTINGS
   =================== */
.stats-section {
    margin-top: 20px;
    padding-top: 15px;
}

.stats-divider {
    text-align: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    position: relative;
}

.stats-divider::before,
.stats-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--primary);
    opacity: 0.3;
}

.stats-divider::before {
    right: 0;
}

.stats-divider::after {
    left: 0;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stats-item {
    display: flex;
    flex-direction: column;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stats-label {
    font-size: 0.75rem;
    color: var(--text);
    opacity: 0.7;
}

/* ===================
   DARK MODE
   =================== */
body.dark-mode {
    --bg: #0d1117;
    --text: #c9d1d9;
    --primary-light: #4a6fad;
    --water-bg: #162230;
    background-color: var(--bg);
    color: var(--text);
}

body.dark-mode .site-header {
    border-bottom-color: #58a6ff;
}

body.dark-mode .site-header h1 {
    color: #58a6ff;
}

body.dark-mode .header-meta {
    border-top-color: #58a6ff;
    color: #8cb4e0;
}

body.dark-mode .clue-cell {
    color: #8cb4e0;
}

body.dark-mode .clue-cell.satisfied {
    color: #484f58;
}

body.dark-mode .clue-cell.error {
    color: #f85149;
}

body.dark-mode .game-board {
    border-color: #58a6ff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .cell {
    background: #161b22;
    border-color: #30363d;
}

body.dark-mode .cell:hover {
    background-color: #21262d;
}

body.dark-mode .cell.locked {
    background-color: #1c2433;
}

body.dark-mode .cell.locked:hover {
    background-color: #1c2433;
}

body.dark-mode .cell.state-water {
    background-color: var(--water-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M4 12 Q10 7 16 12 T28 12 T36 12' fill='none' stroke='%2358a6ff' stroke-width='1.5' stroke-linecap='round' opacity='0.6'/%3E%3Cpath d='M4 20 Q10 15 16 20 T28 20 T36 20' fill='none' stroke='%2358a6ff' stroke-width='1.5' stroke-linecap='round' opacity='0.6'/%3E%3Cpath d='M4 28 Q10 23 16 28 T28 28 T36 28' fill='none' stroke='%2358a6ff' stroke-width='1.5' stroke-linecap='round' opacity='0.6'/%3E%3C/svg%3E");
}

body.dark-mode .ship-part {
    background-color: #58a6ff;
}

body.dark-mode .ship-part.unknown {
    background-color: #58a6ff;
}

body.dark-mode .btn-primary {
    background: #238636;
    border-color: #238636;
    color: #ffffff;
}

body.dark-mode .btn-primary:hover {
    background: #2ea043;
}

body.dark-mode .btn-secondary {
    background: #21262d;
    color: #c9d1d9;
    border-color: #58a6ff;
}

body.dark-mode .btn-secondary:hover {
    background: #30363d;
}

body.dark-mode .btn-icon {
    color: #8cb4e0;
}

body.dark-mode .timer-display {
    color: #58a6ff;
}

body.dark-mode .btn-timer {
    border-color: #58a6ff;
    color: #58a6ff;
}

body.dark-mode .btn-timer:hover {
    background: #58a6ff;
    color: #0d1117;
}

body.dark-mode .pause-overlay {
    background: var(--bg);
}

body.dark-mode .pause-time {
    color: #58a6ff;
}

body.dark-mode .victory-overlay {
    background: rgba(13, 17, 23, 0.98);
}

body.dark-mode .victory-title {
    color: #58a6ff;
}

body.dark-mode .stat-value {
    color: #58a6ff;
}

body.dark-mode .settings-panel {
    background: #161b22;
    border-color: #58a6ff;
}

body.dark-mode .setting-row label {
    color: #c9d1d9;
}

body.dark-mode .setting-row select {
    background: #0d1117;
    color: #c9d1d9;
    border-color: #30363d;
}

body.dark-mode .setting-note {
    color: #8b949e;
    border-top-color: #30363d;
}

body.dark-mode .stats-divider {
    color: #58a6ff;
}

body.dark-mode .stats-divider::before,
body.dark-mode .stats-divider::after {
    background: #58a6ff;
}

body.dark-mode .stats-value {
    color: #58a6ff;
}

body.dark-mode .fleet-legend {
    background: #161b22;
    border-color: #58a6ff;
}

body.dark-mode .fleet-legend h3 {
    color: #58a6ff;
}

body.dark-mode .fleet-item span {
    color: #c9d1d9;
}

body.dark-mode .fleet-ship span {
    background: #58a6ff;
}

body.dark-mode .instructions {
    background: #161b22;
    border-top-color: #58a6ff;
}

body.dark-mode .instructions h2 {
    color: #58a6ff;
}

body.dark-mode .instruction-icon {
    background: #58a6ff;
    color: #0d1117;
}

body.dark-mode .instruction-item p {
    color: #c9d1d9;
}

body.dark-mode .ad-slot {
    background: #161b22;
    border-color: #30363d;
}

body.dark-mode .ad-placeholder {
    color: #484f58;
}

body.dark-mode .site-footer {
    color: #8b949e;
    border-top-color: #30363d;
}

body.dark-mode .site-footer a {
    color: #58a6ff;
}

body.dark-mode .result-message.success {
    background: #1b4332;
    color: #40c463;
    border-color: #238636;
}

body.dark-mode .result-message.error {
    background: #3d1a1a;
    color: #f85149;
    border-color: #f85149;
}

body.dark-mode .cell.cell-error {
    background-color: #3d1a1a !important;
    box-shadow: inset 0 0 0 2px #f85149;
}

body.dark-mode .diagonal-error {
    background: #f85149;
}

/* ===================
   RESULT MESSAGE
   =================== */
.result-message {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    display: none;
    direction: rtl;
}

.result-message.show {
    display: block;
}

.result-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 2px solid var(--success);
}

.result-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 2px solid var(--error);
}

/* ===================
   INSTRUCTIONS
   =================== */
.instructions {
    margin-top: 40px;
    padding: 25px;
    background: #f8fafc;
    border-top: 3px solid var(--primary);
    direction: rtl;
}

.instructions h2 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 800;
}

.instructions-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.instruction-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.instruction-icon {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.instruction-item p {
    font-size: 0.95rem;
    color: var(--text);
}

/* ===================
   FOOTER
   =================== */
.site-footer {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 30px;
}

.site-footer .credits {
    margin-top: 8px;
}

.site-footer a {
    color: var(--primary);
    text-decoration: none;
}

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

/* ===================
   RESPONSIVE
   =================== */
@media (max-width: 1200px) {
    .ad-sidebar {
        position: static;
        transform: none;
        margin-top: 30px;
    }

    .game-area {
        flex-direction: column;
        align-items: center;
    }

    .ad-rectangle {
        width: 300px;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .ad-sidebar {
        display: none;
    }

    .ad-mobile-only {
        display: flex;
        justify-content: center;
        padding: 20px 15px;
    }
}

@media (max-width: 520px) {
    :root {
        --cell-size: min(9vw, 38px);
        --clue-gap: 2px;
    }

    .puzzle-assembly {
        margin: 8px auto;
    }

    .puzzle-assembly::before {
        width: calc(var(--cell-size) * 0.55);
        margin-left: var(--clue-gap);
    }

    .row-clues {
        margin-right: var(--clue-gap);
    }

    .row-clues .clue-cell {
        width: calc(var(--cell-size) * 0.55);
    }

    .site-header h1 {
        font-size: 4.2rem;
    }

    .header-meta {
        font-size: 1.1rem;
    }

    .game-controls {
        flex-direction: row;
        width: 100%;
        gap: 10px;
        margin-top: 15px;
    }

    .game-controls .btn {
        flex: 1;
        padding: 12px 16px;
        font-size: 1.1rem;
    }

    .game-controls .btn-icon {
        display: none;
    }

    .fleet-legend {
        padding: 10px 15px;
        margin-top: 15px;
    }

    .fleet-legend h3 {
        display: none;
    }

    .fleet-items {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 20px;
    }

    .fleet-item {
        gap: 5px;
    }

    .fleet-ship span {
        width: 16px;
        height: 16px;
    }

    .fleet-item > span {
        font-size: 0.95rem;
    }

    .ad-banner {
        height: 60px;
    }
}

/* Prevent text selection during drag */
.puzzle-assembly * {
    -webkit-touch-callout: none;
}

/* Disable context menu on cells */
.cell {
    -webkit-tap-highlight-color: transparent;
}
