/* SOTU Bingo - Mobile-First Responsive Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    padding: 10px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #55bf9f;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 20px;
    padding: 15px 10px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    letter-spacing: 3px;
}

header p {
    font-size: 1rem;
    opacity: 0.95;
}

/* Winner Counter */
.winner-counter {
    margin-top: 12px;
    padding: 10px 20px;
    background: rgba(85, 191, 159, 0.15);
    border: 2px solid #55bf9f;
    border-radius: 25px;
    display: inline-block;
}

.winner-counter span {
    color: #55bf9f;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.winner-counter.urgent {
    background: rgba(245, 87, 108, 0.15);
    border-color: #f5576c;
    animation: pulse 1.5s ease-in-out infinite;
}

.winner-counter.urgent span {
    color: #f5576c;
}

@keyframes pulse {

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

    50% {
        transform: scale(1.05);
    }
}

/* Bingo Grid */
.bingo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Bingo Squares */
.bingo-square {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 3px;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow: hidden;
    line-height: 1.1;
}

.bingo-square:focus {
    outline: 3px solid #55bf9f;
    outline-offset: 2px;
}

.bingo-square:active {
    transform: scale(0.95);
}

.bingo-square.active {
    background: #d4edda;
    color: #155724;
    border-color: #55bf9f;
    box-shadow: 0 4px 10px rgba(85, 191, 159, 0.4);
}

.bingo-square.free-space {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #2d3436;
    border-color: #fdcb6e;
    font-weight: 800;
    font-size: 0.7rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px 10px;
}

footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

footer a {
    color: #55bf9f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

footer a:hover {
    color: #6dd4b3;
    text-decoration: underline;
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    padding: 30px 25px;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

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

.modal-content h2 {
    color: #55bf9f;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.75rem;
}

.modal-content p {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #55bf9f;
    box-shadow: 0 0 0 3px rgba(85, 191, 159, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: #55bf9f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(85, 191, 159, 0.4);
}

.submit-btn:focus,
.share-btn:focus {
    outline: 3px solid #55bf9f;
    outline-offset: 2px;
}

/* Share Section */
.share-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.share-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.share-btn {
    width: 100%;
    padding: 14px;
    background: #55bf9f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 10px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(85, 191, 159, 0.4);
}

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

/* Responsive adjustments */
@media (min-width: 375px) {
    .bingo-square {
        font-size: 0.7rem;
    }

    .bingo-square.free-space {
        font-size: 0.8rem;
    }
}

@media (min-width: 414px) {
    .bingo-square {
        font-size: 0.75rem;
        padding: 4px;
    }

    .bingo-square.free-space {
        font-size: 0.85rem;
    }
}

@media (min-width: 768px) {
    body {
        padding: 20px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .bingo-grid {
        gap: 12px;
        padding: 15px;
    }

    .bingo-square {
        font-size: 1rem;
        padding: 8px;
    }

    .bingo-square.free-space {
        font-size: 1.1rem;
    }
}