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

body {
    background: #0a0a1a;
    color: #e0e0e0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Navbar --- */

.navbar {
    width: 100%;
    background: #0d0d24;
    border-bottom: 1px solid #2a2a50;
    padding: 0 20px;
}

.navbar-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
}

.navbar-brand {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: bold;
}

.navbar-brand:hover {
    color: #00f0ff;
}

.navbar-links {
    display: flex;
    gap: 18px;
}

.navbar-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
}

.navbar-links a:hover {
    color: #00f0ff;
}

/* --- Breadcrumb --- */

.breadcrumb {
    width: 100%;
    max-width: 960px;
    padding: 12px 20px 0;
    font-size: 0.85rem;
    color: #888;
}

.breadcrumb a {
    color: #b44aff;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #d88aff;
}

.breadcrumb .separator {
    margin: 0 6px;
    color: #555;
}

/* --- Game content --- */

h1 {
    font-size: 2.2rem;
    margin-top: 16px;
    margin-bottom: 6px;
    padding: 0 20px;
    background: linear-gradient(135deg, #00f0ff, #b44aff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.subtitle {
    color: #888;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

#bingo-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: 100%;
    max-width: 620px;
    padding: 0 20px;
    aspect-ratio: 1;
}

.cell {
    background: #151530;
    border: 1px solid #2a2a50;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    user-select: none;
    line-height: 1.3;
    word-break: break-word;
    position: relative;
    overflow: hidden;
}

.cell:hover {
    border-color: #5a5a90;
    transform: scale(1.03);
    z-index: 1;
}

.cell.checked {
    background: #1a2a1a;
    border-color: #00cc66;
    color: #00ff80;
}

.cell.checked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 204, 102, 0.08);
}

.cell.free {
    background: linear-gradient(135deg, #1a1040, #2a1060);
    border-color: #b44aff;
    color: #d88aff;
    font-weight: bold;
    font-size: 0.85rem;
}

.cell.free.checked {
    background: linear-gradient(135deg, #1a2a1a, #1a3a1a);
    border-color: #00cc66;
    color: #00ff80;
}

.cell.bingo-winner {
    animation: winPulse 0.6s ease-in-out infinite alternate;
    border-color: #ffcc00 !important;
    background: #2a2a00 !important;
    color: #ffee66 !important;
}

@keyframes winPulse {
    from { box-shadow: 0 0 8px rgba(255, 204, 0, 0.3); }
    to { box-shadow: 0 0 20px rgba(255, 204, 0, 0.7); }
}

.controls {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    background: linear-gradient(135deg, #2a1060, #1a1040);
    color: #d88aff;
    border: 1px solid #5a3a90;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

button:hover {
    background: linear-gradient(135deg, #3a2070, #2a1850);
    border-color: #b44aff;
}

#win-banner {
    display: none;
    margin-top: 16px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #2a2a00, #3a3a00);
    border: 2px solid #ffcc00;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffee66;
    text-align: center;
    animation: winPulse 0.6s ease-in-out infinite alternate;
}

@media (max-width: 500px) {
    h1 { font-size: 1.5rem; }
    .cell { font-size: 0.65rem; padding: 4px; }
    .navbar-links { gap: 12px; }
}
