:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #f43f5e;
    --bg: #0f172a;
    --surface: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

#app {
    width: 100%;
    max-width: 500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
}

header {
    padding-bottom: 20px;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.highlight {
    color: var(--primary-light);
}

.day-selector-container {
    display: flex;
    justify-content: center;
}

select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.mode-tabs {
    display: flex;
    background: var(--glass);
    padding: 5px;
    border-radius: 40px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#content-area {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding-bottom: 20px;
}

/* List View */
.word-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.word-item {
    background: var(--glass);
    padding: 15px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.word-item:active {
    transform: scale(0.98);
}

.eng {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.kor {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Flashcard View */
.flash-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flashcard {
    width: 100%;
    height: 350px;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 30px;
}

.card-face.back {
    transform: rotateY(180deg);
    background: var(--primary);
}

.card-face h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.card-face p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Quiz View */
.quiz-container {
    padding: 10px;
}

.quiz-card {
    background: var(--surface);
    padding: 30px 20px;
    border-radius: 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.quiz-card h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.options {
    display: grid;
    gap: 12px;
}

.option-btn {
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 16px;
    border-radius: 16px;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
}

.option-btn:active {
    transform: scale(0.98);
}

.option-btn.correct {
    background: #10b981;
    border-color: #10b981;
}

.option-btn.wrong {
    background: #ef4444;
    border-color: #ef4444;
}

/* Footer & Controls */
footer {
    padding-top: 10px;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: var(--glass);
    border-radius: 3px;
    margin-bottom: 15px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: 0.3s;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ctrl-btn {
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
}

#counter {
    font-weight: 600;
    color: var(--text-muted);
}
