:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --dark: #2C3E50;
    --light: #F7FFF7;
    --success: #2ECC71;
    --error: #E74C3C;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-image: radial-gradient(circle at 10% 20%, rgb(255, 230, 109) 0%, rgb(247, 255, 247) 90%);
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    padding: 30px;
    text-align: center;
    border: 4px solid var(--secondary);
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 3px dashed var(--accent);
    padding-bottom: 20px;
}

h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

h2 {
    color: var(--dark);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.styled-select {
    padding: 15px;
    border: 3px solid var(--secondary);
    border-radius: 10px;
    font-size: 1.2rem;
    outline: none;
    transition: all 0.3s;
    background-color: white;
    cursor: pointer;
}

.styled-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.user-info {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark);
    background: var(--accent);
    padding: 5px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.stats {
    display: flex;
    gap: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    background: var(--light);
    padding: 10px 20px;
    border-radius: 15px;
    border: 2px solid var(--accent);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

input[type="text"] {
    padding: 15px;
    border: 3px solid var(--secondary);
    border-radius: 10px;
    font-size: 1.2rem;
    outline: none;
    transition: all 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn.primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 5px 0 #d9534f;
}

.btn.primary:active {
    transform: translateY(5px);
    box-shadow: none;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.option-btn {
    padding: 15px;
    background-color: white;
    border: 3px solid var(--secondary);
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.option-btn:hover:not(:disabled) {
    background-color: var(--light);
    transform: scale(1.02);
}

.option-btn.correct {
    background-color: var(--success);
    color: white;
    border-color: #27ae60;
}

.option-btn.wrong {
    background-color: var(--error);
    color: white;
    border-color: #c0392b;
}

.hidden {
    display: none !important;
}

.error {
    color: var(--error);
    margin-top: 10px;
    font-weight: bold;
}

.feedback {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 20px 0;
    min-height: 40px;
}

.feedback.correct { color: var(--success); }
.feedback.wrong { color: var(--error); }

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--accent);
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.reward-stars {
    font-size: 3rem;
    margin: 20px 0;
    letter-spacing: 10px;
}

.fun-message {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 30px;
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    .container { padding: 20px; border-width: 2px; }
    .stats { font-size: 1rem; }
}
.history-list {
    max-height: 350px;
    overflow-y: auto;
    text-align: left;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.history-item {
    background: var(--light);
    border: 2px solid var(--secondary);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.history-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--dark);
}
.history-score {
    background: var(--accent);
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    color: var(--dark);
    min-width: 80px;
    text-align: center;
}
.btn.secondary {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 5px 0 #3baba3;
}
.btn.secondary:active {
    transform: translateY(5px);
    box-shadow: none;
}

.btn-link {
    background: none;
    border: none;
    color: var(--secondary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}
.btn-link:hover {
    color: var(--primary);
}
input[type="email"], input[type="password"] {
    padding: 15px;
    border: 3px solid var(--secondary);
    border-radius: 10px;
    font-size: 1.2rem;
    outline: none;
    transition: all 0.3s;
}
input[type="email"]:focus, input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}
