:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --background: #0f172a;
    --card-bg: #1e293b;
}

body {
    background: var(--background);
    color: white;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 20px;
    overflow: hidden;
    height: 100vh;
}

.main-header {
    text-align: center;
    font-size: 3em;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 20px 0;
}

.level-filter {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.level-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    background: #1e293b;
    color: #94a3b8;
    border: 2px solid #334155;
    transition: all 0.2s ease;
}

.level-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: none;
}

.flashcard-container {
    perspective: 1000px;
    max-width: 600px;
    margin: 2rem auto;
}

.flashcard {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    min-height: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard.correct {
    background-color: #4CAF50 !important;
}

.flashcard.wrong {
    background-color: #ff4444 !important;
}

.card-front, .card-back {
    backface-visibility: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    pointer-events: none;
}

.card-back {
    transform: rotateY(180deg);
}

#word, #translation {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    transition: opacity 0.3s ease;
}

.input-section {
    max-width: 500px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#answer-input {
    width: 100%;
    max-width: 480px; /* 500px - 20px padding */
    margin: 0 10px;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 10px;
    border: 2px solid #334155;
    background: #1e293b;
    color: white;
    margin-bottom: 1rem;
}

.button-group {
    width: 100%;
    max-width: 480px;
    margin: 0 10px;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#submit-btn {
    background: var(--primary-color);
    color: white;
}

#submit-btn:hover {
    background: var(--secondary-color);
}

#skip-btn {
    background: #ef4444;
    color: white;
}

#skip-btn:hover {
    background: #dc2626;
}

.stats {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #94a3b8;
    border: 1px solid rgba(51, 65, 85, 0.3);
    transition: all 0.3s ease;
}

.stats:hover {
    background: rgba(30, 41, 59, 0.95);
    transform: translate(-50%, -2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#wrong-count {
    font-weight: 600;
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    min-width: 24px;
    text-align: center;
}

.main-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.simple-warning {
    color: white;
    text-align: center;
    margin: 20px 0;
    font-size: 0.9em;
    opacity: 0.8;
}

h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: white;
    text-align: center;
    margin: 20px 0;
    font-size: 2.5rem;
} 