/* Main Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

/* Bingo Card Styles */
.bingo-card {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background-color: #e5e7eb;
    border: 2px solid #1e40af;
    border-radius: 0.5rem;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.bingo-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem;
    background-color: white;
    font-size: 0.75rem;
    line-height: 1.2;
    word-break: break-word;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.bingo-header {
    background-color: #1e40af;
    color: white;
    font-weight: bold;
    padding: 0.75rem 0.5rem;
    text-transform: uppercase;
    font-size: 1.25rem;
}

.bingo-free {
    background-color: #fee2e2;
    font-weight: bold;
}

.bingo-cell.selected {
    background-color: #dbeafe;
    position: relative;
}

.bingo-cell.selected::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    color: #1e40af;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bingo-cell {
        font-size: 0.65rem;
        padding: 0.25rem;
    }
    
    .bingo-header {
        font-size: 1rem;
        padding: 0.5rem 0.25rem;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #1e40af;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #1e40af;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    line-height: 1.4;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Print Styles */
@media print {
    header, footer, nav, .no-print {
        display: none !important;
    }
    
    body {
        padding: 0;
        margin: 0;
        background: white;
    }
    
    .bingo-card {
        page-break-inside: avoid;
        margin: 0;
        max-width: 100%;
    }
    
    @page {
        margin: 0.5cm;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}
