@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Noto+Sans+KR:wght@400;500;700;900&display=swap');

:root {
    /* Brand Colors */
    --primary: #2563EB;       /* Royal Blue */
    --primary-dark: #1E40AF;
    --primary-light: #60A5FA;
    --accent: #7C3AED;        /* Violet */
    --accent-light: #A78BFA;
    
    /* Functional Colors */
    --bg-main: #F8FAFC;       /* Very Light Blue-Grey */
    --bg-white: #FFFFFF;
    --text-primary: #0F172A;  /* Dark Slate */
    --text-secondary: #475569; /* Slate */
    --text-tertiary: #94A3B8;
    
    /* UI Elements */
    --border-color: #E2E8F0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Constraints */
    --container-width: 1200px;
    --header-height: 70px;
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}
.text-center { text-align: center; }
.no-scroll { overflow: hidden; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 8px;
}
.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    filter: brightness(1.1);
}
.btn-outline {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    background: #F8FAFC;
}

/* Header */
.main-header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}
.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-primary);
}
.logo-emoji { font-size: 1.5rem; }

/* Desktop Navigation */
.desktop-nav .nav-list {
    display: flex;
    gap: 30px;
}
.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 5px 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { width: 100%; }

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    padding: 10px;
    z-index: 1002;
}
.hamburger-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all 0.3s;
}
.hamburger-icon::before, .hamburger-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}
.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

.mobile-menu-btn.active .hamburger-icon { background: transparent; }
.mobile-menu-btn.active .hamburger-icon::before { top: 0; transform: rotate(45deg); }
.mobile-menu-btn.active .hamburger-icon::after { top: 0; transform: rotate(-45deg); }

/* Mobile Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 1001;
    padding-top: var(--header-height);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}
.mobile-menu-overlay.active { transform: translateX(0); }
.mobile-nav-list {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.mobile-nav-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Hero Section */
.hero-section {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 70% 30%, rgba(124, 58, 237, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 30% 70%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 24px;
}
.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 900;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.text-highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}
.hero-buttons {
    display: flex;
    gap: 16px;
}

/* Hero Visuals */
.hero-image-wrapper {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-visual-card {
    position: absolute;
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid white;
}
.card-content { display: flex; flex-direction: column; align-items: center; }

.card-1 {
    width: 200px;
    height: 240px;
    z-index: 3;
    animation: float 6s ease-in-out infinite;
}
.card-char {
    font-size: 5rem;
    font-weight: 800;
    color: var(--text-primary);
}
.card-sub {
    font-size: 1.5rem;
    color: var(--text-tertiary);
    font-weight: 600;
}

.card-2 {
    width: 160px;
    height: 200px;
    z-index: 2;
    right: 20px;
    top: 20px;
    background: linear-gradient(135deg, #F0F9FF, #E0F2FE);
    transform: rotate(10deg);
    animation: float 7s ease-in-out infinite reverse;
}
.card-2 .card-char { font-size: 4rem; color: var(--primary); }

.card-3 {
    width: 140px;
    height: 180px;
    z-index: 1;
    left: 20px;
    bottom: 40px;
    background: linear-gradient(135deg, #F5F3FF, #EDE9FE);
    transform: rotate(-10deg);
    animation: float 8s ease-in-out infinite 1s;
}
.card-3 .card-char { font-size: 2.5rem; color: var(--accent); }

.glowing-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50% { transform: translateY(-20px) rotate(var(--r, 0deg)); }
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: white;
}
.section-header { margin-bottom: 60px; }
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}
.feature-card {
    background: var(--bg-main);
    padding: 40px 30px;
    border-radius: 24px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: block;
}
.feature-card:hover {
    transform: translateY(-8px);
    background: white;
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}
.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
}
.bg-blue { background: #DBEAFE; color: #1D4ED8; }
.bg-purple { background: #EDE9FE; color: #6D28D9; }
.bg-green { background: #DCFCE7; color: #15803D; }
.bg-orange { background: #FFEDD5; color: #C2410C; }

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.feature-desc {
    line-height: 1.6;
}

.card-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.btn-link {
    display: block;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    background: white;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

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

/* Footer */
.main-footer {
    background: white;
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.footer-links {
    text-align: right;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Common Components */
.ad-section {
    margin-top: 60px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.ad-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-buttons { justify-content: center; }
    .hero-image-wrapper { margin-top: 40px; }
    .hero-title { font-size: 2.5rem; }
}
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-menu-btn { display: block; }
    .hero-title { font-size: 2.2rem; }
}

/* Vocabulary Grid & Cards */
.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.vocab-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: default;
    position: relative;
}

.vocab-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.vocab-jp {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.vocab-kanji {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.vocab-meaning {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    word-break: keep-all;
}

.vocab-level-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.75rem;
    background: var(--bg-main);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.vocab-day-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 0.75rem;
    background: var(--bg-main);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
}

/* Filter & Options Styles */
.filter-container {
    background: white;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}
.filter-group:last-child { margin-bottom: 0; }

.filter-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
}

.filter-btn:hover {
    background: var(--bg-main);
    color: var(--primary);
    border-color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.view-options {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.option-btn {
    padding: 8px 16px;
    border-radius: 12px;
    background: var(--bg-main);
    color: var(--text-tertiary);
    font-weight: 600;
    display: flex;
    gap: 6px;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

/* --- Character Chart Styles --- */
.chart-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.tab-button {
    background: white;
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.tab-button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.chart-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.gojuon-chart, .yoon-chart {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.yoon-chart {
    grid-template-columns: repeat(3, 1fr);
}

.char-cell {
    background: var(--bg-main);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    border: 1px solid transparent;
}

.char-cell:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    color: var(--primary);
}

.char-cell.empty {
    background: transparent;
    cursor: default;
    box-shadow: none;
    border: none;
}

.char-cell.show-kr {
    background: var(--primary);
    color: white;
}

@media (max-width: 600px) {
    .char-cell {
        font-size: 1.2em;
        padding: 10px;
        min-height: 80px;
    }
}

/* --- Quiz Styles --- */
.quiz-question-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}
.quiz-question-text {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.quiz-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.quiz-option-btn {
    background: white;
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 16px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    font-weight: 600;
}

.quiz-option-btn:hover {
    background: var(--bg-main);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quiz-option-btn.correct {
    background: #DCFCE7 !important; /* Green-100 */
    color: #166534 !important; /* Green-800 */
    border-color: #22C55E !important;
}

.quiz-option-btn.wrong {
    background: #FEE2E2 !important; /* Red-100 */
    color: #991B1B !important; /* Red-800 */
    border-color: #EF4444 !important;
}

/* --- Flashcard Styles --- */
.flashcard-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    margin-bottom: 30px;
}

.flashcard-main {
    width: 100%;
    max-width: 600px;
    height: 400px;
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 40px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.fc-word {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.fc-reading {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 600;
}
.fc-meaning {
    font-size: 2rem;
    color: var(--text-secondary);
    font-weight: 700;
}

/* Flashcard Controls */
.flashcard-control-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.fc-btn-play {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.fc-btn-play:hover { transform: scale(1.1); }

/* --- Missing Global Utilities Added --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

/* --- Navigation Tabs --- */
.content-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    background: white;
    color: var(--text-secondary);
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.tab-link:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    color: var(--primary);
}

.tab-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* --- Forms & Settings --- */
.settings-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.settings-form fieldset {
    border: none;
    margin-bottom: 30px;
    padding: 0;
}

.settings-form legend {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: block;
    width: 100%;
    text-align: center;
}

.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.option-group input[type="radio"] {
    display: none;
}

.option-group label {
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-secondary);
}

.option-group label:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.option-group input[type="radio"]:checked + label {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* --- Flashcard Speed Controls --- */
.fc-speed-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.fc-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fc-speed-group {
    background: var(--bg-main);
    padding: 4px;
    border-radius: 999px;
    display: flex;
    gap: 4px;
    border: 1px solid var(--border-color);
}

.speed-btn {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.speed-btn:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.speed-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* --- Toggle Switch --- */
.view-mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e0e0e0;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* --- Flip Card Styles --- */
.vocab-card {
    background-color: transparent !important;
    padding: 0 !important;
    perspective: 1000px;
    cursor: pointer;
    min-height: 200px;
    box-shadow: none !important;
    border: none !important;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d; /* Safari */
    box-shadow: var(--shadow-sm);
    border-radius: 20px;
    background: transparent;
}

.vocab-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.flip-card-front {
    background-color: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    z-index: 2;
    transform: rotateY(0deg);
}

.flip-card-back {
    background: var(--primary) !important;
    color: white !important;
    transform: rotateY(180deg);
    z-index: 1;
    font-size: 1.4rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Front content positioning */
.flip-card-front .vocab-jp {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.flip-card-front .vocab-kanji {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.flip-card-front .vocab-meaning-on {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px dashed #f0f0f0;
    width: 80%;
}

/* Level Badge */
.vocab-level-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid rgba(37, 99, 235, 0.2);
    z-index: 5;
    pointer-events: none;
}

/* Day Buttons */
.day-buttons-container {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
    gap: 8px;
    -webkit-overflow-scrolling: touch; /* 부드러운 스크롤 */
    scrollbar-width: none; /* Firefox */
}
.day-buttons-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.day-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.day-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.day-btn:hover:not(.active) {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
}

/* Click Zones for Flashcards */
.click-zone {
    position: absolute;
    top: 0;
    height: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-tertiary);
    transition: all 0.2s;
    cursor: pointer;
    user-select: none;
}

.click-zone:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.click-zone.left {
    left: 0;
    width: 15%;
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
}

.click-zone.right {
    right: 0;
    width: 15%;
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
}

.click-zone.center {
    left: 15%;
    width: 70%;
    cursor: default;
    /* Transperent center */
}


/* SVG Icon Alignment in Click Zones */
.click-zone svg {
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}


/* Enhanced Control Bar */
.flashcard-control-bar.glass-panel-sm {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 30px;
    background: white;
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.fc-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
}

.fc-play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.fc-play-btn:hover { transform: scale(1.05); filter: brightness(1.1); }
.fc-play-btn svg { width: 24px; height: 24px; fill: white; stroke: white; }

.fc-speed-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fc-speed-group {
    background: var(--bg-main);
    padding: 4px;
    border-radius: 999px;
    display: flex;
    gap: 2px;
}

.speed-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 999px;
}

.speed-btn.active {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

