* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transform: translateY(0);
    animation: float 6s ease-in-out infinite;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1e3c72;
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

h1::after {
    content: '';
    display: block;
    width: 150px;
    height: 5px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    margin: 15px auto;
    border-radius: 3px;
}

h2 {
    color: #2a5298;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

#status-message {
    text-align: center;
    padding: 1.5rem;
    background: #e3f2fd;
    border-radius: 15px;
    margin-bottom: 2rem;
    font-weight: 500;
    color: #1e3c72;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

#registration-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transform: translateY(0);
    transition: all 0.5s ease;
}

input[type="text"] {
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
}

input[type="text"]:focus {
    border-color: #2a5298;
    outline: none;
    box-shadow: 0 0 0 4px rgba(42, 82, 152, 0.15);
}

button {
    display: block;
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(42, 82, 152, 0.3);
    background: linear-gradient(90deg, #2a5298, #1e3c72);
}

button:active {
    transform: translateY(0);
}

#options-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.option-button {
    padding: 1.5rem;
    font-size: 1.3rem;
    background: white;
    border: 2px solid #1e3c72;
    color: #1e3c72;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.option-button:hover:not(:disabled) {
    background: #1e3c72;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.2);
}

.option-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.score-container {
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

#score {
    font-weight: bold;
    color: #1e3c72;
    font-size: 2rem;
}

.loading {
    display: inline-block;
    margin: 0 10px;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.7s ease-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Correct/Wrong answer styles */
.option-button.correct {
    background: #4CAF50 !important;
    color: white !important;
    border-color: #4CAF50 !important;
}

.option-button.wrong {
    background: #f44336 !important;
    color: white !important;
    border-color: #f44336 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2rem;
        margin: 1rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    #options-container {
        grid-template-columns: 1fr;
    }

    .option-button {
        padding: 1.2rem;
        font-size: 1.1rem;
    }
}

/* Add these new styles */
.status-active {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.status-inactive {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

.status-active .pulse {
    display: block;
    font-size: 1rem;
    margin-top: 0.5rem;
    animation: pulse 2s infinite;
}

.status-inactive .subtitle {
    display: block;
    font-size: 1rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Update container styles */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transform: translateY(0);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Add styles for better visibility of game state */
#game-status {
    text-align: center;
    margin-bottom: 3rem;
}

#registration-form.show {
    transform: translateY(0);
    opacity: 1;
}

/* Add error state styling */
.status-error {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.status-error .subtitle {
    display: block;
    font-size: 1rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* Add to your existing styles */
.loading-text {
    text-align: center;
    margin: 1rem 0;
    color: #1e3c72;
    font-size: 1.1rem;
}

.loading {
    display: inline-block;
    margin: 0 10px;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

/* Add these new styles */
.winner-message {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    font-size: 1.6rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    animation: winner-glow 2s infinite;
}

@keyframes winner-glow {
    0% { box-shadow: 0 0 5px #FFD700; }
    50% { box-shadow: 0 0 20px #FFD700; }
    100% { box-shadow: 0 0 5px #FFD700; }
}

.players-list {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.player-item:last-child {
    border-bottom: none;
}

/* Add to your existing styles */
.loading-container {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.loading-text {
    margin-top: 1rem;
    color: #1e3c72;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Update loading spinner styles */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Scoreboard styles */
.scoreboard {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    max-height: 400px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.scoreboard.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

.scoreboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    color: white;
}

.scoreboard-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    margin: 0;
    width: auto;
}

.close-btn:hover {
    transform: scale(1.1);
    box-shadow: none;
}

.players-list {
    padding: 1rem;
    overflow-y: auto;
    max-height: 300px;
}

.player-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    animation: fadeIn 0.3s ease-out;
}

.player-score-item:last-child {
    border-bottom: none;
}

.player-name {
    font-weight: 500;
    color: #1e3c72;
}

.player-score {
    background: #e3f2fd;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    color: #1e3c72;
    font-weight: 600;
}

.show-scores-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: auto;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.current-player {
    background: #e3f2fd;
}

.winner-player {
    background: linear-gradient(90deg, #ffd700, #ffa500);
    color: white;
}

.winner-player .player-score {
    background: rgba(255, 255, 255, 0.2);
    color: white;
} 