/* ========================================================================
   NONOGRAM - Dark Theme with Gold Accent
   ======================================================================== */

:root {
    --nono-bg: #1a1a2e;
    --nono-bg-light: #22224a;
    --nono-cell-size: 32px;
    --nono-cell-border: rgba(255, 255, 255, 0.12);
    --nono-fill-color: #1565c0;
    --nono-mark-color: rgba(255, 255, 255, 0.35);
    --nono-hint-color: #c8c8d8;
    --nono-hint-done: rgba(255, 255, 255, 0.25);
    --nono-gold: #d4af37;
    --nono-gold-light: #e8c86e;
}

/* Background */
.nono-bg {
    background: radial-gradient(ellipse at center, var(--nono-bg-light) 0%, var(--nono-bg) 100%);
}

/* Board layout using CSS grid */
.nono-board {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* --- Column Hints --- */
.nono-col-hints-row {
    display: flex;
    gap: 1px;
    margin-bottom: 2px;
    padding-left: 0;
}

.nono-col-hint {
    width: var(--nono-cell-size);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
    padding: 2px 0;
}

.nono-col-hint.nono-hint-done {
    opacity: 0.35;
}

/* --- Row Hints --- */
.nono-row-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding-right: 6px;
    min-width: 40px;
}

.nono-row-hint.nono-hint-done {
    opacity: 0.35;
}

/* Hint numbers */
.nono-hint-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--nono-hint-color);
    line-height: 1.2;
    min-width: 12px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.nono-hint-pad {
    visibility: hidden;
}

/* --- Cell Row --- */
.nono-cell-row {
    display: flex;
    gap: 1px;
}

/* --- Cells --- */
.nono-cell {
    width: var(--nono-cell-size);
    height: var(--nono-cell-size);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--nono-cell-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.1s ease;
    border-radius: 2px;
}

.nono-cell:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Filled cell */
.nono-cell.nono-filled {
    background: var(--nono-fill-color);
    border-color: rgba(21, 101, 192, 0.6);
}

.nono-fill {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 1px;
}

/* Marked cell (X) */
.nono-cell.nono-marked {
    background: rgba(255, 255, 255, 0.03);
}

.nono-mark {
    font-size: 14px;
    color: var(--nono-mark-color);
    font-weight: 300;
    line-height: 1;
}

/* --- 5x5 grid lines (every 5th) --- */
.nono-cell-row:nth-child(5n + 2) .nono-cell {
    border-bottom-width: 2px;
    border-bottom-color: rgba(212, 175, 55, 0.3);
}

/* --- Puzzle Navigator --- */
.nono-puzzle-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- Win Overlay --- */
.nono-win-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 20000;
    animation: nonoFadeIn 0.5s ease;
    backdrop-filter: blur(6px);
}

.nono-win-card {
    background: linear-gradient(135deg, var(--nono-bg-light) 0%, var(--nono-bg) 100%);
    border: 3px solid var(--nono-gold);
    border-radius: 16px;
    padding: 40px 60px;
    text-align: center;
    color: #e0ddd4;
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.3);
    animation: nonoScaleIn 0.5s ease 0.2s both;
}

.nono-win-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--nono-gold-light);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.nono-win-stats {
    font-size: 16px;
    margin-bottom: 24px;
    line-height: 1.8;
}

.nono-win-stats strong {
    color: var(--nono-gold-light);
}

@keyframes nonoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes nonoScaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --nono-cell-size: 24px;
    }
    .nono-hint-num { font-size: 10px; }
    .nono-mark { font-size: 11px; }
    .nono-win-card { padding: 24px 32px; }
    .nono-win-title { font-size: 24px; }
}

@media (max-width: 480px) {
    :root {
        --nono-cell-size: 20px;
    }
    .nono-hint-num { font-size: 9px; }
    .nono-mark { font-size: 10px; }
}
