/**
 * Flashcard 3D Interactive Study Workspace Styling (flashcard-study.css)
 * Đồng bộ chuẩn 100% với Design System (max-width: 1200px, 3D Transforms, Responsive)
 */

/* 1. Page Wrapper & 3-Column Layout */
.flashcard-study-page-wrapper {
    background-color: #f8fafc;
    min-height: calc(100vh - 180px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 80px 24px;
    box-sizing: border-box;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
}

.flashcard-study-layout-container {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    gap: 20px;
    align-items: flex-start;
}

/* 2. Left Column: Study Sidebar */
.flashcard-study-left-col {
    position: sticky;
    top: 90px;
    z-index: 10;
}

.flashcard-study-sidebar {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.flashcard-study-sidebar .vocab-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 12px;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.flashcard-study-sidebar .vocab-sidebar-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flashcard-study-sidebar .flashcard-header-icon {
    color: #2563eb;
    flex-shrink: 0;
}

.flashcard-study-sidebar .vocab-sidebar-main-heading {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.flashcard-study-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-back-to-sets {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-back-to-sets:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.btn-back-arrow {
    color: #3b82f6;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn-back-to-sets:hover .btn-back-arrow {
    transform: translateX(-3px);
    color: #2563eb;
}

.flashcard-study-sidebar .btn-sidebar-vocab-shortcut {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.flashcard-study-sidebar .btn-sidebar-vocab-shortcut:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.btn-sidebar-vocab-shortcut .shortcut-icon {
    color: #3b82f6;
    flex-shrink: 0;
}

.btn-sidebar-vocab-shortcut .shortcut-text {
    flex: 1 1 auto;
}

.btn-sidebar-vocab-shortcut .shortcut-arrow {
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn-sidebar-vocab-shortcut:hover .shortcut-arrow {
    transform: translateX(2px);
    color: #2563eb;
}

/* 3. Center Column: Study Area */
.flashcard-study-center-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

/* A. Study Header Card */
.flashcard-study-header-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.study-header-topic-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topic-media-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topic-meta-text-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topic-title-kr {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.topic-meta-sub {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topic-pos-name {
    font-weight: 700;
    color: #2563eb;
}

.topic-title-vn-sub {
    font-family: var(--font-vietnamese), 'Be Vietnam Pro', sans-serif;
    color: #475569;
    font-weight: 600;
}

/* Real-time Progress Strip */
.study-header-stats-strip {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 8px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.study-stat-progress-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 4px;
}

.progress-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.progress-info-row .stat-title {
    font-weight: 600;
    color: #64748b;
}

.progress-info-row .stat-ratio {
    font-weight: 800;
    color: #2563eb;
}

.study-progress-track {
    height: 7px;
    background: #f1f5f9;
    border-radius: 7px;
    overflow: hidden;
}

.study-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 7px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.study-stat-pill-item {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.stat-pill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-pill-icon.blue-text { color: #2563eb; }
.stat-pill-icon.green-text { color: #10b981; }
.stat-pill-icon.red-text { color: #f43f5e; }

.stat-pill-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pill-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pill-value {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.pill-value.green-val { color: #059669; }
.pill-value.red-val { color: #e11d48; }

/* B. 3D Interactive Flip Card Stage */
.flashcard-study-center-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.flashcard-flip-stage {
    perspective: 1200px;
    width: 100%;
    position: relative;
    touch-action: pan-y;
    will-change: transform, opacity;
    user-select: none;
    -webkit-user-select: none;
}

/* Tinder Swipe Visual Stamp Badges */
.swipe-stamp-badge {
    position: absolute;
    top: 20px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 3px solid;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.swipe-stamp-known {
    left: 24px;
    color: #059669;
    border-color: #059669;
    background: rgba(236, 253, 245, 0.95);
    transform: rotate(-15deg);
}

.swipe-stamp-unknown {
    right: 24px;
    color: #e11d48;
    border-color: #e11d48;
    background: rgba(255, 241, 242, 0.95);
    transform: rotate(15deg);
}

.flashcard-3d-object {
    position: relative;
    width: 100%;
    min-height: 360px;
    border-radius: 20px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.02);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.flashcard-3d-object:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.flashcard-3d-object.is-flipped {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 36px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.card-face-front {
    transform: rotateY(0deg);
    -webkit-transform: rotateY(0deg);
}

.card-face-back {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    background: #ffffff;
}

.card-face-content {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 30px;
    align-items: center;
    width: 100%;
}

.card-illustration-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

.illus-placeholder-art {
    width: 130px;
    height: 130px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 6px rgba(37, 99, 235, 0.08);
}

.illus-placeholder-art.back-art {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.card-word-meta-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
}

.card-word-vn-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.card-main-word-vn {
    font-family: var(--font-vietnamese), 'Be Vietnam Pro', sans-serif;
    font-size: 38px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.4px;
}

.card-pronun-text {
    font-size: 14.5px;
    color: #64748b;
    font-weight: 600;
}

/* Audio Speaker Button */
.card-audio-action-wrap {
    margin: 2px 0;
}

.btn-card-speaker {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #eff6ff;
    border: 2px solid #bfdbfe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-card-speaker:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: scale(1.08);
}

.btn-card-speaker.is-playing {
    background: #2563eb;
    color: #ffffff;
    animation: speakerWave 1s infinite alternate;
}

@keyframes speakerWave {
    from { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    to { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}

.card-flip-prompt-text {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

/* Back Face Content */
.card-back-titles {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.card-back-word-sub {
    font-family: var(--font-vietnamese), 'Be Vietnam Pro', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #2563eb;
}

.card-main-meaning-kr {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.card-example-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 16px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.card-example-vn {
    font-family: var(--font-vietnamese), 'Be Vietnam Pro', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 3px 0;
}

.card-example-kr {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
}

/* Swipe / Drag Gesture Guide Helper Strip */
.flashcard-swipe-guide-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13px;
    color: #64748b;
    box-sizing: border-box;
    width: 100%;
}

.swipe-guide-side {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.swipe-guide-unknown {
    color: #e11d48;
}

.swipe-guide-unknown svg {
    color: #e11d48;
}

.swipe-guide-known {
    color: #059669;
}

.swipe-guide-known svg {
    color: #059669;
}

.swipe-guide-center {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 12.5px;
    padding: 0 12px;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

.swipe-guide-center svg {
    color: #3b82f6;
}

.prompt-text-mobile,
.guide-tap-mobile {
    display: none;
}

.prompt-text-desktop,
.guide-tap-desktop {
    display: inline;
}

/* Decision Action Buttons Bar */
.flashcard-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.btn-action-decision {
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-decision-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-decision-icon-wrap svg {
    display: block;
}

.btn-decision-hotkey {
    font-size: 11.5px;
    opacity: 0.6;
    font-weight: 600;
}

/* Button Unknown (Red/Pink) */
.btn-decision-unknown {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #e11d48;
}

.btn-decision-unknown:hover {
    background: #e11d48;
    color: #ffffff;
    border-color: #e11d48;
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.25);
    transform: translateY(-2px);
}

/* Button Known (Green) */
.btn-decision-known {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

.btn-decision-known:hover {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.25);
    transform: translateY(-2px);
}

/* Shortcuts Helper Strip */
.flashcard-shortcuts-helper-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11.5px;
    color: #94a3b8;
    flex-wrap: wrap;
}

.flashcard-shortcuts-helper-strip kbd {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 1px 5px;
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 700;
    color: #475569;
}

.shortcut-dot {
    color: #cbd5e1;
}

/* 4. Right Column: Memorized Words Basket */
.flashcard-study-right-col {
    position: sticky;
    top: 90px;
    z-index: 10;
}

.flashcard-basket-sidebar {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 120px);
}

.basket-header-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.basket-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.basket-main-icon {
    display: flex;
    align-items: center;
    color: #2563eb;
    flex-shrink: 0;
}

.basket-title-text {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.basket-subtitle-text {
    font-size: 11.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
    word-break: keep-all;
}

/* Counter Banner */
.basket-counter-banner {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.basket-count-num {
    font-size: 20px;
    font-weight: 800;
    color: #2563eb;
}

.basket-count-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #3b82f6;
}

/* Words Scroll Area */
.basket-words-scroll-area {
    overflow-y: auto;
    max-height: 340px;
    padding-right: 4px;
}

.basket-words-scroll-area::-webkit-scrollbar {
    width: 5px;
}
.basket-words-scroll-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.basket-word-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.basket-word-item {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background 0.15s ease;
}

.basket-word-item:hover {
    background: #f1f5f9;
}

.basket-word-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.basket-item-check-icon {
    color: #10b981;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.basket-item-text-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.basket-word-vn {
    font-family: var(--font-vietnamese), 'Be Vietnam Pro', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.basket-meaning-kr {
    font-size: 11.5px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-basket-speak {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.btn-basket-speak:hover {
    color: #2563eb;
}

.basket-empty-placeholder {
    padding: 24px 10px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}

/* Reset Session Button (Solid border, clean aesthetic) */
.btn-reset-session {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-reset-session:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

/* 5. Completion Modal */
.flashcard-completion-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

.completion-modal-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    animation: modalBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalBounce {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

.completion-trophy-circle {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}

.completion-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.completion-main-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.completion-sub-title {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    word-break: keep-all;
}

.completion-stats-summary-card {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-sizing: border-box;
}

.completion-stat-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.c-stat-label {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 600;
}

.c-stat-val {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}

.c-stat-val.green-val {
    color: #059669;
}

.completion-divider-col {
    width: 1px;
    height: 28px;
    background: #e2e8f0;
}

.completion-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
}

.btn-modal-action {
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-modal-relearn {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #475569;
}

.btn-modal-relearn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.btn-modal-back {
    background: #2563eb;
    border: 1.5px solid #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-modal-back:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.vocab-sidebar-mobile-toggle {
    display: none;
}

/* ============================================================================
   RESPONSIVE DESIGN (BREAKPOINTS)
   ============================================================================ */

@media (max-width: 992px) {
    .flashcard-study-layout-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .flashcard-study-left-col {
        display: block;
        position: static;
        width: 100%;
    }

    /* Collapsible Study Sidebar on Mobile/Tablet */
    .flashcard-study-sidebar {
        padding: 10px 14px;
        max-height: none;
        border-radius: 12px;
        transition: all 0.25s ease;
    }

    .flashcard-study-sidebar.is-mobile-open {
        padding: 14px 12px;
    }

    .flashcard-study-sidebar .vocab-sidebar-header {
        padding-bottom: 0;
        border-bottom: none;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .flashcard-study-sidebar.is-mobile-open .vocab-sidebar-header {
        padding-bottom: 10px;
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 10px;
    }

    .flashcard-study-sidebar .vocab-sidebar-mobile-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 700;
        color: #2563eb;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .flashcard-study-sidebar .vocab-sidebar-collapse-wrapper {
        display: none;
    }

    .flashcard-study-sidebar.is-mobile-open .vocab-sidebar-collapse-wrapper {
        display: block;
    }

    .flashcard-study-sidebar.is-mobile-open .mobile-toggle-arrow {
        transform: rotate(180deg);
    }

    .flashcard-study-right-col {
        position: static;
        max-height: none;
    }

    .study-header-stats-strip {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .study-stat-progress-block {
        grid-column: 1 / -1;
    }

    /* Ẩn 2 nút bấm và hotkeys trên Mobile/Tablet - chỉ giữ lại thao tác Drag/Swipe Tinder & Touch lật thẻ */
    .flashcard-actions-row {
        display: none !important;
    }

    .flashcard-shortcuts-helper-strip {
        display: none !important;
    }

    .prompt-text-desktop,
    .guide-tap-desktop {
        display: none !important;
    }

    .prompt-text-mobile,
    .guide-tap-mobile {
        display: inline !important;
    }

    .flashcard-swipe-guide-strip {
        padding: 9px 12px;
        font-size: 12px;
        gap: 4px;
    }

    .swipe-guide-center {
        padding: 0 8px;
        font-size: 11.5px;
    }

    .guide-action-txt {
        display: none;
    }
}

@media (max-width: 600px) {
    .flashcard-study-page-wrapper {
        padding: 14px 12px 40px 12px;
    }

    .card-face {
        padding: 24px 16px;
    }

    .card-face-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .illus-placeholder-art {
        width: 90px;
        height: 90px;
        border-radius: 14px;
    }

    .card-main-word-vn {
        font-size: 30px;
    }

    .card-main-meaning-kr {
        font-size: 26px;
    }
}
