/**
 * Flashcard Sets Catalog Styling (flashcard.css)
 * Đồng bộ chuẩn 100% với Design System (max-width: 1200px, Typography, Icon Ratios & Color Tokens)
 */

/* 1. Page Wrapper & Grid Layout (Đồng bộ max-width: 1200px chuẩn hệ thống) */
.flashcard-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-layout-container {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: flex-start;
}

/* 2. Left Column: Sticky Sidebar Card (Đồng bộ với vocabulary-sidebar-card) */
.flashcard-sidebar-col {
    position: sticky;
    top: 90px;
    z-index: 10;
    align-self: flex-start;
}

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

/* Sidebar Header Layout (Đồng bộ với vocabulary_sidebar.php) */
.flashcard-sidebar-card .vocab-sidebar-header,
.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-sidebar-card .vocab-sidebar-title-row,
.vocab-sidebar-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

/* Sidebar Collapse Wrapper & Actions */
.flashcard-sidebar-card .vocab-sidebar-collapse-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Shortcut Link to Vocabularies */
.flashcard-sidebar-shortcut-section {
    padding-top: 0;
    margin-top: 0;
}

.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;
}

.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;
}

/* Flashcard Study Tips Box */
.flashcard-tips-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 13px 14px;
    margin-top: 0;
}

.tips-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.tips-bulb-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tips-title-text {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
}

.tips-body-text {
    font-size: 12px;
    line-height: 1.55;
    color: #64748b;
    margin: 0;
    word-break: keep-all;
}

/* 3. Main Content & Topic Banner */
.flashcard-main-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* Topic Banner Card (Bọc khung trắng chuẩn mực 1:1 với vocabulary_topic_banner) */
.flashcard-topic-banner-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);
}

.flashcard-banner-inner {
    display: flex;
    align-items: center;
    gap: 18px;
}

.flashcard-banner-media {
    width: 76px;
    height: 76px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbeafe;
}

.flashcard-banner-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flashcard-banner-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
}

.flashcard-banner-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.flashcard-banner-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flashcard-banner-title-text {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.flashcard-banner-title-text .title-kr-heading {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.flashcard-banner-title-text .title-vn-badge {
    font-family: var(--font-vietnamese, 'Be Vietnam Pro'), sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 2px 8px;
    border-radius: 6px;
}

.flashcard-banner-desc-text {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.flashcard-banner-stats-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.flashcard-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px 10px;
    border-radius: 6px;
}

.flashcard-stat-pill strong {
    color: #2563eb;
    font-weight: 800;
}

/* Banner Search Box */
.flashcard-banner-search-wrapper {
    width: 280px;
    flex-shrink: 0;
}

.flashcard-search-input-box {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.flashcard-search-field {
    width: 100%;
    height: 42px;
    padding: 0 38px 0 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    color: #0f172a;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.flashcard-search-field:focus {
    outline: none;
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn-clear-search {
    position: absolute;
    right: 32px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clear-search:hover {
    color: #1e293b;
}

.flashcard-search-icon-btn {
    position: absolute;
    right: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* 4. Filter Bar (Thanh công cụ lọc độc lập bên dưới Banner) */
.flashcard-filter-bar {
    display: flex;
    align-items: center;
    width: 100%;
}

.flashcard-filter-controls-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap;
}

.flashcard-filter-pills {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    padding: 4px;
    border-radius: 10px;
}

.btn-filter-pill {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-filter-pill:hover {
    color: #2563eb;
    background: #f8fafc;
}

.btn-filter-pill.is-active {
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-filter-pill.btn-filter-saved .pill-star-icon {
    fill: none;
    stroke: #f59e0b;
    transition: transform 0.2s ease;
}

.btn-filter-pill.btn-filter-saved:hover .pill-star-icon {
    transform: scale(1.15);
}

.btn-filter-pill.btn-filter-saved.is-active .pill-star-icon {
    fill: none;
    stroke: #ffffff;
}

.flashcard-filter-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Custom Styled Dropdowns (Desktop & Mobile Unified) */
.custom-dropdown-container {
    position: relative;
}

.custom-dropdown-trigger {
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    user-select: none;
    box-sizing: border-box;
}

.custom-dropdown-trigger:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #2563eb;
}

.custom-dropdown-trigger.is-open {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.dropdown-trigger-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.dropdown-chevron-icon {
    color: #64748b;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown-trigger.is-open .dropdown-chevron-icon {
    transform: rotate(180deg);
    color: #2563eb;
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 270px;
    max-width: 320px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
    z-index: 120;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 6px;
    box-sizing: border-box;
}

.custom-dropdown-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-dropdown-menu-right {
    left: auto;
    right: 0;
    min-width: 155px;
    max-width: 180px;
}

.custom-dropdown-scroll {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 2px;
}

.custom-dropdown-item {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.15s ease;
    user-select: none;
}

.custom-dropdown-item .item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-dropdown-item .text-sub-vn {
    color: #64748b;
    font-size: 11.5px;
    font-weight: 500;
    font-family: var(--font-vietnamese, 'Be Vietnam Pro'), sans-serif;
}

.custom-dropdown-item:hover {
    background: #eff6ff;
    color: #2563eb;
}

.custom-dropdown-item:hover .text-sub-vn {
    color: #3b82f6;
}

.custom-dropdown-item.is-selected {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.custom-dropdown-item .item-check-icon {
    display: none;
    flex-shrink: 0;
}

.custom-dropdown-item.is-selected .item-check-icon {
    display: block;
}

/* Reset Filter Button */
.btn-reset-flashcard-filter {
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    color: #2563eb;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-reset-flashcard-filter:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* 4. Flashcard Sets Grid (3 Cột trong khung 1200px chuẩn đẹp) */
.flashcard-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* Flashcard Set Card */
.flashcard-set-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.015);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.flashcard-set-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
    border-color: #93c5fd;
}

.set-card-media-wrap {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

.set-card-illustration-box {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.set-card-icon-badge {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flashcard-set-card:hover .set-card-illustration-box {
    transform: scale(1.06);
}

/* Star Bookmark Button: Đồng bộ 100% với vocabulary_item_row.php */
.btn-set-bookmark {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(4px);
}

.btn-set-bookmark:hover {
    background: #fffbeb;
    color: #f59e0b;
    transform: scale(1.1);
}

.btn-set-bookmark:hover .set-star-icon {
    stroke: #f59e0b;
}

.btn-set-bookmark.is-saved {
    color: #f59e0b;
}

.btn-set-bookmark.is-saved .set-star-icon {
    fill: #f59e0b;
    stroke: #f59e0b;
}

/* Card Body */
.set-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Parent Category Tag on Card */
.set-parent-tag-wrap {
    display: flex;
    align-items: center;
    margin-bottom: -2px;
}

.btn-set-parent-tag {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    max-width: 100%;
    text-align: left;
}

.btn-set-parent-tag:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
    transform: translateY(-1px);
}

.parent-tag-folder-icon {
    color: #3b82f6;
    flex-shrink: 0;
}

.parent-tag-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.set-card-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.set-title-kr {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
}

.set-title-vn {
    font-family: var(--font-vietnamese), 'Be Vietnam Pro', sans-serif;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin: 0;
    line-height: 1.35;
}

.set-meta-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #64748b;
    font-weight: 600;
}

.set-meta-dot {
    color: #cbd5e1;
}

.set-pos-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.set-pos-badge.pos-basic {
    background: #ecfdf5;
    color: #059669;
}

.set-pos-badge.pos-noun {
    background: #eff6ff;
    color: #2563eb;
}

.set-pos-badge.pos-verb {
    background: #fffbeb;
    color: #d97706;
}

.set-pos-badge.pos-adjective {
    background: #f5f3ff;
    color: #7c3aed;
}

/* Progress Bar */
.set-progress-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: auto;
}

.set-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
}

.progress-label-text {
    color: #2563eb;
}

.progress-ratio-text {
    color: #94a3b8;
}

.set-progress-bar-track {
    height: 6px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
}

.set-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 6px;
    transition: width 0.4s ease;
}

/* CTA Button */
.btn-start-study {
    height: 38px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1.5px solid #dbeafe;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-start-study:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-arrow-icon {
    transition: transform 0.2s ease;
}

.btn-start-study:hover .btn-arrow-icon {
    transform: translateX(3px);
}

/* Empty State */
.flashcard-empty-state {
    grid-column: 1 / -1;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 60px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.empty-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

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

.empty-desc-text {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
}

.empty-icon-circle.is-preparing {
    background: #eff6ff;
}

.btn-empty-reset-filter {
    margin-top: 6px;
    height: 38px;
    padding: 0 18px;
    border-radius: 10px;
    background: #2563eb;
    border: none;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-empty-reset-filter:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* 5. Pagination Bar (9 mục / trang) */
.flashcard-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 24px 0 12px 0;
    flex-wrap: wrap;
}

.flashcard-pagination-wrapper:empty {
    display: none;
}

.btn-page-nav {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-page-nav:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #2563eb;
}

.btn-page-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f8fafc;
}

.btn-page-num {
    min-width: 38px;
    height: 38px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-page-num:hover:not(.is-active) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #2563eb;
}

.btn-page-num.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 38px;
    color: #94a3b8;
    font-weight: 800;
    font-size: 14px;
}

/* 6. Favorite Bottom Banner (Tu_Vung_2.png Purple Theme + 3-part CTA Layout) */
.flashcard-favorite-cta-banner {
    background: linear-gradient(135deg, #fcfaff 0%, #f5eeff 100%);
    border: 1.5px solid #e9d5ff;
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.03);
    box-sizing: border-box;
    transition: all 0.25s ease;
}

.flashcard-favorite-cta-banner:hover {
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.08);
    border-color: #d8b4fe;
}

.fav-cta-graphic {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fav-cta-star-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #ede9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
    border: 1px solid #ddd6fe;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.flashcard-favorite-cta-banner:hover .fav-cta-star-badge {
    transform: scale(1.12) rotate(-6deg);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.22);
}

.fav-cta-message-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fav-cta-banner-heading {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #581c87;
    margin: 0;
    line-height: 1.3;
}

.fav-cta-banner-subtext {
    font-family: var(--font-body), 'SUIT', sans-serif;
    font-size: 13px;
    color: #7e22ce;
    margin: 0;
    word-break: keep-all;
}

.fav-cta-button-wrap {
    flex-shrink: 0;
}

.btn-fav-cta-pill {
    background-color: #ffffff;
    color: #7c3aed;
    border: 1.5px solid #d8b4fe;
    padding: 9px 18px;
    border-radius: 10px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-fav-cta-pill:hover {
    background-color: #7c3aed;
    color: #ffffff;
    border-color: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.2);
}

.btn-cta-arrow {
    transition: transform 0.2s ease;
}

.btn-fav-cta-pill:hover .btn-cta-arrow {
    transform: translateX(3px);
}

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

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

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

    .flashcard-sidebar-col {
        position: static;
    }

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

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

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

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

    .flashcard-sidebar-card .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-sidebar-card .vocab-sidebar-collapse-wrapper {
        display: none;
        flex-direction: column;
        gap: 10px;
    }

    .flashcard-sidebar-card.is-mobile-open .vocab-sidebar-collapse-wrapper {
        display: flex;
    }

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

    /* Banner Topic Card on Mobile */
    .flashcard-topic-banner-card {
        padding: 14px 16px;
    }

    .flashcard-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .flashcard-banner-media {
        display: none;
    }

    .flashcard-banner-content {
        width: 100%;
    }

    .flashcard-banner-title-text .title-kr-heading {
        font-size: 18px;
    }

    .flashcard-banner-search-wrapper {
        width: 100%;
    }

    .flashcard-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Filter Bar Responsive on Tablets / Mobile (2 Rows, No Scrollbar) */
    .flashcard-filter-bar {
        width: 100%;
    }

    .flashcard-filter-controls-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .flashcard-filter-pills {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        box-sizing: border-box;
        overflow-x: visible;
        padding: 4px;
    }

    .flashcard-filter-pills.has-saved-pill {
        grid-template-columns: repeat(5, 1fr);
    }

    .btn-filter-pill {
        padding: 8px 2px;
        font-size: 12.5px;
        justify-content: center;
        text-align: center;
    }

    .flashcard-filter-right-group {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .custom-category-dropdown-wrap {
        flex: 1;
        min-width: 0;
    }

    .custom-sort-dropdown-wrap {
        flex-shrink: 0;
    }

    .custom-category-dropdown-wrap .custom-dropdown-trigger {
        width: 100%;
    }

    .custom-category-dropdown-wrap .dropdown-trigger-label {
        max-width: 100%;
    }

    .custom-category-dropdown-wrap .custom-dropdown-menu {
        left: 0;
        right: auto;
        width: 290px;
        max-width: 86vw;
    }
}

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

    .flashcard-grid-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .flashcard-favorite-cta-banner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 18px;
    }

    .btn-fav-cta-pill {
        width: 100%;
        justify-content: center;
    }

    /* Always 1 Single Row Pagination on Mobile */
    .flashcard-pagination-wrapper {
        gap: 4px !important;
        flex-wrap: nowrap !important;
        width: 100%;
        justify-content: center;
        margin-top: 20px;
    }

    .flashcard-pagination-wrapper .page-nav-text {
        display: none;
    }

    .btn-page-nav {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        border-radius: 8px;
        font-size: 12px;
        gap: 0;
    }

    .btn-page-num {
        min-width: 32px;
        width: 32px;
        height: 32px;
        font-size: 12.5px;
        border-radius: 8px;
        padding: 0;
    }

    .pagination-ellipsis {
        width: 14px;
        height: 32px;
        font-size: 11px;
    }
}
