body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 15px;
    min-height: 100vh;
}

h2 {
    color: #ffffff;
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Responsive Bingo Board */
.bingo-board {
    display: grid;
    gap: 3px;
    max-width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    
    /* Default for desktop - 10 columns with smaller cells */
    grid-template-columns: repeat(10, 1fr);
    max-width: 900px; /* Limit maximum width */
}

.table-container {
    overflow-x: auto;
    max-width: 100%;
    padding: 5px;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.bingo-cell {
    border: 1px solid #ffffff;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #000000;
    
    /* Fixed height for consistent sizing */
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bingo-cell:hover {
    transform: scale(1.05);
    border-color: #cccccc;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    background: #1a1a1a;
}

.inner-cell {
    padding: 5px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #000000;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem; /* Increased font size */
    border: 1px solid #ddd;
}

.inner-cell:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.prize-cell .inner-cell {
    background: linear-gradient(135deg, #008e02 0%, #333333 100%);
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
    border-color: #666666;
}

.non-prize-cell .inner-cell {
    background: linear-gradient(135deg, #ff0000 0%, #333333 100%);
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
    border-color: #999999;
}

.name {
    font-size: 0.8rem; /* Increased font size */
    font-weight: normal;
    margin-top: 2px;
    color: inherit;
}

.prize {
    font-size: 0.75rem; /* Increased font size */
    font-weight: bold;
    color: inherit;
    margin-top: 2px;
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border: 2px solid #ffffff;
    padding: 20px;
    z-index: 1000;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
    color: white;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.popup-content {
    text-align: center;
}

.popup-content h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.close {
    color: #ffffff;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.close:hover,
.close:focus {
    color: #cccccc;
    text-decoration: none;
    cursor: pointer;
}

/* Button Styles */
.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.bingo-button {
    height: 45px;
    min-width: 120px;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid #ffffff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#add-prizes-button {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: #ffffff;
}

#add-prizes-button:hover {
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

#reset-button {
    background: linear-gradient(135deg, #666666 0%, #888888 100%);
    color: #ffffff;
    border-color: #cccccc;
}

#reset-button:hover {
    background: linear-gradient(135deg, #888888 0%, #666666 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

#reset-button:disabled {
    background: #444444;
    border-color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.blur-background {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

/* Form Styles */
#prizes-form div {
    margin: 10px 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 1px solid #666666;
}

#prizes-form label {
    color: #ffffff;
    font-weight: bold;
    margin: 0 5px;
    font-size: 0.9rem;
}

#prizes-form input {
    padding: 6px;
    border: 1px solid #ffffff;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.9);
    margin: 0 3px;
    color: #000000;
    font-size: 0.9rem;
    width: 60px;
}

#prizes-form input[type="text"] {
    width: 120px;
}

#add-prize-field, #submit-prizes, #visit-button, #login-button {
    background: linear-gradient(135deg, #333333 0%, #666666 100%);
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 8px 15px;
    margin: 8px 3px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.9rem;
}

#add-prize-field:hover, #submit-prizes:hover, #visit-button:hover, #login-button:hover {
    background: linear-gradient(135deg, #666666 0%, #333333 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

#password-input {
    padding: 8px;
    border: 2px solid #ffffff;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    margin: 8px 0;
    width: 100%;
    max-width: 250px;
    color: #000000;
    font-size: 1rem;
}

/* User List Styles */
#user-list-container {
    text-align: center;
    margin: 15px 0;
}

#user-list-container h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.2);
}

#user-list {
    list-style: none;
    padding: 0;
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
}

#user-list li {
    background: rgba(255, 255, 255, 0.1);
    margin: 0;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #ffffff;
    font-size: 0.9rem;
    color: #ffffff;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .bingo-board {
        grid-template-columns: repeat(10, 1fr);
        max-width: 800px;
    }
}

@media (max-width: 992px) {
    h2 {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .bingo-board {
        grid-template-columns: repeat(10, 1fr);
        gap: 2px;
        padding: 8px;
        max-width: 700px;
    }
    
    .bingo-cell {
        height: 45px;
    }
    
    .inner-cell {
        font-size: 0.85rem;
        padding: 4px;
    }
    
    .name {
        font-size: 0.75rem;
    }
    
    .prize {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .bingo-board {
        grid-template-columns: repeat(10, 1fr);
        gap: 1px;
        padding: 5px;
        max-width: 100%;
    }
    
    .bingo-cell {
        height: 45px;
        border-width: 1px;
    }
    
    .inner-cell {
        font-size: 0.7rem;
        padding: 3px;
    }
    
    .name {
        font-size: 0.6rem;
        margin-top: 1px;
    }
    
    .prize {
        font-size: 0.5rem;
        margin-top: 1px;
    }
    
    .button-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .bingo-button {
        width: 100%;
        max-width: 200px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .popup {
        width: 95%;
        padding: 15px;
    }
    
    .popup-content h3 {
        font-size: 1.2rem;
    }
    
    #user-list {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 5px;
    }
    
    #user-list li {
        font-size: 0.8rem;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    h2 {
        font-size: 1.5rem;
        letter-spacing: 0;
    }
    
    .bingo-board {
        grid-template-columns: repeat(5, 1fr);
        gap: 1px;
        padding: 3px;
    }
    
    .bingo-cell {
        height: 40px;
    }
    
    .inner-cell {
        font-size: 0.6rem;
        padding: 2px;
        font-weight: normal;
    }
    
    .name {
        font-size: 0.55rem;
    }
    
    .prize {
        font-size: 0.5rem;
    }
    
    .button-container {
        gap: 8px;
    }
    
    .bingo-button {
        height: 35px;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    #user-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .table-container {
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .bingo-board {
        grid-template-columns: repeat(10, 1fr);
    }
    
    .bingo-cell {
        height: 25px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .bingo-board {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .bingo-cell {
        height: 45px;
    }
    
    .inner-cell {
        font-size: 0.55rem;
    }
    
    .name {
        font-size: 0.5rem;
    }
    
    .prize {
        font-size: 0.45rem;
    }
}