@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: #0f0c29;
    position: relative;
}

/* Animated Background - Pixel Art Farming Scene */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Overlay for better text readability */
.background-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.3) 100%);
}


/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title {
    font-size: 4rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5),
        0 0 60px rgba(102, 126, 234, 0.8),
        0 5px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
            0 0 40px rgba(102, 126, 234, 0.6),
            0 5px 15px rgba(0, 0, 0, 0.3);
    }

    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8),
            0 0 60px rgba(102, 126, 234, 1),
            0 5px 20px rgba(0, 0, 0, 0.4);
    }
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.btn-reset {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-reset:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.btn-reset:active {
    transform: translateY(-1px);
}

.counter {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.counter-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 1.1rem;
}

.counter-value {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.5rem;
    min-width: 2rem;
    text-align: center;
}

.counter-total {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* Calendar Widget */
.calendar-widget {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 100;
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.calendar-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.date-picker {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-picker:hover {
    background: rgba(255, 255, 255, 0.25);
}

.date-picker::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}


/* Bingo Grid - 6 columns x 4 rows */
.bingo-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 1s ease-out 0.3s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.bingo-cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.bingo-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bingo-cell:hover::before {
    opacity: 1;
}

.bingo-cell:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 45px rgba(102, 126, 234, 0.4);
}

.bingo-cell-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

/* Marked State - Progressive intensity */
.bingo-cell.marked {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    animation: markPulse 0.5s ease;
}

.bingo-cell.mark-1 {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%);
}

.bingo-cell.mark-2 {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.6) 100%);
}

.bingo-cell.mark-3 {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}

.bingo-cell.mark-4 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #ffffff;
    box-shadow: 0 15px 45px rgba(102, 126, 234, 0.6);
}

/* Checkmarks display */
.checkmarks {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 10;
    letter-spacing: 2px;
    animation: checkmarkPop 0.3s ease;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes markPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Win Message */
.win-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeInOverlay 0.5s ease;
}

.win-message.hidden {
    display: none;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.win-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 5rem;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.win-content h2 {
    font-size: 4rem;
    color: #ffffff;
    margin-bottom: 1rem;
    animation: party 1s ease infinite alternate;
}

@keyframes party {
    from {
        transform: rotate(-5deg);
    }

    to {
        transform: rotate(5deg);
    }
}

.win-content p {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .title {
        font-size: 3rem;
    }

    .bingo-cell-text {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .title {
        font-size: 2rem;
    }

    .bingo-grid {
        gap: 0.5rem;
    }

    .bingo-cell {
        padding: 0.5rem;
        border-radius: 15px;
    }

    .bingo-cell-text {
        font-size: 0.75rem;
    }

    .bingo-cell.marked::after {
        font-size: 2rem;
    }

    .win-content {
        padding: 2rem 3rem;
    }

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

    .win-content p {
        font-size: 1.2rem;
    }
}