/**
 * NgoiSaoSo team
 * @version 3.x
 * @contact: xinchao@ngoisaoso.vn
 * @see https://www.ngoisaoso.vn
 */

/*ADD OTHER*/


:root,
[data-bs-theme=light] {
    --ar-gray-100: #f6f9fc;
    --ar-gray-200: #edf1f5;
    --ar-gray-300: #e3e9ef;
    --ar-gray-400: #d7dde2;
    --ar-gray-500: #b4bbc3;
    --ar-gray-600: #858c97;
    --ar-gray-700: #576071;
    --ar-gray-800: #434a57;
    --ar-gray-900: #121519;
    --ar-primary: #28326c;
    --ar-secondary: #1779c4;
    --ar-secondary2: #3f7fca;
    --ar-success: #3fca90;
    --ar-info: #3f7fca;
    --ar-warning: #edcb50;
    --ar-danger: #ed5050;
    --ar-light: #fff;
    --ar-dark: #121519;
    --ar-primary-rgb: 40, 50, 108;
    --ar-secondary-rgb: 6, 137, 64;
    --ar-success-rgb: 63, 202, 144;
    --ar-info-rgb: 63, 127, 202;
    --ar-warning-rgb: 237, 203, 80;
    --ar-danger-rgb: 237, 80, 80;
    --ar-light-rgb: 255, 255, 255;
    --ar-dark-rgb: 40, 50, 108;
    --ar-primary-text-emphasis: #28326c;
    --ar-secondary-text-emphasis: #576071;
    --ar-success-text-emphasis: #2ea875;
    --ar-info-text-emphasis: #2e66a8;
    --ar-warning-text-emphasis: #e8bd22;
    --ar-danger-text-emphasis: #e82222;
    --ar-light-text-emphasis: #576071;
    --ar-dark-text-emphasis: #121519;
    --ar-primary-bg-subtle: #ecf4f1;
    --ar-secondary-bg-subtle: #f6f9fc;
    --ar-success-bg-subtle: #ecfaf4;
    --ar-info-bg-subtle: #ecf2fa;
    --ar-warning-bg-subtle: #fdfaee;
    --ar-danger-bg-subtle: #fdeeee;
    --ar-light-bg-subtle: #fff;
    --ar-dark-bg-subtle: #ececed;
    --ar-primary-border-subtle: #dae8e3;
    --ar-secondary-border-subtle: #edf1f5;
    --ar-success-border-subtle: #d9f4e9;
    --ar-info-border-subtle: #d9e5f4;
    --ar-warning-border-subtle: #fbf5dc;
    --ar-danger-border-subtle: #fbdcdc;
    --ar-light-border-subtle: #f6f9fc;
    --ar-dark-border-subtle: #edf1f5;
    --ar-white-rgb: 255, 255, 255;
    --ar-black-rgb: 0, 0, 0;
    --ar-font-sans-serif: "Inter", sans-serif;
    --ar-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --ar-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
    --ar-root-font-size: 1rem;
    --ar-body-font-family: var(--ar-font-sans-serif);
    --ar-body-font-size: 1rem;
    --ar-body-font-weight: 400;
    --ar-body-line-height: 1.5;
    --ar-body-color: #576071;
    --ar-body-color-rgb: 87, 96, 113;
    --ar-body-bg: #fff;
    --ar-body-bg-rgb: 255, 255, 255;
    --ar-emphasis-color: #000;
    --ar-emphasis-color-rgb: 0, 0, 0;
    --ar-secondary-color: #858c97;
    --ar-secondary-color-rgb: 133, 140, 151;
    --ar-secondary-bg: #edf1f5;
    --ar-secondary-bg-rgb: 237, 241, 245;
    --ar-tertiary-color: rgba(87, 96, 113, 0.5);
    --ar-tertiary-color-rgb: 87, 96, 113;
    --ar-tertiary-bg: #f6f9fc;
    --ar-tertiary-bg-rgb: 246, 249, 252;
    --ar-heading-color: var(--ar-gray-900);
    --ar-link-color: #28326c;
    --ar-link-color-rgb: 40, 50, 108;
    --ar-link-decoration: underline;
    --ar-link-hover-color: #6873b0;
    --ar-link-hover-color-rgb: #28326c;
    --ar-link-hover-decoration: none;
    --ar-code-color: #e3116c;
    --ar-highlight-color: #28326c;
    --ar-highlight-bg: #fff3cd;
    --ar-border-width: 1px;
    --ar-border-style: solid;
    --ar-border-color: #e3e9ef;
    --ar-border-color-translucent: rgba(0, 0, 0, 0.1);
    --ar-border-radius: 1rem;
    --ar-border-radius-sm: calc(var(--ar-border-radius) * 0.75);
    --ar-border-radius-lg: calc(var(--ar-border-radius) * 1.125);
    --ar-border-radius-xl: calc(var(--ar-border-radius) * 1.5);
    --ar-border-radius-xxl: calc(var(--ar-border-radius) * 2.25);
    --ar-border-radius-2xl: var(--ar-border-radius-xxl);
    --ar-border-radius-pill: 50rem;
    --ar-box-shadow: 0 0.4375rem 1.25rem rgba(208, 208, 196, 0.32);
    --ar-box-shadow-sm: 0 0.375rem 0.75rem -0.125rem rgba(208, 208, 196, 0.24);
    --ar-box-shadow-lg: 0 0.5rem 1.75rem -0.125rem rgba(208, 208, 196, 0.48);
    --ar-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
    --ar-focus-ring-width: 0.25rem;
    --ar-focus-ring-opacity: 0.25;
    --ar-focus-ring-color: rgba(106, 119, 197, 1);
    --ar-form-valid-color: #6976c4;
    --ar-form-valid-border-color: #6976c4;
    --ar-form-invalid-color: #ed5050;
    --ar-form-invalid-border-color: #ed5050
}

[data-bs-theme=dark] {
    color-scheme: dark;
    --ar-body-color: rgba(255, 255, 255, 0.7);
    --ar-body-color-rgb: 255, 255, 255;
    --ar-body-bg: #121519;
    --ar-body-bg-rgb: 18, 21, 25;
    --ar-emphasis-color: #f6f9fc;
    --ar-emphasis-color-rgb: 246, 249, 252;
    --ar-secondary-color: rgba(255, 255, 255, 0.5);
    --ar-secondary-color-rgb: 255, 255, 255;
    --ar-secondary-bg: rgba(255, 255, 255, 0.03);
    --ar-secondary-bg-rgb: 255, 255, 255;
    --ar-tertiary-color: rgba(255, 255, 255, 0.4);
    --ar-tertiary-color-rgb: 255, 255, 255;
    --ar-tertiary-bg: rgba(255, 255, 255, 0.03);
    --ar-tertiary-bg-rgb: 255, 255, 255;
    --ar-primary-text-emphasis: #28326c;
    --ar-secondary-text-emphasis: #edf1f5;
    --ar-success-text-emphasis: #34bc83;
    --ar-info-text-emphasis: #3472bc;
    --ar-warning-text-emphasis: #ebc439;
    --ar-danger-text-emphasis: #eb3939;
    --ar-light-text-emphasis: #edf1f5;
    --ar-dark-text-emphasis: #fff;
    --ar-primary-bg-subtle: #0a1511;
    --ar-secondary-bg-subtle: #434a57;
    --ar-success-bg-subtle: #091e16;
    --ar-info-bg-subtle: #09131e;
    --ar-warning-bg-subtle: #241e0c;
    --ar-danger-bg-subtle: #240c0c;
    --ar-light-bg-subtle: #121519;
    --ar-dark-bg-subtle: #030304;
    --ar-primary-border-subtle: #142a23;
    --ar-secondary-border-subtle: #576071;
    --ar-success-border-subtle: #133d2b;
    --ar-info-border-subtle: #13263d;
    --ar-warning-border-subtle: #473d18;
    --ar-danger-border-subtle: #471818;
    --ar-light-border-subtle: #576071;
    --ar-dark-border-subtle: #434a57;
    --ar-heading-color: #fff;
    --ar-link-color: #cfd5f2;
    --ar-link-hover-color: #d5d8e8;
    --ar-link-color-rgb: 143, 186, 172;
    --ar-link-hover-color-rgb: 165, 200, 189;
    --ar-code-color: #ee70a7;
    --ar-highlight-color: rgba(255, 255, 255, 0.7);
    --ar-highlight-bg: #664d03;
    --ar-border-color: rgba(255, 255, 255, 0.13);
    --ar-border-color-translucent: rgba(255, 255, 255, 0.15);
    --ar-form-valid-color: #6976c4;
    --ar-form-valid-border-color: #6976c4;
    --ar-form-invalid-color: #ed5050;
    --ar-form-invalid-border-color: #ed5050;
}
.navbar {
  --ar-navbar-padding-y: 0.1rem;
}
.btn-primary {
  --ar-btn-bg: var(--ar-primary-text-emphasis);
  --ar-btn-border-color: var(--ar-primary-text-emphasis);
    --ar-btn-hover-bg: var(--ar-primary-text-emphasis);
    --ar-btn-active-bg: var(--ar-secondary-text-emphasis);
    --ar-btn-hover-border-color: var(--ar-primary-text-emphasis);
    --ar-btn-active-border-color: var(--ar-secondary-text-emphasis);
    --ar-btn-disabled-bg: var(--ar-secondary);
    --ar-btn-disabled-border-color: var(--ar-secondary);
}
.btn-outline-primary {
    --ar-btn-color: var(--ar-primary);
    --ar-btn-border-color: var(--ar-primary);
    --ar-btn-hover-color: #fff;
    --ar-btn-hover-bg: var(--ar-primary);
    --ar-btn-hover-border-color: var(--ar-primary);
    --ar-btn-focus-shadow-rgb: 68, 140, 116;
    --ar-btn-active-color: #fff;
    --ar-btn-active-bg: var(--ar-secondary);
    --ar-btn-active-border-color: var(--ar-secondary);
    --ar-btn-active-shadow: unset;
    --ar-btn-disabled-color: var(--ar-secondary2);
    --ar-btn-disabled-bg: transparent;
    --ar-btn-disabled-border-color: var(--ar-secondary2);
    --ar-gradient: none;
}
.btn-gradient {
  background: var(--ar-primary);
  background: linear-gradient(306deg, var(--ar-primary) 0%, var(--ar-secondary) 50%, var(--ar-primary) 100%);  
}
.page-loading {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-transition: all .4s .2s ease-in-out;
  transition: all .4s .2s ease-in-out;
  background-color: #fff;
  opacity: 0;
  visibility: hidden;
  z-index: 9999;
}
[data-bs-theme="dark"] .page-loading {
  background-color: #121519;
}
.page-loading.active {
  opacity: 1;
  visibility: visible;
}
.page-loading-inner {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  text-align: center;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  -webkit-transition: opacity .2s ease-in-out;
  transition: opacity .2s ease-in-out;
  opacity: 0;
}
.page-loading.active > .page-loading-inner {
  opacity: 1;
}
.page-loading-inner > span {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: normal;
  color: #6f788b;
}
[data-bs-theme="dark"] .page-loading-inner > span {
  color: #fff;
  opacity: .6;
}
.page-spinner {
  display: inline-block;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: .75rem;
  vertical-align: text-bottom;
  background-color: #d7dde2; 
  border-radius: 50%;
  opacity: 0;
  -webkit-animation: spinner .75s linear infinite;
  animation: spinner .75s linear infinite;
}
[data-bs-theme="dark"] .page-spinner {
  background-color: rgba(255,255,255,.25);
}
@-webkit-keyframes spinner {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
  }
  50% {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
  }
}
@keyframes spinner {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
  }
  50% {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
  }
}

header.is_ad {
  top: 50px;
}

.navbar-brand img{
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

.toast {
  position: fixed;
  width: 400px;
  top: calc(50% - 200px);
  left: calc(50% - 200px);
  z-index: 99999;
}

.modal-right {
  z-index: 99999 !important;
}

/* ==========================================================
   NAVBAR & NAVBAR-COLLAPSE REORGANIZATION
   ========================================================== */
header.navbar {
    min-height: 72px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid #edf1f5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.navbar-brand img {
    max-height: 52px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.navbar-brand:hover img {
    transform: scale(1.02);
}

@media (max-width: 991.98px) {
    .navbar-brand img {
        max-height: 44px;
    }
}

/* Desktop styles (lg+) */
@media (min-width: 992px) {
    #navbarNav {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    #navbarNav .navbar-nav {
        display: flex;
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.25rem;
        margin-bottom: 0 !important;
    }

    #navbarNav .nav-item {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    #navbarNav .nav-link {
        display: inline-flex;
        align-items: center;
        white-space: nowrap !important;
        font-size: 0.875rem;
        font-weight: 500;
        color: #4b5563;
        padding: 0.45rem 0.65rem !important;
        border-radius: 0.5rem;
        line-height: 1.4;
        transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
    }

    #navbarNav .nav-link:hover {
        color: var(--ar-primary, #28326c) !important;
        background-color: rgba(40, 50, 108, 0.06);
    }

    #navbarNav .nav-link.active {
        color: var(--ar-primary, #28326c) !important;
        font-weight: 600;
        background-color: rgba(40, 50, 108, 0.08);
    }

    #navbarNav .nav-link i {
        font-size: 1.05rem;
        margin-right: 0.35rem;
        opacity: 0.75;
        flex-shrink: 0;
        line-height: 1;
    }

    #navbarNav .nav-link .badge {
        font-size: 0.6875rem;
        font-weight: 600;
        padding: 0.15rem 0.45rem;
        border-radius: 9999px;
        margin-left: 0.35rem;
        line-height: 1.2;
        vertical-align: middle;
    }

    /* User pill */
    .nav-user-pill {
        display: inline-flex;
        align-items: center;
        padding: 0.35rem 0.75rem !important;
        background-color: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 9999px !important;
        font-weight: 600 !important;
        color: #1e293b !important;
    }

    .nav-user-pill:hover,
    .nav-user-pill[aria-expanded="true"] {
        background-color: #f1f5f9 !important;
        border-color: #cbd5e1;
        color: var(--ar-primary, #28326c) !important;
    }

    .nav-user-name {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Extra breakpoint tuning between 992px and 1200px */
@media (min-width: 992px) and (max-width: 1199.98px) {
    #navbarNav .nav-link {
        font-size: 0.8125rem;
        padding: 0.4rem 0.45rem !important;
    }
    #navbarNav .nav-link i {
        font-size: 0.95rem;
        margin-right: 0.25rem;
    }
    #navbarNav .nav-link .badge {
        font-size: 0.625rem;
        padding: 0.1rem 0.35rem;
        margin-left: 0.25rem;
    }
}

/* Mobile collapsible menu (< 992px) */
@media (max-width: 991.98px) {
    #navbarNav.collapse,
    #navbarNav.collapsing {
        background: #ffffff;
        border: 1px solid #edf1f5;
        border-radius: 1rem;
        padding: 1rem;
        margin-top: 0.75rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }

    #navbarNav .navbar-nav {
        flex-direction: column;
        gap: 0.35rem;
        width: 100%;
    }

    #navbarNav .nav-item {
        width: 100%;
    }

    #navbarNav .nav-link {
        display: flex;
        align-items: center;
        padding: 0.65rem 0.85rem !important;
        border-radius: 0.5rem;
        font-size: 0.95rem;
        color: #334155;
        width: 100%;
    }

    #navbarNav .nav-link:hover,
    #navbarNav .nav-link.active {
        background-color: rgba(40, 50, 108, 0.06);
        color: var(--ar-primary, #28326c) !important;
    }

    #navbarNav .nav-link i {
        font-size: 1.15rem;
        margin-right: 0.65rem;
        width: 22px;
        text-align: center;
    }

    #navbarNav .nav-link .badge {
        margin-left: auto;
        font-size: 0.75rem;
        padding: 0.25rem 0.55rem;
    }

    #navbarNav .d-flex.align-items-center {
        flex-direction: column;
        align-items: stretch !important;
        border-top: 1px solid #edf1f5;
        padding-top: 0.75rem;
        margin-top: 0.75rem !important;
        margin-left: 0 !important;
    }

    .nav-user-pill {
        border-radius: 0.5rem !important;
        background: transparent !important;
        border: none !important;
    }
}

/* ==========================================================
   VOCABULARY TEST IMMEDIATE FEEDBACK STYLES
   ========================================================== */
.vocab-input {
    transition: all 0.25s ease-in-out;
    letter-spacing: 0.5px;
}
.vocab-input.is-valid {
    border-color: #3fca90 !important;
    background-color: rgba(63, 202, 144, 0.1) !important;
    color: #1a7f53 !important;
    box-shadow: 0 0 0 0.25rem rgba(63, 202, 144, 0.2) !important;
}
.vocab-input.is-invalid {
    border-color: #ed5050 !important;
    background-color: rgba(237, 80, 80, 0.08) !important;
    color: #b02323 !important;
    box-shadow: 0 0 0 0.25rem rgba(237, 80, 80, 0.2) !important;
}
.feedback-container .alert {
    animation: fadeInDown 0.3s ease-out;
}
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.btn-check-answer {
    transition: all 0.2s ease-in-out;
}
.answer-choice {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}
.answer-choice:hover {
    border-color: var(--ar-primary) !important;
    background-color: rgba(40, 50, 108, 0.03);
}

/* ==========================================================================
   KOREAN PASTEL EDTECH AESTHETIC THEME (Cake / Class101 style)
   ========================================================================== */

:root {
    --kr-bg-canvas: #fafaf7;
    --kr-indigo: #28326c;
    --kr-indigo-light: #445199;
    --kr-indigo-subtle: #f0f3fa;
    --kr-mint: #257042;
    --kr-mint-bg: #eaf6ee;
    --kr-mint-border: #cbebd4;
    --kr-sky: #1967b2;
    --kr-sky-bg: #edf5fd;
    --kr-sky-border: #c8e1fa;
    --kr-peach: #b84b12;
    --kr-peach-bg: #fff3ec;
    --kr-peach-border: #fcd7c2;
    --kr-lavender: #652b91;
    --kr-lavender-bg: #f6edfa;
    --kr-lavender-border: #e9d3f5;
    --kr-card-radius: 20px;
    --kr-hero-radius: 28px;
    --kr-soft-shadow: 0 10px 30px -10px rgba(40, 50, 108, 0.06);
    --kr-hover-shadow: 0 20px 35px -12px rgba(40, 50, 108, 0.12);
}

body {
    background-color: var(--kr-bg-canvas) !important;
}

/* Glassmorphism Header Navbar */
.navbar.fixed-top {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.3s ease;
}

/* Pastel Section Containers */
.kr-section-hero {
    background: linear-gradient(145deg, #f3f5fd 0%, #edf1fa 100%);
    border-radius: var(--kr-hero-radius);
    border: 1px solid rgba(40, 50, 108, 0.06);
    position: relative;
    overflow: hidden;
}

.kr-home-wrapper {
    padding-top: 5rem;
}

@media (max-width: 991.98px) {
    .kr-home-wrapper {
        padding-top: 4.5rem;
    }
}

.font-hangul {
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.01em;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hover-primary:hover {
    color: var(--kr-indigo) !important;
}

.kr-badge-hangul {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.85rem;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    background-color: var(--kr-indigo-subtle);
    color: var(--kr-indigo);
}

/* Bento Pastel Colors */
.kr-card-mint {
    background-color: var(--kr-mint-bg) !important;
    border-color: var(--kr-mint-border) !important;
}
.kr-card-mint .kr-badge-hangul {
    background-color: #d1fae5;
    color: var(--kr-mint);
}

.kr-card-sky {
    background-color: var(--kr-sky-bg) !important;
    border-color: var(--kr-sky-border) !important;
}
.kr-card-sky .kr-badge-hangul {
    background-color: #e0f2fe;
    color: var(--kr-sky);
}

.kr-card-peach {
    background-color: var(--kr-peach-bg) !important;
    border-color: var(--kr-peach-border) !important;
}
.kr-card-peach .kr-badge-hangul {
    background-color: #ffedd5;
    color: var(--kr-peach);
}

.kr-card-lavender {
    background-color: var(--kr-lavender-bg) !important;
    border-color: var(--kr-lavender-border) !important;
}
.kr-card-lavender .kr-badge-hangul {
    background-color: #f3e8ff;
    color: var(--kr-lavender);
}

/* Bento Grid Cards */
.kr-bento-card {
    border-radius: var(--kr-card-radius);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: #fff;
}
.kr-bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--kr-hover-shadow) !important;
}

.kr-card-course {
    border-radius: var(--kr-card-radius);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}
.kr-card-course:hover {
    transform: translateY(-4px);
    box-shadow: var(--kr-hover-shadow) !important;
    border-color: rgba(40, 50, 108, 0.18) !important;
}

/* Interactive Daily Vocab Card Widget */
.kr-widget-vocab {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(40, 50, 108, 0.08);
    box-shadow: 0 15px 35px -10px rgba(40, 50, 108, 0.09);
    position: relative;
    overflow: hidden;
}

/* Filter Tabs */
.kr-tab-btn {
    border-radius: 50rem !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    color: #475569;
    background: #fff;
}
.kr-tab-btn:hover {
    background: #f1f5f9;
    color: var(--kr-indigo);
}
.kr-tab-btn.active {
    background: var(--kr-indigo) !important;
    color: #fff !important;
    border-color: var(--kr-indigo) !important;
    box-shadow: 0 4px 12px rgba(40, 50, 108, 0.25);
}

/* Step Card Journey */
.kr-step-item {
    background: #fff;
    border-radius: var(--kr-card-radius);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.75rem;
    position: relative;
    transition: all 0.25s ease;
}
.kr-step-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--kr-hover-shadow);
}
.kr-step-number {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
}

/* Subtle Korean Footer */
.footer.bg-secondary {
    background-color: #f5f6fa !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ==========================================================
   AROUND ICONS COMPATIBILITY ALIASES & FALLBACKS
   Maps non-standard icon class names to Around Icons glyphs
   ========================================================== */
.ai-zap:before { content: "\f1f7"; } /* rocket */
.ai-users:before { content: "\f23a"; } /* user-group */
.ai-book-open:before { content: "\f1d5"; } /* open-book */
.ai-layers:before { content: "\f1b0"; } /* layer */
.ai-check-circle:before { content: "\f14e"; } /* circle-check */
.ai-info-circle:before,
.ai-info:before { content: "\f150"; } /* circle-info */
.ai-circle-exclamation:before { content: "\f148"; } /* circle-alert */
.ai-cross-circle:before { content: "\f154"; } /* circle-x */
.ai-plus-circle:before { content: "\f152"; } /* circle-plus */
.ai-message-square:before { content: "\f1c6"; } /* message */
.ai-lock:before { content: "\f1b9"; } /* lock-closed */
.ai-log-in:before { content: "\f1bb"; } /* login */
.ai-check-square:before { content: "\f13e"; } /* checks */
.ai-history:before { content: "\f22b"; } /* time */
.ai-loader:before { content: "\f1f4"; } /* refresh */
.ai-pause-filled:before { content: "\f1da"; } /* pause */
.ai-play-circle:before { content: "\f1ea"; } /* play */
.ai-circle:before { content: "\f153"; } /* circle-slash */

/* ==========================================================
   KOREAN CONTACT PAGE STYLES
   ========================================================== */
.kr-contact-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.kr-contact-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--kr-hover-shadow) !important;
}

.kr-form-card {
    border-radius: 28px !important;
}

.max-w-700 {
    max-width: 700px !important;
}

.max-w-800 {
    max-width: 800px !important;
}

.loadContactForm .form-control:focus,
.loadContactForm .form-select:focus {
    border-color: var(--kr-indigo) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 50, 108, 0.12) !important;
}

/* ==========================================================
   AROUND ICONS COMPATIBILITY ALIASES & FALLBACKS
   Maps non-standard icon class names to Around Icons glyphs
   ========================================================== */
.ai-zap:before { content: "\f1f7"; } /* rocket */
.ai-users:before { content: "\f23a"; } /* user-group */
.ai-book-open:before { content: "\f1d5"; } /* open-book */
.ai-layers:before { content: "\f1b0"; } /* layer */
.ai-check-circle:before { content: "\f14e"; } /* circle-check */
.ai-info-circle:before,
.ai-info:before { content: "\f150"; } /* circle-info */
.ai-circle-exclamation:before { content: "\f148"; } /* circle-alert */
.ai-cross-circle:before { content: "\f154"; } /* circle-x */
.ai-plus-circle:before { content: "\f152"; } /* circle-plus */
.ai-message-square:before { content: "\f1c6"; } /* message */
.ai-lock:before { content: "\f1b9"; } /* lock-closed */
.ai-log-in:before { content: "\f1bb"; } /* login */
.ai-check-square:before { content: "\f13e"; } /* checks */
.ai-history:before { content: "\f22b"; } /* time */
.ai-loader:before { content: "\f1f4"; } /* refresh */
.ai-pause-filled:before { content: "\f1da"; } /* pause */
.ai-play-circle:before { content: "\f1ea"; } /* play */
.ai-circle:before { content: "\f153"; } /* circle-slash */

/* ==========================================================
   KOREAN CONTACT PAGE STYLES
   ========================================================== */
.kr-contact-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.kr-contact-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--kr-hover-shadow) !important;
}

.kr-form-card {
    border-radius: 28px !important;
}

.max-w-700 {
    max-width: 700px !important;
}

.max-w-800 {
    max-width: 800px !important;
}

.loadContactForm .form-control:focus,
.loadContactForm .form-select:focus {
    border-color: var(--kr-indigo) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 50, 108, 0.12) !important;
}


/* ==========================================================
   KOREAN EDTECH COURSE DETAIL STYLES
   ========================================================== */
.kr-course-hero-card {
    background: #ffffff;
    border: 1px solid #edf1f5;
    border-radius: 28px;
    box-shadow: 0 10px 30px -5px rgba(28, 43, 109, 0.05);
}

.kr-course-hero-img-wrap {
    max-width: 320px;
}

.kr-course-hero-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(40, 50, 108, 0.08);
}

.kr-course-hero-placeholder {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
}

.kr-course-level-badge {
    background: rgba(28, 43, 109, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 14px;
}

.kr-hangul-badge {
    background: rgba(40, 50, 108, 0.06);
    color: #1c2b6d;
    font-weight: 700;
    font-size: 0.8125rem;
    padding: 4px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(40, 50, 108, 0.12);
}

.kr-hangul-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00a884;
}

.kr-course-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #1c2b6d;
    line-height: 1.25;
}

.kr-meta-chip {
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.825rem;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.kr-progress-box {
    background: #f8fafc;
    border: 1px solid #eef2f6;
}

.kr-course-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.kr-course-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #00a884 0%, #059669 100%);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Content cards */
.kr-content-card {
    background: #ffffff;
    border: 1px solid #edf1f5;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.kr-icon-bubble {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(40, 50, 108, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kr-section-sub {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 2px;
}

/* Lesson card items */
.kr-lesson-card {
    background: #ffffff;
    border: 1px solid #edf1f5;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kr-lesson-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(40, 50, 108, 0.06);
    background: #ffffff;
}

.kr-lesson-order {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Pretendard', 'Segoe UI', sans-serif;
    transition: all 0.25s ease;
}

.kr-lesson-card:hover .kr-lesson-order {
    background: rgba(40, 50, 108, 0.1);
    color: #1c2b6d;
}

.kr-lesson-title {
    font-size: 0.975rem;
    font-weight: 700;
    transition: color 0.2s ease;
}

.kr-lesson-card:hover .kr-lesson-title {
    color: #1c2b6d !important;
}

/* Sticky sidebar */
.kr-sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
}

.kr-sidebar-card {
    background: #ffffff;
    border: 1px solid #edf1f5;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.btn-subtle-primary {
    background: rgba(40, 50, 108, 0.08);
    color: #28326c;
    border: 1px solid transparent;
}
.btn-subtle-primary:hover {
    background: #28326c;
    color: #ffffff;
}

.btn-subtle-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
}
.btn-subtle-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.py-2-5 {
    padding-top: 0.625rem !important;
    padding-bottom: 0.625rem !important;
}

/* Korean Inspirational Quote Widget */
.kr-quote-widget {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f2ff 100%);
    border: 1px solid #d0e4ff;
}

.kr-quote-hangul {
    font-family: 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1c2b6d;
}

.border-dashed {
    border-style: dashed !important;
}

/* Course description styled typography */
.kr-course-body h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1c2b6d;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.kr-course-body ul {
    padding-left: 1.25rem;
    margin-bottom: 1.25rem;
}

.kr-course-body li {
    margin-bottom: 0.5rem;
}

.kr-course-body p {
    margin-bottom: 0.75rem;
}


/* ==========================================================
   KOREAN EDTECH COURSE DASHBOARD & CATALOG STYLES
   ========================================================== */
.kr-guest-hero {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fc 100%);
    border: 1px solid #d4e8fc;
    border-radius: 28px;
    box-shadow: 0 10px 30px -5px rgba(28, 43, 109, 0.04);
}

.kr-welcome-banner {
    background: linear-gradient(135deg, #1c2b6d 0%, #28326c 100%);
    border-radius: 28px;
    box-shadow: 0 10px 30px -5px rgba(28, 43, 109, 0.18);
}

.kr-student-avatar {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
}

.kr-stat-card {
    background: #ffffff;
    border: 1px solid #edf1f5;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
}

.kr-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(40, 50, 108, 0.06);
    border-color: #cbd5e1;
}

.kr-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.kr-stat-icon-primary {
    background: rgba(40, 50, 108, 0.08);
    color: #28326c;
}

.kr-stat-icon-success {
    background: rgba(5, 150, 105, 0.08);
    color: #059669;
}

.kr-stat-icon-warning {
    background: rgba(217, 119, 6, 0.08);
    color: #d97706;
}

.kr-stat-icon-info {
    background: rgba(14, 165, 233, 0.08);
    color: #0ea5e9;
}

.kr-stat-number {
    font-size: 1.45rem;
    font-weight: 800;
    color: #1e293b;
    font-family: 'Pretendard', 'Segoe UI', sans-serif;
}

.kr-stat-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

.kr-stat-badge-primary {
    background: rgba(40, 50, 108, 0.06);
    color: #28326c;
}

.kr-stat-badge-success {
    background: rgba(5, 150, 105, 0.06);
    color: #059669;
}

.kr-stat-badge-warning {
    background: rgba(217, 119, 6, 0.06);
    color: #d97706;
}

.kr-stat-badge-info {
    background: rgba(14, 165, 233, 0.06);
    color: #0ea5e9;
}

.kr-enrolled-course-card {
    background: #ffffff;
    border: 1px solid #edf1f5;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kr-enrolled-course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(40, 50, 108, 0.06);
    border-color: #cbd5e1;
}

.kr-enrolled-img-wrap {
    height: 125px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
}

.kr-enrolled-placeholder {
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.kr-timeline-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fs-xxs {
    font-size: 0.6875rem !important;
}

.kr-catalog-card {
    background: #ffffff;
    border: 1px solid #edf1f5;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kr-catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(40, 50, 108, 0.08);
    border-color: #cbd5e1;
}

.kr-catalog-thumb {
    height: 175px;
    background: #f8fafc;
}

.kr-catalog-placeholder {
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
}

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

.kr-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kr-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hover-primary:hover {
    color: #1c2b6d !important;
}

.max-w-320 {
    max-width: 320px;
}

.max-w-500 {
    max-width: 500px;
}

.py-1-5 {
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
}


/* ==========================================================
   KOREAN PRACTICE CENTER (LUYỆN TẬP TIẾNG HÀN) STYLES
   ========================================================== */
.kr-practice-card {
    background: #ffffff;
    border: 1px solid #edf1f5;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kr-practice-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(40, 50, 108, 0.08);
    border-color: #cbd5e1;
}

.kr-practice-card:hover .kr-practice-title {
    color: #1c2b6d !important;
}

.kr-live-banner {
    background: linear-gradient(135deg, #1c2b6d 0%, #302060 50%, #1e3a8a 100%);
    border-radius: 24px;
    box-shadow: 0 10px 30px -5px rgba(28, 43, 109, 0.15);
}

.kr-modal-header {
    background: linear-gradient(135deg, #f8faff 0%, #edf2fc 100%);
}

.kr-summary-box {
    background: #f8fafc;
    border: 1px solid #eef2f6;
}

.kr-spec-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kr-spec-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1 !important;
}

.kr-live-info-box {
    background: linear-gradient(135deg, #2b1055 0%, #4c1d95 100%);
}

.kr-live-icon-bubble {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rounded-5 {
    border-radius: 28px !important;
}

.p-3-5 {
    padding: 1.125rem !important;
}

.shadow-xs {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}


/* Practice modal – question preview list */
.kr-question-list {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.kr-q-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #ffffff;
    border: 1px solid #edf1f5;
    border-radius: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.kr-q-item:hover {
    border-color: #cbd5e1;
    background: #fbfcfe;
}

.kr-q-num {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
    background: rgba(40, 50, 108, 0.08);
    color: #1c2b6d;
    font-weight: 800;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kr-q-content {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.55;
    word-break: break-word;
    font-family: 'Pretendard', 'Malgun Gothic', 'Segoe UI', sans-serif;
}

.kr-q-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kr-q-option {
    font-size: 0.8rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 999px;
    padding: 3px 12px;
}

.kr-q-option b {
    color: #1c2b6d;
    margin-right: 2px;
}


/* Inline expanded practice card (no popup) */
.kr-practice-card.is-expanded {
    border-color: rgba(40, 50, 108, 0.35) !important;
    box-shadow: 0 12px 32px rgba(28, 43, 109, 0.08) !important;
}

.kr-practice-card .kr-card-chevron {
    transition: transform 0.25s ease;
    display: inline-flex;
}

.kr-practice-card.is-expanded .kr-card-chevron {
    transform: rotate(180deg);
}

.kr-practice-card.is-expanded .kr-card-footer-bar {
    display: none !important;
}


/* Vocabulary card answer badge inside expanded question row */
.kr-q-vocab-answer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.22);
    color: #065f46;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.kr-q-answer-label {
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
}

.kr-q-answer-val {
    font-family: 'Pretendard', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #047857;
}


/* 5 Skills & 6 Levels filter panel + Part 1 Study / Part 2 Practice boxes */
.kr-filter-panel {
    background: #ffffff;
    border: 1px solid rgba(22, 21, 27, 0.08);
    box-shadow: 0 4px 16px rgba(28, 43, 109, 0.04);
}

/* Segmented capsule switcher (Lucian #417 inspired) */
.kr-seg-group {
    display: inline-flex;
    align-items: center;
    background: #f4f2ee;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid rgba(22, 21, 27, 0.07);
    gap: 2px;
}

.kr-seg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: #57535f;
    font-size: 12.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.kr-seg-btn:hover {
    color: #16151b;
}

.kr-seg-btn.active {
    background: #ffffff;
    color: #16151b;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(22, 21, 27, 0.12);
}

.kr-seg-btn.active i {
    color: #6a57f2;
}

/* Compact Level 1–6 Pills */
.kr-level-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(22, 21, 27, 0.1);
    background: #ffffff;
    color: #57535f;
    font-size: 12.5px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .18s ease;
}

.kr-level-pill:hover {
    border-color: #6a57f2;
    color: #16151b;
    background: #faf9f7;
}

.kr-level-pill.active {
    background: #1c2b6d;
    border-color: #1c2b6d;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(28, 43, 109, 0.18);
}

.kr-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 17px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    background: #eef2f6;
    color: #475569;
}

.kr-level-pill.active .kr-pill-count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

/* Clean rounded select & search input */
.kr-filter-select {
    border-radius: 999px !important;
    border: 1px solid rgba(22, 21, 27, 0.12) !important;
    background-color: #faf9f7 !important;
    color: #16151b !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    padding: 5px 30px 5px 13px !important;
    min-width: 170px;
    cursor: pointer;
}

.kr-filter-select:focus {
    border-color: #6a57f2 !important;
    box-shadow: 0 0 0 3px rgba(106, 87, 242, 0.12) !important;
}

.kr-vocab-search-wrap {
    min-width: 220px;
}

.kr-part-box {
    border: 1px solid #e2e8f0;
}

.kr-part-study {
    background: #f8fafc;
    border-color: #dbeafe;
}

.kr-part-practice {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: #bbf7d0;
}

.kr-part-badge {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.4px;
}


/* ==========================================================
   LEFT SIDEBAR 5-SKILLS MENU ON PRACTICE PAGE (/hoc-tieng-han/test/)
   ========================================================== */
.kr-skill-sidebar-wrap {
    position: -webkit-sticky;
    position: sticky;
    top: 88px;
}

.kr-skill-sidebar {
    background: #ffffff;
    border: 1px solid #edf1f5 !important;
    box-shadow: 0 6px 24px rgba(28, 43, 109, 0.04);
}

.gap-1-5 {
    gap: 0.375rem !important;
}

.kr-skill-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: #334155;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.kr-skill-menu-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1c2b6d;
}

.kr-skill-menu-item.active,
.kr-skill-menu-item.btn-primary {
    background: linear-gradient(135deg, #1c2b6d 0%, #28326c 100%) !important;
    color: #ffffff !important;
    border-color: #1c2b6d !important;
    box-shadow: 0 6px 16px rgba(28, 43, 109, 0.18);
}

.kr-skill-menu-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background: rgba(40, 50, 108, 0.08);
    color: #1c2b6d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.kr-skill-menu-item.active .kr-skill-menu-icon,
.kr-skill-menu-item.btn-primary .kr-skill-menu-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.kr-skill-menu-sub {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.2;
}

.kr-skill-menu-item.active .kr-skill-menu-sub,
.kr-skill-menu-item.btn-primary .kr-skill-menu-sub {
    color: rgba(255, 255, 255, 0.78);
}

.kr-skill-menu-count {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 9px;
}

.kr-skill-menu-item.active .kr-skill-menu-count,
.kr-skill-menu-item.btn-primary .kr-skill-menu-count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}


/* ==========================================================
   LUCIAN UX/UI PROMPT #417 SIDEBAR MENU (HARU SPRING RAIL)
   ========================================================== */
:root {
    --ux-page: #F4F2EE;
    --ux-surface: #FFFFFF;
    --ux-surface-2: #F5F3EF;
    --ux-surface-3: #EAE7E1;
    --ux-ink: #16151B;
    --ux-ink-2: #57535F;
    --ux-ink-3: #8E8A97;
    --ux-line: rgba(22, 21, 27, .09);
    --ux-line-2: rgba(22, 21, 27, .17);
    --ux-accent: #6A57F2;
    --ux-accent-2: #2F8FE0;
    --ux-accent-soft: rgba(106, 87, 242, .12);
    --ux-accent-ink: #FFFFFF;
    --ux-mint: #119C72;
    --ux-warn: #D6731E;
    --ux-danger: #D93A55;
    --ux-glass: rgba(255, 255, 255, .58);
    --ux-glass-line: rgba(255, 255, 255, .85);
    --ux-shadow: rgba(40, 30, 80, .14);
    --ux-shadow-strong: rgba(40, 30, 80, .3);
    --ux-grad: linear-gradient(120deg, #7B61FF, #3D8BFF 55%, #1FB89A);
    --ux-ease: cubic-bezier(.2, .8, .2, 1);
    --ux-spring: cubic-bezier(.34, 1.45, .64, 1);
}

.ux, .ux *, .ux *::before, .ux *::after {
    box-sizing: border-box;
}

.ux {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
    color: var(--ux-ink);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -.01em;
    -webkit-tap-highlight-color: transparent;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.u417 {
    position: fixed;
    left: 12px;
    top: 10px;
    bottom: 10px;
    z-index: 1030;
    display: flex;
    align-items: stretch;
    color: var(--ux-ink);
}

.u417-sb {
    position: relative;
    width: 268px;
    height: 100%;
    padding: 18px 14px;
    border-radius: 22px;
    background: var(--ux-surface);
    box-shadow: 0 0 0 1px var(--ux-line), 0 2px 6px var(--ux-shadow), 0 24px 48px -20px var(--ux-shadow-strong);
    display: flex;
    flex-direction: column;
    transition: width .6s cubic-bezier(.3, 1.3, .45, 1), padding .4s var(--ux-ease);
}

.u417.is-rail .u417-sb {
    width: 76px;
    padding: 18px 12px;
}

.u417-hd {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    height: 58px;
    padding: 0 8px 10px 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--ux-line);
    overflow: hidden;
    flex-shrink: 0;
}

.u417-logo-full {
    height: 46px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.u417-logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    display: none;
    flex-shrink: 0;
}

.u417.is-rail .u417-hd {
    justify-content: center;
    padding: 0 0 10px 0;
}

.u417.is-rail .u417-logo-full {
    display: none;
}

.u417.is-rail .u417-logo-icon {
    display: block;
}

.u417-mk {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #8B7BFF, #3D8BFF);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.u417-mk svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.u417-lb {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity .3s var(--ux-ease) .12s, transform .45s var(--ux-ease) .1s;
}

.u417.is-rail .u417-lb {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
    transition: opacity .15s, transform .25s;
}

.u417-hd b {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.u417-nav {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.u417-nav::-webkit-scrollbar {
    display: none;
}

.u417-pl {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 44px;
    border-radius: 13px;
    background: var(--ux-surface-2);
    box-shadow: inset 0 0 0 1px var(--ux-line);
    transform: translateY(var(--py, 0px));
    transition: transform .55s cubic-bezier(.3, 1.45, .5, 1);
}

.u417-sep {
    height: 28px;
    display: flex;
    align-items: center;
    padding: 6px 12px 0 15px;
    margin-top: 8px;
    border-top: 1px solid var(--ux-line);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ux-ink-3);
    overflow: hidden;
    pointer-events: none;
    flex-shrink: 0;
}

.u417-sep-bottom {
    margin-top: auto;
    padding-top: 8px;
}

.u417.is-rail .u417-sep {
    height: 12px;
    padding: 0;
    margin: 6px 8px;
}

.u417.is-rail .u417-sep-bottom {
    margin-top: auto;
}

.u417-it {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 44px;
    padding: 0 12px 0 15px;
    border-radius: 13px;
    color: var(--ux-ink-3) !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    transition: color .2s;
}

.u417-it-danger:hover {
    color: var(--ux-danger) !important;
}

.u417-it-danger:hover svg {
    color: var(--ux-danger) !important;
}

.u417-it:hover {
    color: var(--ux-ink) !important;
}

.u417-it[aria-current="page"] {
    color: var(--ux-ink) !important;
    font-weight: 700;
}

.u417-it svg {
    width: 22px;
    height: 22px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .45s var(--ux-spring), color .2s;
}

.u417-it[aria-current="page"] svg {
    color: var(--ux-accent);
}

.u417-it:active svg {
    transform: scale(.85);
}

.u417-it .u417-lb {
    flex: 1;
}

/* Sub-menu under each Skill: Phần kiến thức & Phần luyện tập */
.u417-has-sub {
    display: flex;
    flex-direction: column;
}

.u417-sub {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px 34px;
    padding-left: 10px;
    border-left: 1.5px solid var(--ux-line-2);
}

.u417-has-sub.is-open .u417-sub {
    display: flex;
}

.u417.is-rail .u417-sub {
    display: none !important;
}

.u417-sub-it {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ux-ink-3) !important;
    text-decoration: none !important;
    transition: background-color .18s ease, color .18s ease;
}

.u417-sub-it:hover {
    color: var(--ux-ink) !important;
    background: var(--ux-surface-2);
}

.u417-sub-it.active {
    color: var(--ux-accent) !important;
    background: var(--ux-accent-soft);
    font-weight: 700;
}

.u417-sub-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.65;
    flex-shrink: 0;
}

.u417-sub-it.active .u417-sub-dot {
    opacity: 1;
    transform: scale(1.2);
}

/* ==========================================================
   PHẦN KIẾN THỨC TỪ VỰNG: DANH SÁCH TỪ VỰNG & THẺ TỪ VỰNG
   ========================================================== */
.kr-vocab-word-kr {
    font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", "Noto Sans KR", sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #1c2b6d;
    letter-spacing: -0.02em;
}

.kr-vocab-audio-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kr-vocab-list-thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f8fafc;
}

.kr-vocab-list-item {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.kr-vocab-list-item:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe !important;
    box-shadow: 0 8px 20px rgba(28, 43, 109, 0.06);
}

.kr-vocab-deck-stage {
    max-width: 780px;
}

.kr-vocab-big-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 24px;
    padding: 24px 28px;
    box-shadow: 0 14px 36px -12px rgba(28, 43, 109, 0.1);
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.kr-vocab-big-card:hover {
    transform: translateY(-3px);
    border-color: #8b7bff;
    box-shadow: 0 20px 44px -14px rgba(106, 87, 242, 0.16);
}

.kr-vocab-big-img-wrap {
    max-width: 240px;
    max-height: 220px;
    overflow: hidden;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    padding: 8px;
}

.kr-vocab-big-img-wrap img {
    max-height: 200px;
    object-fit: contain;
}

.kr-vocab-big-korean {
    font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", "Noto Sans KR", sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    color: #1c2b6d;
    line-height: 1.2;
}

.kr-vocab-big-answer {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid #a7f3d0;
}

.kr-vocab-grid-card {
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.kr-vocab-grid-card:hover {
    transform: translateY(-4px);
    border-color: #8b7bff !important;
    box-shadow: 0 12px 28px -10px rgba(106, 87, 242, 0.16);
}

.kr-vocab-grid-img-wrap {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

.kr-vocab-grid-img {
    max-height: 112px;
    max-width: 100%;
    object-fit: contain;
}

.u417-bd {
    position: absolute;
    right: 12px;
    top: 11px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 99px;
    background: var(--ux-accent);
    color: var(--ux-accent-ink);
    font-size: 11.5px;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--ux-surface);
    animation: u417-pop .5s cubic-bezier(.3, 1.8, .5, 1);
}

.u417.is-rail .u417-bd {
    right: auto;
    left: 31px;
    top: 6px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 9.5px;
    line-height: 17px;
    animation: u417-pop2 .5s cubic-bezier(.3, 1.8, .5, 1);
}

@keyframes u417-pop {
    from { transform: scale(.3); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@keyframes u417-pop2 {
    from { transform: scale(.3); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.u417-it:focus-visible {
    outline: 2px solid var(--ux-accent);
    outline-offset: -2px;
}

.u417-tg {
    position: absolute;
    right: -15px;
    top: 26px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: var(--ux-surface);
    box-shadow: 0 0 0 1px var(--ux-line-2), 0 3px 8px -2px var(--ux-shadow-strong);
    color: var(--ux-ink-2);
    cursor: pointer;
    transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), color .2s;
}

.u417-tg:hover {
    color: var(--ux-ink);
    transform: scale(1.12);
}

.u417-tg svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .55s cubic-bezier(.3, 1.6, .5, 1);
}

.u417.is-rail .u417-tg svg {
    transform: rotate(180deg);
}

.u417-tg:focus-visible {
    outline: 2px solid var(--ux-accent);
    outline-offset: 2px;
}

.u417-mobile-bar,
.u417-mobile-backdrop {
    display: none;
}

@media (min-width: 992px) {
    .page-wrapper {
        padding-left: 288px !important;
        transition: padding-left .6s cubic-bezier(.3, 1.3, .45, 1);
    }
    body.kr-ig-sidebar-collapsed .page-wrapper {
        padding-left: 96px !important;
    }
    .kr-home-wrapper {
        padding-top: 1.5rem !important;
    }
}

@media (max-width: 991.98px) {
    .page-wrapper {
        padding-top: 62px !important;
        padding-left: 0 !important;
    }
    .kr-home-wrapper {
        padding-top: 0.75rem !important;
    }

    /* Compact Fixed Mobile Top Header Bar */
    .u417-mobile-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 54px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--ux-line);
        box-shadow: 0 2px 12px rgba(22, 21, 27, 0.05);
        padding: 0 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 1035;
    }

    .u417-mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 36px;
        padding: 0 12px;
        border-radius: 999px;
        border: 1px solid var(--ux-line-2);
        background: var(--ux-surface);
        color: var(--ux-ink);
        font-size: 13px;
        font-weight: 700;
    }

    .u417-mobile-menu-btn svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
    }

    .u417-mobile-logo {
        display: inline-flex;
        align-items: center;
    }

    .u417-mobile-logo img {
        height: 32px;
        width: auto;
        max-width: 150px;
        object-fit: contain;
    }

    .u417-mobile-action {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid var(--ux-line);
        background: var(--ux-surface-2);
        color: var(--ux-accent);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .u417-mobile-action svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 1.75;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* Mobile Off-Canvas Backdrop */
    .u417-mobile-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.42);
        backdrop-filter: blur(2px);
        z-index: 1038;
        opacity: 0;
        pointer-events: none;
        transition: opacity .28s ease;
    }

    body.u417-mobile-open .u417-mobile-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    /* Hide sidebar off-screen on mobile by default so it NEVER covers content */
    .u417 {
        left: 8px;
        top: 8px;
        bottom: 8px;
        z-index: 1040;
        transform: translateX(-115%);
        pointer-events: none;
        transition: transform .32s cubic-bezier(.2, .8, .2, 1);
    }

    body.u417-mobile-open .u417 {
        transform: translateX(0);
        pointer-events: auto;
    }

    /* When opened on mobile, always display full expanded menu (never slim rail) */
    .u417.is-rail .u417-sb {
        width: 268px;
        padding: 18px 14px;
    }

    .u417.is-rail .u417-hd {
        justify-content: flex-start;
        padding: 0 8px 10px 8px;
    }

    .u417.is-rail .u417-logo-full {
        display: block;
    }

    .u417.is-rail .u417-logo-icon {
        display: none;
    }

    .u417.is-rail .u417-lb {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .u417.is-rail .u417-has-sub.is-open .u417-sub {
        display: flex !important;
    }

    .u417.is-rail .u417-bd {
        right: 12px;
        left: auto;
        top: 11px;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        font-size: 11.5px;
        line-height: 22px;
    }

    .u417.is-rail .u417-tg svg {
        transform: none;
    }
}
