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

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

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.input-section {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input[type="text"] {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-generate {
    background: #667eea;
    color: white;
}

.btn-generate:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-download {
    background: #48bb78;
    color: white;
    display: none;
}

.btn-download:hover {
    background: #38a169;
    transform: translateY(-2px);
}

.bingo-board {
    display: none;
    margin-top: 30px;
}

.board-header {
    text-align: center;
    margin-bottom: 20px;
}

.board-header h2 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 5px;
}

.board-header p {
    color: #666;
}

.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
}

.cell {
    aspect-ratio: 1;
    background: #f7fafc;
    border: 3px solid #667eea;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
    font-size: clamp(8px, 1.2vw, 14px);
    font-weight: 500;
    color: #333;
    transition: all 0.3s;
    cursor: pointer;
    line-height: 1.2;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}

.cell:hover {
    background: #edf2f7;
    transform: scale(1.05);
}

.cell.free {
    background: #667eea;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.cell.marked {
    background: #48bb78;
    color: white;
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        padding: 20px;
    }
    
    .input-section,
    .actions {
        display: none !important;
    }
    
    .bingo-board {
        display: block !important;
    }
    
    .cell:hover {
        transform: none;
    }
}

/* Mobile Styles */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
        max-width: 100%;
        width: 100%;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .grid {
        gap: 5px;
    }
    
    .cell {
        font-size: clamp(7px, 2.5vw, 10px);
        padding: 4px;
        line-height: 1.1;
        border-width: 2px;
        border-radius: 6px;
    }
    
    .cell.free {
        font-size: clamp(10px, 3vw, 14px);
    }
    
    .input-group {
        flex-direction: column;
    }
    
    button {
        padding: 12px 20px;
        font-size: 14px;
    }
}