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

body {
    background-color: #1a1a2e;
    background-image: url('');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', sans-serif;
    color: white;
    padding: 20px 0;
    transition: background-image 0.5s ease;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 30, 0.25);
    z-index: 0;
    pointer-events: none;
}

body > * {
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 0.9rem;
    color: #aac4ff;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    backdrop-filter: blur(5px);
    background: rgba(10, 10, 30, 0.35);
    padding: 10px;
    border-radius: 7px;
}

/* ── BINGO Header ── */
.header-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.header-cell {
    width: 90px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.header-cell:nth-child(1) {
    background: #e63946;
}

.header-cell:nth-child(2) {
    background: #f4a261;
    color: #1d1d1d;
}

.header-cell:nth-child(3) {
    background: #2a9d8f;
}

.header-cell:nth-child(4) {
    background: #457b9d;
}

.header-cell:nth-child(5) {
    background: #a8dadc;
    color: #1d3557;
}

/* Strike-through overlay on the letter */
.header-cell.struck {
    opacity: 0.55;
}

.header-cell.struck::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 5%;
    width: 90%;
    height: 4px;
    background: white;
    border-radius: 3px;
    transform: translateY(-50%) rotate(-12deg);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.header-cell.struck .letter {
    text-decoration: line-through;
    text-decoration-thickness: 4px;
    text-decoration-color: rgba(255, 255, 255, 0.9);
}

/* ── Board ── */
.board {
    display: grid;
    grid-template-columns: repeat(5, 90px);
    grid-template-rows: repeat(5, 90px);
    gap: 6px;
}

.cell {
    width: 90px;
    height: 90px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all 0.18s ease;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.cell:hover:not(.marked) {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.04);
}

.cell.marked {
    background: rgba(231, 57, 70, 0.25);
    border-color: #e63946;
    transform: scale(0.97);
    cursor: pointer;
}

.cell.marked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 8%;
    width: 84%;
    height: 3px;
    background: #e63946;
    border-radius: 3px;
    transform: translateY(-50%) rotate(-18deg);
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.9);
}

.cell.marked .cell-number {
    opacity: 0.35;
    text-decoration: line-through;
    text-decoration-color: #e63946;
    text-decoration-thickness: 3px;
}

/* Completed line glow */
.cell.bingo-line {
    animation: pulse 0.9s ease-in-out infinite alternate;
}

.cell.bingo-line:not(.marked) {
    background: rgba(255, 210, 0, 0.15);
    border-color: rgba(255, 210, 0, 0.6);
}

.cell.bingo-line.marked {
    background: rgba(255, 120, 0, 0.3);
    border-color: #ffd200;
}

@keyframes pulse {
    from {
        box-shadow: 0 0 6px rgba(255, 210, 0, 0.3);
    }
    to {
        box-shadow: 0 0 22px rgba(255, 210, 0, 1);
    }
}

.cell-number {
    transition: opacity 0.18s;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

/* ── Controls ── */
.controls {
    margin-top: 22px;
    display: flex;
    gap: 14px;
    align-items: center;
}

button {
    padding: 11px 26px;
    border: none;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    letter-spacing: 0.05em;
}

#newGameBtn {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #1d1d1d;
}

#newGameBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(247, 151, 30, 0.5);
}

#resetBtn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

#resetBtn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* ── Status ── */
.info-row {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.88rem;
    color: #aac4ff;
    backdrop-filter: blur(5px);
    background: rgba(10, 10, 30, 0.35);
    padding: 10px;
    border-radius: 7px;
}

.lines-info {
    color: #ffd200;
    font-weight: 700;
}

.status {
    min-height: 30px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #ffd200;
    text-align: center;
    margin-top: 6px;
}

/* ── Win Banner ── */
.bingo-banner {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.bingo-banner.show {
    display: flex;
}

.bingo-box {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    border: 3px solid #ffd200;
    border-radius: 24px;
    padding: 50px 70px;
    text-align: center;
    box-shadow: 0 0 70px rgba(255, 210, 0, 0.5);
    animation: popIn 0.4s cubic-bezier(0.17, 0.67, 0.35, 1.3);
}

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

.bingo-box h2 {
    font-size: 4.5rem;
    background: linear-gradient(90deg, #f7971e, #ffd200, #f7971e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    letter-spacing: 0.25em;
    margin-bottom: 10px;
}

.bingo-box .stat {
    font-size: 1.1rem;
    color: #ffd200;
    font-weight: 700;
    margin-bottom: 6px;
}

.bingo-box p {
    color: #aac4ff;
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.bingo-box button {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #1d1d1d;
    font-size: 1rem;
    padding: 14px 36px;
}

.bingo-box .bingo-banner-close-btn {
    background: linear-gradient(135deg, #f7971e, #ff0000);
    color: #1d1d1d;
    font-size: 1rem;
    padding: 5px 10px;
    position: absolute;
    top: 5px;
    right: 5px;
    border-radius: 50px;
    cursor: pointer;
}

.bingo-box button:hover {
    transform: scale(1.05);
}