/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #F2F0ED;
    --surface: #FFFFFF;
    --text-primary: #2C2C2C;
    --text-secondary: #6B6B6B;
    --text-tertiary: #9A9A9A;
    --accent: #2C2C2C;
    --accent-subtle: #E8E6E3;
    --correct: #4A7C59;
    --incorrect: #B15E5E;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

/* ===== CONTAINERS ===== */
.app-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.main-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    /* Allow dropdowns and floating UI to escape the card */
    overflow: visible;
    animation: fadeInUp 0.5s ease-out;
    padding-bottom: 8px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HEADER ===== */
.header {
    padding: 32px 24px 24px;
    text-align: center;
    border-bottom: 1px solid var(--accent-subtle);
}

.lang-info {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.lang-flag-large {
    font-size: 2rem;
}

.lang-name-large {
    font-size: 1.25rem;
    font-weight: 600;
}

.score-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.score-value {
    font-size: 4rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.02em;
}

/* ===== TIMER ===== */
.timer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    z-index: 100;
    display: none;
    font-feature-settings: 'tnum';
}

.timer.visible {
    display: block;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ===== EXAMPLE SECTION ===== */
.example-section {
    padding: 32px 24px;
    text-align: center;
}

.target-sentence {
    font-family: 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans Arabic', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 450;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding: 0 8px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
}

.target-sentence .sentence-text {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.target-sentence .icon-btn {
    flex-shrink: 0;
    margin-top: 2px;
}

.highlighted-word {
    color: var(--accent);
    font-weight: 600;
    border-bottom: 1.5px solid var(--accent);
    padding-bottom: 2px;
}

.highlighted-word.grammar-highlight {
    color: #FCD34D;
    border-bottom-color: #FCD34D;
}

.grammar-highlight {
    border-bottom: 1.5px dotted var(--text-secondary);
}

.word-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.current-word {
    font-family: inherit;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--accent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.current-word.visible {
    opacity: 1;
}

/* ===== BUTTONS ===== */
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.icon-btn:hover {
    background: var(--accent-subtle);
    transform: scale(1.02);
}

.icon-btn:active {
    transform: scale(0.96);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.toggle-word-btn {
    background: none;
    border: 1px solid var(--accent-subtle);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 8px;
}

.toggle-word-btn:hover {
    background: var(--accent-subtle);
    color: var(--text-primary);
}

/* ===== FORM ===== */
.form-section {
    padding: 0 24px 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--accent-subtle);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    background: var(--surface);
    transition: all var(--transition-fast);
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(44, 44, 44, 0.08);
}

.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-height: 200px;
    overflow-y: auto;
    z-index: 600;
    display: none;
    border: 1px solid var(--accent-subtle);
    margin-top: 4px;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition-fast);
    font-size: 0.875rem;
}

.suggestion-item:hover {
    background: var(--accent-subtle);
}

.suggestion-word {
    font-weight: 500;
    color: var(--accent);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.submit-btn:hover {
    background: #3a3a3a;
    transform: translateY(-1px);
}

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

/* ===== FEEDBACK ===== */
.feedback-card {
    margin: 16px 24px 24px;
    padding: 20px;
    border-radius: var(--radius-md);
    display: none;
    animation: fadeSlide 0.3s;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-correct {
    background: rgba(74, 124, 89, 0.08);
}

.feedback-incorrect {
    background: rgba(177, 94, 94, 0.06);
}

.feedback-message {
    font-weight: 500;
    margin-bottom: 12px;
}

.sentence-translation {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--accent-subtle);
}

.original-sentence {
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

.english-translation {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.secondary-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--accent-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.secondary-btn:hover {
    background: var(--accent-subtle);
    color: var(--text-primary);
}

.primary-btn {
    flex: 1;
    padding: 10px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.primary-btn:hover {
    background: #3a3a3a;
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 360px;
    padding: 28px 24px;
    z-index: 1001;
    display: none;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes modalPop {
    from {
        transform: translate(-50%, -50%) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.modal h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.875rem;
}

.result-time {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent);
    margin: 16px 0;
    font-feature-settings: 'tnum';
    letter-spacing: 1px;
}

/* ===== NEW WORD CARD ===== */
.new-word-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 1001;
    display: none;
    animation: modalSlideUp 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes modalSlideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.new-word-header {
    background: var(--accent);
    padding: 20px;
    text-align: center;
}

.new-word-header h4 {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.new-word-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

.new-word-content {
    padding: 24px;
    max-height: 55vh;
    overflow-y: auto;
}

.new-word-content::-webkit-scrollbar {
    width: 4px;
}

.new-word-content::-webkit-scrollbar-track {
    background: var(--accent-subtle);
}

.new-word-content::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

.word-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--accent-subtle);
}

.word-title-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.detail-block {
    margin-bottom: 20px;
}

.detail-block h5 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.meta-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.detail-block p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.examples-list {
    list-style: none;
    margin-top: 8px;
}

.examples-list li {
    margin-bottom: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.example-native {
    font-family: inherit;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.example-translation {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.new-word-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid var(--accent-subtle);
}

.continue-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.continue-btn:hover {
    background: #3a3a3a;
}

/* ===== FLOATING BUTTONS ===== */
.floating-buttons {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 200;
}

.float-btn {
    width: 48px;
    height: 48px;
    background: var(--surface);
    border: 1px solid var(--accent-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.float-btn:hover {
    transform: scale(1.05);
    background: var(--accent-subtle);
}

.float-btn:active {
    transform: scale(0.96);
}

.float-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-primary);
    stroke-width: 1.5;
    fill: none;
}

/* ===== SIDE MENU ===== */
.menu-trigger {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    background: var(--surface);
    border: 1px solid var(--accent-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    z-index: 200;
    padding: 0;
}

.menu-trigger:hover {
    transform: scale(1.05);
    background: var(--accent-subtle);
}

.menu-trigger img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 260px;
    background: var(--surface);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
    box-shadow: var(--shadow-lg);
    z-index: 1002;
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    transform: translateX(0);
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--accent-subtle);
}

.menu-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.menu-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.menu-close:hover {
    color: var(--accent);
}

.menu-section {
    padding: 16px 0;
}

.menu-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    padding: 0 24px 8px;
    margin: 0;
}

.menu-link {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    border-left: 2px solid transparent;
}

.menu-link:hover {
    background: var(--accent-subtle);
    border-left-color: var(--accent);
    color: var(--text-primary);
}

.side-menu button {
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 2px solid transparent;
}

.side-menu button:hover {
    background: var(--accent-subtle);
    border-left-color: var(--accent);
}

/* ===== TUTORIAL BUBBLES ===== */
.tutorial-stack {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 440px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.tutorial-bubble {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--accent-subtle);
    pointer-events: all;
    animation: bubbleIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes bubbleIn {
    from {
        transform: scale(0.9) translateY(-10px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.tutorial-bubble.closing {
    animation: bubbleOut 0.25s forwards;
}

@keyframes bubbleOut {
    to {
        transform: scale(0.95);
        opacity: 0;
    }
}

.bubble-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.gumiho-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--accent-subtle);
}

.gumiho-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bubble-text {
    flex: 1;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.cursor-blink {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.bubble-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 0 4px;
    transition: color var(--transition-fast);
}

.bubble-close:hover {
    color: var(--text-primary);
}

/* ===== WORD MAP MODAL ===== */
.wordmap-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: none;
    justify-content: center;
    align-items: center;
}

.wordmap-container {
    width: 90%;
    max-width: 600px;
    height: 80vh;
    background: var(--surface);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalScale 0.3s;
}

@keyframes modalScale {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.wordmap-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--accent-subtle);
    position: relative;
}

.wordmap-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.wordmap-stats {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.wordmap-search {
    padding: 16px 24px;
    border-bottom: 1px solid var(--accent-subtle);
}

.wordlist {
    flex: 1;
    overflow-y: auto;
}

.wordlist-item {
    padding: 14px 24px;
    border-bottom: 1px solid var(--accent-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.wordlist-item:hover {
    background: var(--accent-subtle);
}

.wordlist-item-locked {
    opacity: 0.5;
    cursor: default;
}

.wordlist-item-locked:hover {
    background: transparent;
}

.word-native {
    font-weight: 500;
}

.word-status {
    font-weight: 500;
    color: var(--text-secondary);
}

.word-status.unlocked {
    color: var(--text-primary);
}

.detail-view {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.detail-view .new-word-content {
    max-height: none;
    overflow-y: visible;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ===== CHALLENGE MODAL ===== */
#challengeOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    animation: fadeIn 0.2s ease;
}

#challengeOverlay.visible {
    display: block;
}

.challenge-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 360px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: none;
    padding: 40px 32px;
    text-align: center;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
}

.challenge-modal.visible {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -48%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.challenge-modal h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.challenge-modal p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.challenge-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.challenge-btn:hover {
    background: #3a3a3a;
    transform: translateY(-1px);
}

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

/* ===== HOME PAGE ===== */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.home-header {
    text-align: center;
    margin-bottom: 48px;
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.home-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.lang-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    display: block;
}

.lang-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-subtle);
}

.lang-flag {
    font-size: 3rem;
    margin-bottom: 16px;
}

.lang-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.lang-native {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.lang-description {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.lang-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.start-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.start-btn:hover {
    background: #3a3a3a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }
    
    .score-value {
        font-size: 3rem;
    }
    
    .target-sentence {
        font-size: 1rem;
    }
    
    .current-word {
        font-size: 1.5rem;
    }
    
    .floating-buttons {
        bottom: 16px;
        right: 16px;
    }
    
    .float-btn {
        width: 44px;
        height: 44px;
    }
    
    .tutorial-stack {
        top: 70px;
    }
    
    .home-header h1 {
        font-size: 1.75rem;
    }
    
    .language-grid {
        gap: 16px;
    }
}