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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 50%, #fdbb2d 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #2c3e50;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    max-width: 1000px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(10px);
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    color: #1a2a6c;
    font-size: 3.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 800;
    letter-spacing: -1px;
}

.subtitle {
    color: #666;
    font-size: 1.2em;
    font-weight: 500;
}

h2 {
    color: #1a2a6c;
    margin-bottom: 25px;
    text-align: center;
    font-size: 2em;
    font-weight: 700;
}

/* Login Section */
#login-section {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
}

input[type="text"] {
    padding: 15px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    font-size: 18px;
    transition: all 0.3s ease;
    width: 100%;
    background: white;
}

input[type="text"]:focus {
    border-color: #1a2a6c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 42, 108, 0.1);
}

button {
    background: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.pulse-button {
    animation: pulse 2s infinite;
}

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

/* Mode Selection */
.mode-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.mode-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.mode-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: #1a2a6c;
}

.mode-card h3 {
    color: #1a2a6c;
    margin-bottom: 15px;
    font-size: 1.5em;
}

/* Game Area */
.score-board {
    display: flex;
    justify-content: space-around;
    margin-bottom: 40px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.score-item {
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
}

.fraction-display {
    font-size: 3em;
    font-weight: 700;
    color: #1a2a6c;
    margin: 40px 0;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.option {
    background: white;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2em;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.option .visual {
    width: 120px;
    height: 120px;
    border: 3px solid #1a2a6c;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.option .visual-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 100%);
    transition: width 0.3s ease;
}

.option .decimal {
    font-size: 1.2em;
    color: #1a2a6c;
}

.option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.option:hover .visual {
    border-color: #b21f1f;
}

.option.correct {
    background: #4CAF50;
    color: white;
    transform: scale(1.05);
}

.option.correct .decimal {
    color: white;
}

.option.incorrect {
    background: #f44336;
    color: white;
    transform: scale(1.05);
}

.option.incorrect .decimal {
    color: white;
}

/* Game Over */
#game-over {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

#final-score {
    font-size: 3em;
    color: #1a2a6c;
    font-weight: 800;
    margin: 20px 0;
}

/* Leaderboard */
.leaderboard-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

#leaderboard-mode {
    padding: 12px 24px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 30px;
    cursor: pointer;
    background: white;
    color: #1a2a6c;
    font-weight: 600;
}

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

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
}

th {
    background: #1a2a6c;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

tr:hover {
    background: #f8f9fa;
}

.leaderboard-section.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2.5em;
    }

    .mode-buttons {
        grid-template-columns: 1fr;
    }

    .options-container {
        grid-template-columns: 1fr;
    }

    .leaderboard-container {
        margin: 0 10px;
    }
} 