:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 20%);
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

p.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Form Elements */
.input-group {
    position: relative;
    margin-bottom: 2rem;
}

textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
    resize: none;
    height: 150px;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

textarea::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: scale(1.02);
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.5);
}

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

/* Loader */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Quiz Interface */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.5s ease;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 0.8rem;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.option-btn.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.2);
}

.option-btn.correct {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.2);
}

.option-btn.incorrect {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.2);
}

.option-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.explanation-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 0.5rem;
    display: none;
    animation: fadeIn 0.5s ease;
}

.explanation-box h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.explanation-box p {
    color: var(--text-muted);
    line-height: 1.5;
}

.quiz-controls {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.btn-next {
    background: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 2rem;
    border-radius: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: none;
}

.btn-next:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Results View */
.results-view {
    text-align: center;
    display: none;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0%, rgba(255, 255, 255, 0.1) 0%);
    margin: 0 auto 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 130px;
    height: 130px;
    background: var(--surface-color);
    border-radius: 50%;
}

.score-text {
    position: relative;
    z-index: 1;
    font-size: 2.5rem;
    font-weight: 700;
}

.score-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    font-weight: 400;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}