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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.mode-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.mode-btn {
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: white;
    color: #667eea;
    font-weight: bold;
    transition: all 0.3s;
}

.mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.mode-btn.active {
    background: #003781;
    color: white;
}

.mode-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hidden {
    display: none !important;
}

/* Player Mode Styles */
.card-selection {
    text-align: center;
}

.card-selection h2 {
    color: #003781;
    margin-bottom: 20px;
}

#cardNumberInput {
    padding: 12px 20px;
    font-size: 18px;
    border: 2px solid #003781;
    border-radius: 8px;
    width: 200px;
    margin-right: 10px;
}

#loadCardBtn, .change-card-btn {
    padding: 12px 30px;
    font-size: 18px;
    background: #003781;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

#loadCardBtn:hover, .change-card-btn:hover {
    background: #002560;
    transform: translateY(-2px);
}

.player-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-header h2 {
    color: #003781;
    margin-bottom: 20px;
}

.bingo-card {
    background: #003781;
    padding: 20px;
    border-radius: 15px;
    display: inline-block;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.bingo-grid {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    gap: 8px;
}

.bingo-cell {
    background: white;
    color: #003781;
    font-size: 14px;
    font-weight: bold;
    padding: 10px 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    user-select: none;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 5px;
}

.item-emoji {
    font-size: 32px;
    line-height: 1;
    min-height: 32px;
}

.item-emoji:empty {
    display: none;
}

.item-name {
    font-size: 14px;
    word-wrap: break-word;
}

.bingo-cell:has(.item-emoji:empty) .item-name {
    font-size: 50px;
}

.bingo-cell:hover {
    background: #f0f0f0;
}

.bingo-cell.marked::before {
    content: '✕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: rgba(255, 0, 0, 0.5);
    font-weight: bold;
}

.change-card-btn {
    margin-top: 20px;
    display: block;
}

.disclaimer {
    font-size: 12px;
    color: #dc3545;
    margin-top: 15px;
    font-style: italic;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.player-disclaimer {
    font-size: 12px;
    color: #dc3545;
    margin-top: 20px;
    margin-bottom: 10px;
    font-style: italic;
    max-width: 400px;
    text-align: center;
    line-height: 1.4;
}

.admin-disclaimer {
    font-size: 12px;
    color: #dc3545;
    margin-top: 20px;
    margin-bottom: 20px;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

/* Admin Login Styles */
.admin-login {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.admin-login h2 {
    color: #003781;
    margin-bottom: 10px;
}

.admin-login p {
    color: #666;
    margin-bottom: 20px;
}

#adminPinInput {
    padding: 12px 20px;
    font-size: 24px;
    border: 2px solid #003781;
    border-radius: 8px;
    width: 200px;
    text-align: center;
    letter-spacing: 8px;
    margin-bottom: 15px;
}

#adminLoginBtn {
    padding: 12px 40px;
    font-size: 18px;
    background: #003781;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

#adminLoginBtn:hover {
    background: #002560;
    transform: translateY(-2px);
}

.pin-error {
    color: #dc3545;
    margin-top: 15px;
    font-weight: bold;
}

/* Admin Mode Styles */
.admin-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    max-height: calc(100vh - 200px);
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
    width: 280px;
}

.admin-controls-top,
.admin-controls-bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-btn {
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    width: 100%;
}

#startGameBtn, #nextCallBtn {
    background: #003781;
    color: white;
}

#startGameBtn:hover, #nextCallBtn:hover {
    background: #002560;
    transform: translateY(-2px);
}

.reset-btn {
    background: #dc3545;
    color: white;
}

.reset-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.current-call {
    text-align: center;
}

.current-call h2 {
    color: #003781;
    margin-bottom: 10px;
    font-size: 18px;
}

.called-item {
    background: #003781;
    color: white;
    font-size: 20px;
    font-weight: bold;
    padding: 20px 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.called-emoji {
    font-size: 48px;
    margin-bottom: 8px;
    min-height: 48px;
}

.called-emoji:empty {
    display: none;
}

.called-name {
    font-size: 20px;
}

.called-item:has(.called-emoji:empty) .called-name {
    font-size: 80px;
}

.admin-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    flex: 1;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-right: 8px;
}

.item-card {
    background: white;
    color: #003781;
    padding: 8px 4px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s;
    min-height: 65px;
    min-width: 65px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.item-card .item-emoji {
    font-size: 24px;
    min-height: 24px;
    line-height: 1;
}

.item-card .item-name {
    font-size: 11px;
    line-height: 1.2;
    word-break: break-word;
}

.item-card:has(.item-emoji:empty) .item-name {
    font-size: 20px;
}

.item-card.called {
    background: #28a745;
    color: white;
    transform: scale(1.05);
}

.item-card.current {
    background: #ffc107;
    color: #003781;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@media (max-width: 768px) {
    .bingo-grid {
        grid-template-columns: repeat(4, 70px);
    }
    
    .bingo-cell {
        padding: 8px 3px;
        min-height: 80px;
    }
    
    .bingo-cell .item-emoji {
        font-size: 24px;
    }
    
    .bingo-cell .item-name {
        font-size: 10px;
    }
    
    .admin-content {
        flex-direction: column;
    }
    
    .left-panel {
        width: 100%;
    }
    
    .admin-board {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Card Verification Styles */
.card-verification {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.card-verification h3 {
    color: #003781;
    margin-bottom: 15px;
    text-align: center;
}

.verification-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.verification-input label {
    color: #003781;
    font-weight: bold;
}

#verifyCardInput {
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #003781;
    border-radius: 5px;
    width: 100px;
}

.verification-card {
    text-align: center;
}

.verification-card h4 {
    color: #003781;
    margin-bottom: 15px;
}

.verified-bingo-card {
    background: #003781;
    padding: 15px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.verified-bingo-grid {
    display: grid;
    grid-template-columns: repeat(4, 70px);
    gap: 6px;
}

.verified-bingo-cell {
    background: white;
    color: #003781;
    font-size: 12px;
    font-weight: bold;
    padding: 8px 4px;
    border-radius: 6px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.3s;
}

.verified-bingo-cell .item-emoji {
    font-size: 18px;
    line-height: 1;
}

.verified-bingo-cell .item-name {
    font-size: 9px;
    line-height: 1.2;
}

.verified-bingo-cell:has(.item-emoji:empty) .item-name {
    font-size: 16px;
}

.verified-bingo-cell.called {
    background: #28a745;
    color: white;
    transform: scale(1.05);
}
