:root {
    /* Color Palette */
    --primary: #0F172A;
    --primary-light: #1E293B;
    --accent: #2563EB;
    --accent-glow: rgba(37, 99, 235, 0.4);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    
    /* Buttons */
    --btn-hard: #EF4444;
    --btn-good: #F59E0B;
    --btn-easy: #10B981;
    
    /* Backgrounds */
    --bg-body: #020617;
    --bg-card: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.1), transparent 25%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #F8FAFC, #94A3B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.hidden {
    display: none !important;
}

.state-message {
    text-align: center;
    font-size: 1.25rem;
    padding: 3rem;
    color: var(--text-muted);
}

/* Card Container */
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.badge {
    background: rgba(37, 99, 235, 0.2);
    color: #60A5FA;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.progress-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* 3D Flip Card */
.scene {
    width: 100%;
    height: 350px;
    perspective: 1000px;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    cursor: pointer;
}

.card.is-flipped {
    transform: rotateX(180deg);
}

.card__face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    /* Glassmorphism */
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.card__face--front {
    transform: rotateX(0deg);
}

.card__face--back {
    transform: rotateX(180deg);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
}

.card-content h2 {
    font-family: var(--font-heading);
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.card-content p {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 500;
}

.card__face--back .card-content p {
    color: #F8FAFC;
}

.card-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    opacity: 0.7;
    animation: pulse 2s infinite;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.9;
}

.btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-hard {
    background: var(--btn-hard);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-good {
    background: var(--btn-good);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-easy {
    background: var(--btn-easy);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-primary {
    background: var(--accent);
    padding: 1rem 2rem;
    margin-top: 1rem;
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* Stats */
.stats-container {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: center;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 120px;
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@media (max-width: 600px) {
    .app-container {
        padding: 1rem;
    }
    
    .scene {
        height: 400px; /* More vertical space on mobile */
    }
    
    .card__face {
        padding: 1.5rem;
    }
    
    .card-content p {
        font-size: 1.25rem;
    }
}
