body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
}

#game-container {
    text-align: center;
    width: 100%;
    max-width: 600px;
}

#header {
    margin-bottom: 20px;
    height: 50px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

#initial-options button, #nextNumberButton, #verify-button, #reset-button {
    padding: 10px 20px;
    font-size: 1.2em;
    cursor: pointer;
    margin: 5px;
}

/* New Periodic Circle Overlay */
#periodic-circles-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
}

#called-number-display {
    font-size: 2em;
    font-weight: bold;
}

#board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid #ccc;
    padding: 5px;
    background-color: #fff;
}

.number-cell {
    aspect-ratio: 1;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    min-height: 35px;
}

.called {
    background-color: #ffcc00;
    color: #fff;
}

.hidden {
    display: none;
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
}

/* Wider modal for claim verification */
#claim-modal .modal-content {
    max-width: 600px;
    margin: 5% auto;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

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

input[type="text"], input[type="password"] {
    width: 80%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    #game-container {
        width: 100%;
    }
    
    #board {
        gap: 2px;
        max-width: 100%;
    }
    
    .number-cell {
        min-height: 30px;
        font-size: 0.9em;
    }
    
    #initial-options button, #nextNumberButton, #verify-button, #reset-button {
        padding: 8px 16px;
        font-size: 1em;
    }
    
    #called-number-display {
        font-size: 1.5em;
    }
    
    /* Verification board responsive */
    .verification-board {
        max-width: 100%;
        gap: 1px;
        padding: 5px;
    }
    
    #claim-modal .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .number-cell {
        min-height: 25px;
        font-size: 0.8em;
    }
    
    #board {
        gap: 1px;
    }
    
    /* Verification board for small screens */
    .verification-number-cell {
        min-height: 20px;
        font-size: 0.7em;
    }
}

@media (max-width: 360px) {
    .number-cell {
        min-height: 22px;
        font-size: 0.7em;
    }
}

/* New Styles for Rule Editor */
#rules-list-editor {
    margin: 20px 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
}

.rule-editor {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.rule-editor input {
    margin-right: 10px;
}

.rule-editor .rule-name-input {
    flex-grow: 1;
}

.remove-rule-button {
    padding: 5px 10px;
    background-color: #f44336;
    color: white;
    border: none;
    cursor: pointer;
}

/* Toggle Switch for Money */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider.round {
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* In-game Rules Area */
#rules-area {
    margin-top: 20px;
    padding: 10px;
    border-top: 2px solid #ccc;
}

.rule-display {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rule-display.claimed {
    background-color: #e0e0e0;
    text-decoration: line-through;
    color: #888;
}

.claim-button {
    padding: 5px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

/* Claim Modal Verification Board */
#circles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.verification-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    border: 1px solid #ccc;
    padding: 8px;
    background-color: #fff;
}

.verification-number-cell {
    aspect-ratio: 1;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
    font-weight: bold;
    min-height: 25px;
    border-radius: 3px;
}

.verification-called {
    background-color: #ffcc00;
    color: #333;
}

/* Keep old circle styles for any fallback */
.circle {
    width: 20px;
    height: 20px;
    background-color: #3498db;
    border-radius: 50%;
    margin: 0 5px;
    animation: bounce 1s infinite ease-in-out;
}

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

#approve-claim-button {
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin: 5px;
}

#bogey-claim-button {
    background-color: #f44336; /* Red */
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin: 5px;
}
