:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 600px;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.screen.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.screen.active {
    display: flex;
    opacity: 1;
}

.hidden {
    display: none !important;
}

/* Glassmorphism Cards */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    width: 100%;
    text-align: center;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Badges */
.info-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 10px;
}

.btn:active {
    transform: scale(0.98);
}

.btn.primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn.primary:hover {
    background: var(--primary-hover);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn.success {
    background: var(--success-color);
    color: white;
}

.btn.danger {
    background: var(--danger-color);
    color: white;
}

/* Quiz Screen Specifics */
#quiz-screen {
    justify-content: flex-start;
    padding-top: 20px;
}

.header-bar {
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.progress-container {
    flex: 1;
    margin-right: 20px;
}

.progress-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.score-badge {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-card {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-section {
    width: 100%;
    animation: slideUp 0.3s ease;
}

.answer-card {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(59, 130, 246, 0.3);
    margin-bottom: 20px;
    text-align: left;
}

.answer-card h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

#answer-list {
    list-style-type: none;
}

#answer-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#answer-list li:last-child {
    border-bottom: none;
}

.feedback-buttons {
    display: flex;
    gap: 15px;
}

/* Result Screen */
.score-display {
    font-size: 4rem;
    font-weight: 800;
    margin: 20px 0;
    color: var(--primary-color);
}

#result-message {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Optimization */
@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .glass {
        padding: 1.5rem;
    }

    .btn {
        padding: 14px 24px;
    }
}

.small-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    width: auto;
    margin-top: 0;
    margin-left: 10px;
    white-space: nowrap;
}