/**
 * MangaSee Main Design System & Framework Stylesheet
 */

/* -------------------------------------------------------------------------- */
/* 1. BUTTONS & UI CONTROLS                                                   */
/* -------------------------------------------------------------------------- */
.ms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--ms-radius-full);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    line-height: 1.2;
}

.ms-btn:focus-visible {
    outline: 2px solid var(--ms-primary);
    outline-offset: 2px;
}

.ms-btn-primary {
    background-color: var(--ms-primary);
    color: #ffffff !important;
    border-color: var(--ms-primary);
}

.ms-btn-primary:hover {
    background-color: var(--ms-primary-hover);
    border-color: var(--ms-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.25);
}

.ms-btn-outline {
    background-color: #ffffff;
    color: var(--ms-text-main) !important;
    border-color: var(--ms-border);
}

.ms-btn-outline:hover {
    border-color: var(--ms-primary);
    color: var(--ms-primary) !important;
    background-color: var(--ms-primary-light);
}

.ms-btn-white {
    background-color: #ffffff;
    color: var(--ms-text-dark) !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.ms-btn-white:hover {
    background-color: #f7f7fc;
    transform: translateY(-1px);
}

.ms-btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.ms-btn-lg {
    padding: 13px 26px;
    font-size: 15px;
}

.ms-btn-block {
    display: flex;
    width: 100%;
}

.ms-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ms-radius-full);
    background: #ffffff;
    border: 1px solid var(--ms-border);
    color: var(--ms-text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ms-icon-btn:hover {
    background-color: var(--ms-primary-light);
    color: var(--ms-primary);
    border-color: var(--ms-primary);
}

/* -------------------------------------------------------------------------- */
/* 2. HEADER & NAVIGATION                                                     */
/* -------------------------------------------------------------------------- */
.ms-site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--ms-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.ms-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.ms-header-brand {
    flex-shrink: 0;
}

.ms-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.ms-main-navigation {
    display: flex;
    align-items: center;
}

.ms-nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 22px;
}

.ms-nav-list > li {
    position: relative;
}

.ms-nav-list > li > a {
    color: var(--ms-text-main);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s ease;
}

.ms-nav-list > li > a:hover,
.ms-nav-list > li.current-menu-item > a {
    color: var(--ms-primary);
}

.ms-dropdown-arrow {
    transition: transform 0.2s ease;
}

.ms-nav-list > li:hover .ms-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.ms-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    list-style: none;
    padding: 8px;
    border-radius: var(--ms-radius-md);
    border: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1010;
}

.ms-nav-list > li:hover > .ms-dropdown-menu,
.ms-nav-list > li:focus-within > .ms-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ms-dropdown-menu li a {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--ms-text-main);
    border-radius: var(--ms-radius-sm);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.ms-dropdown-menu li a:hover {
    background-color: var(--ms-primary-light);
    color: var(--ms-primary);
}

.ms-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ms-hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.ms-hamburger-box {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ms-hamburger-inner,
.ms-hamburger-box::before,
.ms-hamburger-box::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--ms-text-main);
    border-radius: 2px;
    transition: transform 0.2s ease;
}

/* -------------------------------------------------------------------------- */
/* 3. SEARCH OVERLAY MODAL                                                    */
/* -------------------------------------------------------------------------- */
.ms-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.ms-search-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.ms-search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 17, 26, 0.65);
    backdrop-filter: blur(4px);
}

.ms-search-modal-container {
    position: relative;
    width: 90%;
    max-width: 680px;
    background: #ffffff;
    border-radius: var(--ms-radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(-16px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ms-search-modal.active .ms-search-modal-container {
    transform: translateY(0);
}

.ms-search-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ms-border);
}

.ms-modal-searchform {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ms-modal-search-icon {
    color: var(--ms-text-muted);
}

.ms-modal-search-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--ms-text-main);
}

.ms-modal-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--ms-text-muted);
}

.ms-search-live-results {
    padding: 16px 20px;
    max-height: 400px;
    overflow-y: auto;
}

.ms-search-hints {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ms-text-muted);
}

.ms-hint-tag {
    background: var(--ms-border-light);
    color: var(--ms-text-main);
    padding: 4px 10px;
    border-radius: var(--ms-radius-full);
    text-decoration: none;
}

.ms-hint-tag:hover {
    background: var(--ms-primary-light);
    color: var(--ms-primary);
}

.ms-search-results-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ms-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--ms-radius-md);
    text-decoration: none;
    transition: background 0.15s ease;
}

.ms-search-item:hover {
    background: var(--ms-primary-light);
}

.ms-search-item img {
    border-radius: 6px;
    object-fit: cover;
}

.ms-search-item-info h4 {
    margin: 0;
    font-size: 14px;
    color: var(--ms-text-dark);
}

.ms-search-item-info span {
    font-size: 12px;
    color: var(--ms-text-muted);
}

/* -------------------------------------------------------------------------- */
/* 4. MOBILE NAVIGATION DRAWER                                                */
/* -------------------------------------------------------------------------- */
.ms-mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.ms-mobile-drawer.active {
    opacity: 1;
    pointer-events: auto;
}

.ms-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.ms-drawer-panel {
    position: relative;
    width: 300px;
    max-width: 85%;
    background: #ffffff;
    height: 100%;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.ms-mobile-drawer.active .ms-drawer-panel {
    transform: translateX(0);
}

.ms-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ms-border);
}

.ms-drawer-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--ms-text-muted);
}

.ms-drawer-search {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ms-border-light);
}

.ms-drawer-search form {
    display: flex;
    align-items: center;
    background: var(--ms-bg-body);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius-full);
    padding: 6px 12px;
}

.ms-drawer-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
}

.ms-drawer-search-submit {
    background: none;
    border: none;
    color: var(--ms-text-muted);
    cursor: pointer;
}

.ms-drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.ms-drawer-group-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #9CA3AF;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.ms-drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ms-drawer-links li a {
    font-size: 15px;
    font-weight: 500;
    color: var(--ms-text-main);
    text-decoration: none;
    display: block;
    padding: 6px 0;
}

.ms-drawer-links li a:hover {
    color: var(--ms-primary);
}

.ms-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--ms-border);
}

/* -------------------------------------------------------------------------- */
/* 5. HOMEPAGE HERO SECTION                                                   */
/* -------------------------------------------------------------------------- */
.ms-hero-section {
    padding: 36px 0 28px;
    background: linear-gradient(180deg, #FAFAFD 0%, #FFFFFF 100%);
    border-bottom: 1px solid var(--ms-border-light);
}

.ms-hero-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: center;
}

.ms-hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #EDE9FE;
    color: #6C5CE7;
    font-size: 12.5px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: var(--ms-radius-full);
    margin-bottom: 16px;
    border: 1px solid #E0DBFB;
}

.ms-hero-pill-badge svg {
    color: #6C5CE7;
}

.ms-hero-title {
    font-size: 42px;
    font-weight: 800;
    color: #20212A;
    line-height: 1.15;
    letter-spacing: -0.8px;
    margin-bottom: 14px;
}

.ms-highlight-purple {
    color: #6C5CE7;
}

.ms-hero-description {
    font-size: 15.5px;
    color: #707584;
    line-height: 1.6;
    margin-bottom: 22px;
    max-width: 520px;
}

.ms-hero-search-box {
    margin-bottom: 16px;
}

.ms-hero-searchform {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #E8EAF0;
    border-radius: var(--ms-radius-full);
    padding: 5px 6px 5px 18px;
    box-shadow: 0 4px 18px rgba(108, 92, 231, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ms-hero-searchform:focus-within {
    border-color: #6C5CE7;
    box-shadow: 0 4px 22px rgba(108, 92, 231, 0.16);
}

.ms-hero-search-icon {
    color: #8A90A2;
    margin-right: 10px;
    flex-shrink: 0;
}

.ms-hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #20212A;
    background: transparent;
}

.ms-hero-search-btn {
    background-color: #6C5CE7;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: var(--ms-radius-full);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ms-hero-search-btn:hover {
    background-color: #5948D6;
}

.ms-hero-popular-searches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
}

.ms-pop-label {
    color: #707584;
    font-weight: 500;
}

.ms-pop-pill {
    background: #ffffff;
    color: #4A4D57;
    border: 1px solid #E8EAF0;
    padding: 3px 12px;
    border-radius: var(--ms-radius-full);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.15s ease;
}

.ms-pop-pill:hover {
    border-color: #6C5CE7;
    color: #6C5CE7;
    background: #EDE9FE;
}

/* Hero Right Visual Stage with Glassmorphism Badges */
.ms-hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.ms-hero-art-stage {
    position: relative;
    width: 100%;
    max-width: 580px;
    padding: 10px 10px;
}

.ms-hero-center-art {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    box-shadow: 0 16px 36px rgba(108, 92, 231, 0.12);
}

.ms-float-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(232, 234, 240, 0.9);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    z-index: 3;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.ms-float-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(108, 92, 231, 0.16);
    border-color: #6C5CE7;
}

.ms-float-top-left {
    top: 15px;
    left: -12px;
}

.ms-float-top-right {
    top: 55px;
    right: -12px;
}

.ms-float-bottom-left {
    bottom: 45px;
    left: -15px;
}

.ms-float-bottom-right {
    bottom: 12px;
    right: -10px;
}

.ms-float-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ms-float-text {
    display: flex;
    flex-direction: column;
}

.ms-float-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #20212A;
    line-height: 1.2;
}

.ms-float-sub {
    font-size: 11px;
    font-weight: 500;
    color: #707584;
    margin-top: 1px;
}

@media (max-width: 768px) {
    .ms-hero-art-stage {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 4px;
    }
    .ms-hero-art-stage .ms-hero-center-art {
        grid-column: 1 / -1;
        max-width: 100%;
        margin-bottom: 8px;
    }
    .ms-float-badge {
        position: static;
        width: 100%;
        margin: 0;
        padding: 8px 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
        border-radius: 10px;
    }
    .ms-float-top-left, .ms-float-top-right, .ms-float-bottom-left, .ms-float-bottom-right {
        position: static;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .ms-hero-art-stage {
        grid-template-columns: 1fr;
    }
    .ms-hero-art-stage .ms-float-top-right,
    .ms-hero-art-stage .ms-float-bottom-right {
        display: none;
    }
}

/* -------------------------------------------------------------------------- */
/* 6. VALUES PROPOSITION BAR                                                  */
/* -------------------------------------------------------------------------- */
.ms-values-bar-section {
    padding: 18px 0;
    border-bottom: 1px solid #E8EAF0;
    background: #ffffff;
}

.ms-values-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.ms-val-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #FAFAFD;
    border: 1px solid #ECEEF4;
}

.ms-val-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #EDE9FE;
    color: #6C5CE7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ms-val-text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #20212A;
    line-height: 1.25;
}

.ms-val-text span {
    display: block;
    font-size: 11.5px;
    color: #707584;
    margin-top: 2px;
}

/* -------------------------------------------------------------------------- */
/* 7. MIGRATION ANNOUNCEMENT CARD                                             */
/* -------------------------------------------------------------------------- */
.ms-migration-banner-section {
    padding: 24px 0 10px;
}

.ms-migration-card {
    background: #F6F4FF;
    border: 1px solid #E4E0FD;
    border-radius: 12px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ms-mig-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ms-mig-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #EDE9FE;
    color: #6C5CE7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ms-mig-title {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: #20212A;
}

.ms-mig-text {
    margin: 0;
    font-size: 13px;
    color: #4A4D57;
    line-height: 1.4;
}

.ms-mig-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* 8. SECTION HEADERS & TABS                                                  */
/* -------------------------------------------------------------------------- */
.ms-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.ms-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ms-section-title {
    font-size: 20px;
    font-weight: 800;
    color: #20212A;
    margin: 0;
}

.ms-header-svg {
    color: #6C5CE7;
}

.ms-flame-icon {
    font-size: 20px;
}

.ms-view-all-link {
    font-size: 13px;
    font-weight: 600;
    color: #6C5CE7;
    text-decoration: none;
}

.ms-view-all-link:hover {
    text-decoration: underline;
}

.ms-trending-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ms-pill-tabs {
    display: inline-flex;
    background: #F0F1F5;
    border-radius: var(--ms-radius-full);
    padding: 3px;
    gap: 4px;
}

.ms-pill-tab {
    padding: 5px 14px;
    border-radius: var(--ms-radius-full);
    font-size: 12.5px;
    font-weight: 600;
    color: #5B6171;
    text-decoration: none;
    transition: all 0.15s ease;
}

.ms-pill-tab.active,
.ms-pill-tab:hover {
    background-color: #6C5CE7;
    color: #ffffff;
}

/* -------------------------------------------------------------------------- */
/* 9. MANAGE YOUR JOURNEY PROMO CARD                                          */
/* -------------------------------------------------------------------------- */
.ms-journey-promo-section {
    padding: 30px 0;
}

.ms-journey-promo-card {
    position: relative;
    background: linear-gradient(135deg, #6C5CE7 0%, #5842E3 50%, #4B35D8 100%);
    border-radius: 18px;
    padding: 34px 44px;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 36px;
    align-items: center;
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(108, 92, 231, 0.22);
    overflow: hidden;
}

.ms-journey-mockup {
    position: relative;
    z-index: 2;
}

.ms-journey-mockup img {
    border-radius: 10px;
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25));
}

.ms-journey-content {
    position: relative;
    z-index: 2;
}

.ms-journey-title {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
    line-height: 1.25;
}

.ms-journey-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 18px;
    line-height: 1.5;
}

.ms-journey-checklist {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    margin: 0 0 24px;
    padding: 0;
}

.ms-journey-checklist li {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ms-check-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: var(--ms-radius-full);
    background: #ffffff;
    flex-shrink: 0;
}

.ms-journey-actions .ms-btn-white {
    background: #ffffff;
    color: #6C5CE7;
    font-weight: 700;
    font-size: 13.5px;
    padding: 11px 24px;
    border-radius: 999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
}

.ms-journey-actions .ms-btn-white:hover {
    background: #F3F0FF;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.ms-journey-watermark {
    position: absolute;
    right: -10px;
    bottom: -15px;
    width: 190px;
    opacity: 0.18;
    pointer-events: none;
    z-index: 1;
}

.ms-watermark-books {
    width: 100%;
    height: auto;
    display: block;
}

/* -------------------------------------------------------------------------- */
/* 10. BROWSE BY GENRE PILLS                                                  */
/* -------------------------------------------------------------------------- */
.ms-genre-browse-section {
    padding: 24px 0 28px;
}

.ms-genre-pills-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 10px;
}

@media (max-width: 1200px) {
    .ms-genre-pills-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 640px) {
    .ms-genre-pills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ms-genre-pill-item {
    background: #ffffff;
    border: 1px solid #E8EAF0;
    border-radius: 12px;
    padding: 14px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: #20212A;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.ms-genre-pill-item:hover {
    border-color: #6C5CE7;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.12);
}

.ms-genre-icon svg {
    width: 22px;
    height: 22px;
    color: #6C5CE7;
    display: block;
}

.ms-genre-label {
    font-size: 12px;
    font-weight: 600;
    color: #20212A;
    text-align: center;
}

/* -------------------------------------------------------------------------- */
/* 11. TWO-COLUMN: RECENTLY UPDATED & POPULAR COLLECTIONS                     */
/* -------------------------------------------------------------------------- */
.ms-two-col-section {
    padding: 24px 0;
}

.ms-two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ms-col-box {
    background: #ffffff;
    border: 1px solid #E8EAF0;
    border-radius: 14px;
    padding: 22px;
}

.ms-recent-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ms-recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #F0F2F6;
}

.ms-recent-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ms-recent-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.ms-recent-info {
    flex: 1;
}

.ms-recent-title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
}

.ms-recent-title a {
    color: #20212A;
    text-decoration: none;
}

.ms-recent-title a:hover {
    color: #6C5CE7;
}

.ms-recent-chapter {
    font-size: 12px;
    color: #707584;
}

.ms-recent-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.ms-recent-time {
    font-size: 11px;
    color: #8A90A2;
}

.ms-badge-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-ongoing {
    background: #DCFCE7;
    color: #16A36A;
}

.badge-completed {
    background: #EDE9FE;
    color: #6C5CE7;
}

/* Collections Cards */
.ms-collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ms-collection-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #E8EAF0;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ms-collection-card:hover {
    border-color: #6C5CE7;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.1);
}

.ms-collection-img-box {
    width: 100%;
    height: 82px;
    overflow: hidden;
    background: #F0F1F5;
}

.ms-collection-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-collection-body {
    padding: 10px;
    position: relative;
}

.ms-collection-body h4 {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 700;
    color: #20212A;
}

.ms-collection-body p {
    margin: 0;
    font-size: 11.5px;
    color: #707584;
}

.ms-circle-arrow {
    position: absolute;
    right: 10px;
    bottom: 10px;
    color: #A0A5B5;
    font-size: 13px;
    font-weight: 700;
}

/* -------------------------------------------------------------------------- */
/* 12. USEFUL TOOLS & BLOG CARDS                                              */
/* -------------------------------------------------------------------------- */
.ms-tools-section {
    padding: 24px 0;
}

.ms-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.ms-tool-card {
    background: #ffffff;
    border: 1px solid #E8EAF0;
    border-radius: 12px;
    padding: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.ms-tool-card:hover {
    border-color: #6C5CE7;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(108, 92, 231, 0.1);
}

.ms-tool-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.ms-tool-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #F4F1FE;
    color: #6C5CE7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-tool-arrow {
    color: #A0A5B5;
    font-size: 15px;
    font-weight: 700;
}

.ms-tool-content h3 {
    margin: 0 0 5px;
    font-size: 15px;
    font-weight: 700;
    color: #20212A;
}

.ms-tool-content p {
    margin: 0;
    font-size: 12px;
    color: #707584;
    line-height: 1.45;
}

/* Blog Cards */
.ms-blog-section {
    padding: 24px 0 44px;
}

.ms-blog-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ms-blog-card {
    background: #ffffff;
    border: 1px solid #E8EAF0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.ms-blog-card:hover {
    border-color: #6C5CE7;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.1);
}

.ms-blog-thumb {
    width: 100%;
    height: 165px;
    object-fit: cover;
    display: block;
}

.ms-blog-body {
    padding: 16px;
}

.ms-blog-meta-top {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #707584;
    margin-bottom: 8px;
}

.ms-blog-category {
    background: #EDE9FE;
    color: #6C5CE7;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
}

.ms-blog-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.ms-blog-title a {
    color: #20212A;
    text-decoration: none;
}

.ms-blog-title a:hover {
    color: #6C5CE7;
}

.ms-blog-card {
    background: #ffffff;
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

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

.ms-blog-thumb {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.ms-blog-body {
    padding: 20px;
}

.ms-blog-meta-top {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ms-text-muted);
    margin-bottom: 10px;
}

.ms-blog-category {
    color: var(--ms-primary);
    font-weight: 700;
}

.ms-blog-title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.ms-blog-title a {
    color: var(--ms-text-dark);
}

.ms-blog-title a:hover {
    color: var(--ms-primary);
}

.ms-blog-excerpt {
    margin: 0;
    font-size: 13.5px;
    color: var(--ms-text-muted);
    line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/* 13. FOOTER STYLING                                                         */
/* -------------------------------------------------------------------------- */
.ms-site-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--ms-border);
    padding: 50px 0 24px;
    margin-top: auto;
}

.ms-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.ms-footer-brand-col .ms-footer-desc {
    font-size: 13px;
    color: var(--ms-text-muted);
    margin: 16px 0 20px;
    line-height: 1.6;
    max-width: 290px;
}

.ms-footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ms-social-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--ms-radius-full);
    background: var(--ms-bg-body);
    border: 1px solid var(--ms-border);
    color: var(--ms-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.ms-social-icon:hover {
    background: var(--ms-primary-light);
    color: var(--ms-primary);
    border-color: var(--ms-primary);
}

.ms-footer-heading {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ms-text-dark);
}

.ms-footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ms-footer-links li a {
    font-size: 13.5px;
    color: var(--ms-text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ms-footer-links li a:hover {
    color: var(--ms-primary);
}

.ms-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--ms-border-light);
    font-size: 12.5px;
    color: var(--ms-text-muted);
    flex-wrap: wrap;
    gap: 10px;
}

/* -------------------------------------------------------------------------- */
/* 14. BREADCRUMBS & SHARED UTILITIES                                         */
/* -------------------------------------------------------------------------- */
.ms-breadcrumbs {
    padding: 16px 0 20px;
}

.ms-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    font-size: 13px;
    color: var(--ms-text-muted);
    gap: 8px;
}

.ms-breadcrumb-item a {
    color: var(--ms-text-muted);
    text-decoration: none;
}

.ms-breadcrumb-item a:hover {
    color: var(--ms-primary);
}

.ms-breadcrumb-separator {
    color: var(--ms-text-light);
}

.ms-breadcrumb-item.active {
    color: var(--ms-text-dark);
    font-weight: 600;
}

.ms-badge-status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--ms-radius-full);
    display: inline-block;
}

.status-ongoing {
    background-color: var(--ms-success-bg);
    color: var(--ms-success);
}

.status-completed {
    background-color: #EDE9FE;
    color: #6C5CE7;
}

.status-hiatus {
    background-color: #FEF3C7;
    color: #D97706;
}

/* -------------------------------------------------------------------------- */
/* 15. RESPONSIVE BREAKPOINTS                                                 */
/* -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .ms-hero-container {
        grid-template-columns: 1fr;
    }
    .ms-hero-left {
        order: 1;
    }
    .ms-hero-right {
        order: 2;
        max-width: 520px;
        margin: 24px auto 0;
    }
    .ms-values-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ms-two-col-grid {
        grid-template-columns: 1fr;
    }
    .ms-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ms-blog-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ms-footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ms-main-navigation {
        display: none;
    }
    .ms-hamburger-btn {
        display: block;
    }
    .ms-hero-title {
        font-size: 32px;
    }
    .ms-values-grid {
        grid-template-columns: 1fr;
    }
    .ms-migration-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .ms-journey-promo-card {
        grid-template-columns: 1fr;
        padding: 24px;
    }
    .ms-blog-cards-grid {
        grid-template-columns: 1fr;
    }
    .ms-tools-grid {
        grid-template-columns: 1fr;
    }
    .ms-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ms-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ms-hero-title {
        font-size: 26px;
        line-height: 1.25;
    }
    .ms-hero-subtitle {
        font-size: 14px;
    }
    .ms-hero-searchform {
        padding: 4px 6px 4px 14px;
    }
    .ms-hero-search-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    .ms-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .ms-values-grid {
        gap: 10px;
    }
    .ms-migration-card {
        padding: 16px;
    }
    .ms-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 360px) {
    .ms-hero-title {
        font-size: 22px;
    }
    .ms-container {
        padding-left: 12px;
        padding-right: 12px;
    }
    .ms-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ==========================================================================
   ROOT-LEVEL TYPOGRAPHY & ELEMENT SPACING SYSTEM
   Guarantees vertical rhythm, no text collapsing, consistent gaps site-wide
   ========================================================================== */

p {
    margin-top: 0;
    margin-bottom: 1.35rem;
    line-height: 1.75;
    color: #374151;
    font-size: 15px;
}

p:last-child {
    margin-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: #111827;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
}

h1:first-child, h2:first-child, h3:first-child, h4:first-child {
    margin-top: 0;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

ul, ol {
    margin-top: 0;
    margin-bottom: 1.35rem;
    padding-left: 1.5rem;
    line-height: 1.75;
    color: #374151;
}

li {
    margin-bottom: 0.5rem;
}

li:last-child {
    margin-bottom: 0;
}

.entry-content,
.ms-blog-prose-body,
.ms-page-prose,
.ms-legal-content,
.ms-guide-prose {
    font-size: 15.5px;
    line-height: 1.8;
    color: #374151;
}

.entry-content p,
.ms-blog-prose-body p,
.ms-page-prose p,
.ms-legal-content p,
.ms-guide-prose p {
    margin-bottom: 1.4rem;
    line-height: 1.8;
}

.entry-content h2,
.ms-blog-prose-body h2,
.ms-page-prose h2,
.ms-legal-content h2,
.ms-guide-prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #F1F3F7;
}

.entry-content h3,
.ms-blog-prose-body h3,
.ms-page-prose h3,
.ms-legal-content h3,
.ms-guide-prose h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F2937;
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
}

.entry-content ul,
.entry-content ol,
.ms-blog-prose-body ul,
.ms-blog-prose-body ol,
.ms-legal-content ul,
.ms-legal-content ol {
    margin-bottom: 1.4rem;
    padding-left: 1.5rem;
}

.entry-content li,
.ms-blog-prose-body li,
.ms-legal-content li {
    margin-bottom: 0.6rem;
    line-height: 1.75;
}

.ms-callout-box,
.ms-alert-box {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    background: #F8F9FD;
    border-left: 4px solid #6C5CE7;
    line-height: 1.7;
    color: #374151;
}

.ms-callout-box strong {
    color: #111827;
}

.ms-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.75rem 0;
    border-radius: 10px;
    border: 1px solid #E8EAF0;
}

.ms-table-responsive table,
table.ms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.6;
    background: #FFFFFF;
}

.ms-table-responsive th,
table.ms-table th {
    background: #F8F9FD;
    color: #1F2937;
    font-weight: 700;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid #E8EAF0;
}

.ms-table-responsive td,
table.ms-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #F1F3F7;
    color: #4B5563;
    vertical-align: middle;
}

.ms-table-responsive tr:last-child td,
table.ms-table tr:last-child td {
    border-bottom: none;
}

.ms-table-responsive tr:hover td,
table.ms-table tr:hover td {
    background: #FDFDFE;
}
