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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f23 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #ffffff;
}

.container {
    background: rgba(30, 30, 45, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.bingo-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.bingo-square {
    aspect-ratio: 1;
    background: rgba(50, 50, 70, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    text-align: center;
    min-height: 120px;
    color: #ffffff;
}

.bingo-square:hover {
    border-color: #8b5cf6;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.bingo-square.marked {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border-color: #4CAF50;
}

.bingo-square.marked::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.bingo-square.free-space {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-color: #ffd700;
    color: #333;
    font-weight: bold;
}

.controls {
    text-align: center;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    display: none;
}

.message.bingo {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    display: block;
    animation: celebrate 0.5s ease-in-out;
}

.message.no-bingo {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    display: block;
}

@keyframes celebrate {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .bingo-square {
        font-size: 0.8rem;
        min-height: 100px;
    }
}
