/* =========================================================
   FLUENTPATH — MODERN PREMIUM UI
   Visual-only stylesheet
   No PHP / JS / database changes
   ========================================================= */

:root {
    --bg: #f7f8fc;
    --surface: #ffffff;
    --surface-soft: #f8f9fd;

    --text: #111827;
    --text-soft: #344054;
    --muted: #667085;
    --muted-light: #98a2b3;

    --primary: #5146e5;
    --primary-dark: #3730a3;
    --primary-light: #eeedff;

    --green: #0f9f82;
    --green-light: #e9faf5;

    --red: #e5484d;

    --border: #e7e9f0;
    --border-dark: #d9dde8;

    --shadow-xs: 0 1px 3px rgba(16, 24, 40, .04);
    --shadow-sm: 0 5px 18px rgba(16, 24, 40, .055);
    --shadow-md: 0 14px 35px rgba(16, 24, 40, .075);
    --shadow-lg: 0 25px 70px rgba(16, 24, 40, .11);

    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-xl: 26px;

    --font:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at 80% -10%,
            rgba(81, 70, 229, .055),
            transparent 30%
        ),
        var(--bg);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: #deddff;
    color: #27236d;
}

:focus-visible {
    outline: 3px solid rgba(81, 70, 229, .18);
    outline-offset: 3px;
}

/* =========================================================
   GLOBAL CONTAINER
   ========================================================= */

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-bottom: 1px solid rgba(231, 233, 240, .82);

    box-shadow:
        0 1px 0 rgba(255, 255, 255, .8),
        0 5px 20px rgba(16, 24, 40, .025);
}

.nav-wrap {
    width: min(1180px, calc(100% - 40px));
    min-height: 72px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    gap: 28px;
}

/* Brand */

.brand {
    position: relative;

    font-size: 1.38rem;
    font-weight: 850;
    letter-spacing: -.055em;

    color: #111827;

    white-space: nowrap;
}

.brand span {
    background: linear-gradient(
        135deg,
        #6258ef,
        #4338ca
    );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Header buttons */

.header-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.header-account,
.header-auth-button {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 14px;

    border-radius: 11px;

    font-size: 13px;
    font-weight: 750;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease,
        border-color .18s ease;
}

.header-account {
    background: #f4f5f9;
    border: 1px solid transparent;
    color: var(--text);
}

.header-auth-button {
    background: rgba(255,255,255,.9);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
}

.header-register-button {
    color: white;

    background:
        linear-gradient(
            135deg,
            #6258ef,
            #4338ca
        );

    border-color: #5146e5;

    box-shadow:
        0 7px 18px rgba(81, 70, 229, .18);
}

.header-auth-button:hover,
.header-account:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.header-register-button:hover {
    background:
        linear-gradient(
            135deg,
            #554be7,
            #312e81
        );

    box-shadow:
        0 11px 25px rgba(81, 70, 229, .25);
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.main-nav {
    display: flex;
    align-items: center;
    gap: 3px;

    flex: 1;

    margin: 0;
    padding: 0;

    list-style: none;
}

.main-nav > li {
    position: relative;
}

.main-nav > li > a,
.main-nav > li > button {
    display: flex;
    align-items: center;
    gap: 5px;

    padding: 8px 11px;

    border: 0;
    border-radius: 10px;

    background: transparent;

    color: #596273;

    font-size: .84rem;
    font-weight: 650;

    cursor: pointer;

    transition:
        background .16s ease,
        color .16s ease;
}

.main-nav > li > a:hover,
.main-nav > li > button:hover,
.main-nav > li.open > button {
    background: #f0efff;
    color: var(--primary);
}

/* Dropdown */

.dropdown-panel {
    display: none;

    position: absolute;

    top: calc(100% + 10px);
    left: 0;

    width: 245px;

    padding: 7px;

    background: rgba(255,255,255,.97);

    border: 1px solid var(--border);
    border-radius: 15px;

    box-shadow: var(--shadow-lg);

    backdrop-filter: blur(20px);
}

.main-nav > li.open .dropdown-panel {
    display: block;
}

.dropdown-panel a {
    display: block;

    padding: 10px 12px;

    border-radius: 9px;

    color: var(--text-soft);

    font-size: .83rem;

    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease;
}

.dropdown-panel a:hover {
    background: #f4f3ff;
    color: var(--primary);
    transform: translateX(2px);
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;

    overflow: hidden;

    padding: 92px 0 78px;

    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(81,70,229,.12),
            transparent 28%
        ),
        radial-gradient(
            circle at 10% 80%,
            rgba(15,159,130,.055),
            transparent 25%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fafaff 70%,
            #f7f8fc 100%
        );

    border-bottom: 1px solid #eceef4;
}

.hero-inner {
    display: grid;

    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(330px, .85fr);

    gap: 70px;

    align-items: center;
}

/* Decorative glow */

.hero::after {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    right: -220px;
    top: -210px;

    border-radius: 50%;

    background: rgba(81,70,229,.08);

    filter: blur(5px);

    pointer-events: none;
}

/* Kicker */

.hero-kicker {
    display: inline-flex;
    align-items: center;

    padding: 7px 12px;

    border: 1px solid #dfddff;
    border-radius: 999px;

    background: rgba(238,237,255,.75);

    color: var(--primary);

    font-size: .69rem;
    font-weight: 850;

    letter-spacing: .1em;
    text-transform: uppercase;
}

/* Heading */

.hero h1 {
    max-width: 780px;

    margin: 17px 0 19px;

    color: #0d1324;

    font-size:
        clamp(
            2.65rem,
            5.3vw,
            4.7rem
        );

    line-height: 1.015;

    letter-spacing: -.067em;
}

.hero p {
    max-width: 660px;

    margin: 0;

    color: #667085;

    font-size: 1.05rem;

    line-height: 1.78;
}

/* Hero actions */

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 29px;
}

/* Hero learning card */

.hero-panel {
    position: relative;

    padding: 30px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.97),
            rgba(248,249,255,.95)
        );

    border: 1px solid rgba(220,224,237,.95);

    border-radius: var(--radius-xl);

    box-shadow: var(--shadow-lg);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.hero-panel::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -80px;
    top: -80px;

    border-radius: 50%;

    background: rgba(81,70,229,.08);
}

.hero-panel:hover {
    transform: translateY(-5px);

    box-shadow:
        0 32px 80px rgba(16,24,40,.14);
}

.hero-panel .eyebrow {
    position: relative;

    color: var(--primary);

    font-size: .68rem;
    font-weight: 850;

    letter-spacing: .1em;
    text-transform: uppercase;
}

.hero-panel .word {
    position: relative;

    margin: 10px 0 3px;

    color: #111827;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 2.5rem;

    line-height: 1.15;

    letter-spacing: -.035em;
}

.hero-panel .meaning {
    color: var(--muted);
}

.hero-panel .kn {
    margin-top: 8px;

    color: var(--green);

    font-weight: 750;
}

.hero-stat {
    position: relative;

    display: flex;
    justify-content: space-between;

    margin-top: 23px;
    padding-top: 17px;

    border-top: 1px solid var(--border);

    color: var(--muted);

    font-size: .8rem;
}

.hero-stat strong {
    color: var(--text);
}

/* =========================================================
   SECTION
   ========================================================= */

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;

    gap: 20px;

    margin-bottom: 25px;
}

.section-heading h2 {
    margin: 0;

    font-size: 1.55rem;

    letter-spacing: -.045em;
}

.section-heading p {
    margin: 0;

    color: var(--muted);

    font-size: .87rem;
}

/* =========================================================
   CATEGORY CARDS
   ========================================================= */

.category-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0,1fr));

    gap: 17px;

    width: min(1180px,calc(100% - 40px));

    margin: 0 auto;

    padding: 35px 0 90px;
}

.category-card {
    position: relative;

    min-height: 175px;

    padding: 23px;

    overflow: hidden;

    background:
        linear-gradient(
            150deg,
            #ffffff 0%,
            #fafbff 100%
        );

    border: 1px solid var(--border);

    border-radius: 18px;

    box-shadow: var(--shadow-xs);

    transition:
        transform .23s ease,
        border-color .23s ease,
        box-shadow .23s ease;
}

.category-card::after {
    content: "";

    position: absolute;

    width: 120px;
    height: 120px;

    right: -65px;
    bottom: -65px;

    border-radius: 50%;

    background: rgba(81,70,229,.055);

    transition: transform .25s ease;
}

.category-card:hover {
    transform: translateY(-6px);

    border-color: #d4d1ff;

    box-shadow:
        0 18px 40px rgba(16,24,40,.09);
}

.category-card:hover::after {
    transform: scale(1.3);
}

.category-card h3 {
    position: relative;
    z-index: 1;

    margin: 0 0 8px;

    font-size: 1rem;

    letter-spacing: -.02em;
}

.category-card p {
    position: relative;
    z-index: 1;

    margin: 0;

    color: var(--muted);

    font-size: .83rem;

    line-height: 1.65;
}

.category-card .count {
    position: relative;
    z-index: 1;

    display: inline-flex;

    margin-top: 17px;
    padding: 5px 9px;

    background: #f0efff;

    border: 1px solid #e0ddff;

    border-radius: 999px;

    color: var(--primary);

    font-size: .68rem;
    font-weight: 850;
}

/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-header {
    padding: 57px 0 35px;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fafbff
        );

    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    margin: 0 0 9px;

    font-size: 2.25rem;

    line-height: 1.08;

    letter-spacing: -.06em;
}

.page-header p {
    max-width: 760px;

    margin: 0;

    color: var(--muted);

    font-size: .92rem;
}

/* =========================================================
   CONTENT
   ========================================================= */

.content-section {
    padding: 32px 0 90px;
}

/* =========================================================
   TOOLBAR
   ========================================================= */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;

    margin-bottom: 23px;
    padding: 11px;

    background: rgba(255,255,255,.82);

    border: 1px solid var(--border);

    border-radius: 15px;

    box-shadow: var(--shadow-xs);

    backdrop-filter: blur(12px);
}

.toolbar input,
.toolbar select {
    min-height: 44px;

    padding: 9px 12px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: #fff;

    color: var(--text);

    outline: none;

    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.toolbar input[type="text"] {
    flex: 1;
    min-width: 220px;
}

.toolbar input:focus,
.toolbar select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #aaa5ff;

    box-shadow:
        0 0 0 4px rgba(81,70,229,.08);
}

/* =========================================================
   LEARNING CARDS
   ========================================================= */

.word-card,
.ref-card {
    position: relative;

    padding: 23px;

    margin-bottom: 15px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #fcfdff
        );

    border: 1px solid var(--border);

    border-radius: 18px;

    box-shadow: var(--shadow-xs);

    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.word-card:hover,
.ref-card:hover {
    transform: translateY(-2px);

    border-color: #daddf0;

    box-shadow:
        0 12px 30px rgba(16,24,40,.07);
}

.word-card .word-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 15px;
    padding-bottom: 15px;

    border-bottom: 1px solid var(--border);
}

.word-card .word-num {
    color: var(--primary);

    font-size: .69rem;
    font-weight: 850;
}

.word-card .word-text {
    color: #111827;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.72rem;

    letter-spacing: -.025em;
}

.word-card .pos-tag {
    padding: 4px 9px;

    background: #f0efff;

    border: 1px solid #dfdcff;

    border-radius: 999px;

    color: var(--primary);

    font-size: .67rem;
    font-weight: 850;
}

.word-card .meaning-en {
    font-size: .95rem;
}

.word-card .meaning-kn {
    margin-top: 4px;

    color: var(--green);

    font-weight: 750;
}

.section-label {
    margin: 18px 0 7px;

    color: var(--muted-light);

    font-size: .65rem;
    font-weight: 850;

    letter-spacing: .11em;
    text-transform: uppercase;
}

.word-card ol.examples {
    margin: 0;
    padding-left: 21px;
}

.word-card ol.examples li {
    margin-bottom: 6px;
}

.word-card .synonyms {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.word-card .synonyms span {
    padding: 5px 10px;

    background: #f6f7fa;

    border: 1px solid var(--border);

    border-radius: 999px;

    font-size: .76rem;
}

.ref-card h3 {
    margin: 0 0 9px;

    font-size: 1.1rem;

    letter-spacing: -.025em;
}

.ref-card .structure {
    display: inline-block;

    margin-bottom: 9px;
    padding: 6px 10px;

    background: #f7f7fb;

    border: 1px solid var(--border);

    border-radius: 8px;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;

    font-size: .78rem;
}

.ref-card ul.examples {
    margin: 8px 0 0;
    padding-left: 20px;
}

.ref-card ul.examples li {
    margin-bottom: 6px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    min-height: 43px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 9px 16px;

    border: 1px solid #5146e5;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #6258ef,
            #4338ca
        );

    color: #fff;

    font-size: .84rem;
    font-weight: 780;

    cursor: pointer;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.btn:hover {
    transform: translateY(-1px);

    background:
        linear-gradient(
            135deg,
            #554be7,
            #312e81
        );

    box-shadow:
        0 10px 23px rgba(81,70,229,.21);
}

.btn-outline {
    background: #fff;

    border-color: var(--border);

    color: var(--text);

    box-shadow: none;
}

.btn-outline:hover {
    background: #f7f8fb;

    border-color: var(--border-dark);

    color: var(--text);

    box-shadow: var(--shadow-xs);
}

.btn-danger {
    background:
        linear-gradient(
            135deg,
            #e34b43,
            #c92f28
        );

    border-color: #d92d20;
}

.btn-danger:hover {
    background:
        linear-gradient(
            135deg,
            #cf3d36,
            #a92721
        );
}

.btn-sm {
    min-height: 34px;

    padding: 6px 10px;

    border-radius: 9px;

    font-size: .74rem;
}

/* =========================================================
   PAGINATION
   ========================================================= */

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;

    margin-top: 30px;
}

.pagination a,
.pagination span {
    min-width: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 11px;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: 9px;

    font-size: .77rem;

    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease;
}

.pagination a:hover {
    background: #f5f6fa;

    border-color: var(--border-dark);

    transform: translateY(-1px);
}

.pagination .current {
    background: var(--primary);

    border-color: var(--primary);

    color: #fff;

    box-shadow:
        0 6px 15px rgba(81,70,229,.18);
}

/* =========================================================
   HEART / LEARNING ACTION
   ========================================================= */

.learning-heart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    margin-left: auto;
    margin-top: 17px;

    padding: 8px 11px;

    border: 1px solid transparent;
    border-radius: 10px;

    background: transparent;

    color: var(--muted);

    cursor: pointer;

    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.learning-heart:hover {
    background: #fff2f3;

    border-color: #ffd9db;

    transform: translateY(-1px);
}

.learning-heart .heart-icon {
    color: #98a2b3;

    font-size: 24px;

    line-height: 1;

    transition:
        color .18s ease,
        transform .18s ease;
}

.learning-heart.liked .heart-icon {
    color: var(--red);
}

.learning-heart.pop .heart-icon {
    animation: heartPop .35s ease;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.35);
    }

    100% {
        transform: scale(1);
    }
}

/* =========================================================
   ALERTS
   ========================================================= */

.alert {
    padding: 12px 14px;

    margin-bottom: 16px;

    border-radius: 11px;

    font-size: .82rem;
}

.alert-success {
    color: #17663f;

    background: #ecfdf3;

    border: 1px solid #b7ebcb;
}

.alert-error {
    color: #9b2727;

    background: #fff1f0;

    border: 1px solid #f4c7c3;
}

.empty-state {
    padding: 50px 20px;

    text-align: center;

    background: #fff;

    border: 1px dashed #cfd6e2;

    border-radius: 18px;

    color: var(--muted);
}

/* =========================================================
   ACCOUNT / PROGRESS
   ========================================================= */

.account-page {
    padding: 50px 0 85px;
}

.account-header {
    margin-bottom: 29px;
}

.account-header h1 {
    margin: 8px 0;

    font-size: 2.2rem;

    line-height: 1.12;

    letter-spacing: -.055em;
}

.account-header p {
    margin: 0;

    color: var(--muted);

    font-size: .88rem;
}

.account-card {
    padding: 22px;

    margin-bottom: 17px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #fcfdff
        );

    border: 1px solid var(--border);

    border-radius: 18px;

    box-shadow: var(--shadow-xs);
}

.account-card h2 {
    margin: 0 0 15px;

    font-size: 1.1rem;

    letter-spacing: -.025em;
}

.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 12px;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.account-info div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.account-info span {
    color: var(--muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.account-info strong {
    font-size: 14px;
}

.overall-percentage {
    font-size: 23px;
    font-weight: 850;

    letter-spacing: -.045em;
}

.overall-count {
    margin-top: 9px;

    color: var(--muted);

    font-size: .8rem;
}

.progress-bar {
    height: 9px;

    overflow: hidden;

    background: #edf0f5;

    border-radius: 999px;
}

.progress-fill {
    height: 100%;

    background:
        linear-gradient(
            90deg,
            #5146e5,
            #8178f4
        );

    border-radius: inherit;

    transition: width .35s ease;
}

.progress-bar.small {
    height: 7px;
}

.progress-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.progress-item {
    padding: 14px 15px;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: 13px;
}

.progress-item-link {
    display: block;

    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
}

.progress-item-link:hover {
    transform: translateY(-1px);

    border-color: #d2cffc;

    box-shadow: var(--shadow-sm);
}

.progress-item-top {
    display: flex;
    justify-content: space-between;

    gap: 12px;
}

.progress-item-count,
.remaining-text {
    color: var(--muted);

    font-size: .76rem;
}

.reset-progress-card {
    background: #fffafa;

    border-color: #f1d0ce;
}

.reset-progress-button {
    color: #b42318;

    background: #fff;

    border: 1px solid #f2c2c2;
}

/* =========================================================
   LOGIN
   ========================================================= */

.login-page {
    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 28px;

    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(81,70,229,.13),
            transparent 27%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(15,159,130,.08),
            transparent 25%
        ),
        #f7f8fc;
}

.login-box {
    width: min(430px,100%);

    padding: 34px;

    background: rgba(255,255,255,.94);

    border: 1px solid rgba(228,231,236,.95);

    border-radius: 23px;

    box-shadow: var(--shadow-lg);

    backdrop-filter: blur(20px);
}

.login-brand {
    margin-bottom: 5px;

    font-size: 1.55rem;
    font-weight: 850;

    letter-spacing: -.045em;
}

.login-brand span {
    color: var(--primary);
}

.login-box .sub {
    margin: 0 0 23px;

    color: var(--muted);

    font-size: .85rem;
}

.login-box .btn {
    width: 100%;
}

.login-note {
    margin: 14px 0 0;

    color: var(--muted-light);

    font-size: .73rem;
}

/* =========================================================
   AUTH MODAL
   ========================================================= */

.auth-modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 99999;
}

.auth-modal.active {
    display: flex;

    align-items: center;
    justify-content: center;
}

.auth-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(9,13,28,.67);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.auth-modal-box {
    position: relative;
    z-index: 2;

    width: calc(100% - 32px);
    max-width: 430px;

    max-height: calc(100vh - 32px);

    overflow-y: auto;

    padding: 31px;

    background: rgba(255,255,255,.98);

    border: 1px solid rgba(255,255,255,.8);

    border-radius: 22px;

    box-shadow:
        0 35px 100px rgba(0,0,0,.25);
}

.auth-modal-box h2 {
    margin: 0 0 8px;

    letter-spacing: -.035em;
}

.auth-subtitle {
    margin: 0 0 23px;

    color: var(--muted);

    font-size: 14px;
}

.auth-modal-close {
    position: absolute;

    top: 12px;
    right: 14px;

    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border: 0;
    border-radius: 9px;

    background: transparent;

    color: var(--muted);

    font-size: 25px;

    cursor: pointer;
}

.auth-modal-close:hover {
    background: #f4f5f8;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;

    margin-bottom: 6px;

    font-size: 13px;
    font-weight: 750;
}

.auth-field input {
    width: 100%;

    padding: 12px 14px;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: 11px;

    color: var(--text);

    outline: none;

    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.auth-field input:focus {
    border-color: #aaa5ff;

    box-shadow:
        0 0 0 4px rgba(81,70,229,.08);
}

.auth-submit {
    width: 100%;

    padding: 13px;

    border: 1px solid #5146e5;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #6258ef,
            #4338ca
        );

    color: #fff;

    font-size: 15px;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 9px 22px rgba(81,70,229,.18);
}

.auth-submit:hover {
    background:
        linear-gradient(
            135deg,
            #554be7,
            #312e81
        );
}

.auth-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.auth-message {
    display: none;

    margin-bottom: 15px;
    padding: 10px;

    border-radius: 9px;

    font-size: 14px;
}

.auth-message.show {
    display: block;
}

/* =========================================================
   ADMIN
   ========================================================= */

.admin-shell {
    min-height: 100vh;

    display: flex;

    background: #f4f6fa;
}

.admin-sidebar {
    position: sticky;
    top: 0;

    width: 258px;
    height: 100vh;

    flex: 0 0 258px;

    padding: 23px 14px;

    overflow-y: auto;

    color: #d1d5db;

    background:
        linear-gradient(
            180deg,
            #111827,
            #0b1220
        );

    box-shadow:
        12px 0 35px rgba(16,24,40,.08);
}

.admin-sidebar .brand {
    display: block;

    padding: 5px 10px 22px;

    color: #fff;

    font-size: 1.25rem;
}

.admin-sidebar .brand span {
    color: #8c84ff;
}

.admin-sidebar .nav-label {
    padding: 15px 10px 7px;

    color: #7d8798;

    font-size: .63rem;
    font-weight: 850;

    letter-spacing: .11em;

    text-transform: uppercase;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 10px 11px;

    margin: 2px 0;

    border-radius: 10px;

    color: #cbd5e1;

    font-size: .81rem;

    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease;
}

.admin-sidebar a:hover {
    background: #182234;

    color: #fff;

    transform: translateX(2px);
}

.admin-sidebar a.active {
    background:
        linear-gradient(
            90deg,
            #202b52,
            #172036
        );

    color: #fff;

    box-shadow:
        inset 3px 0 0 #8178f4;
}

.admin-main {
    flex: 1;

    min-width: 0;

    padding: 36px;
}

.admin-main > h1 {
    margin: 0;

    font-size: 1.95rem;

    letter-spacing: -.055em;
}

.admin-main > p {
    color: var(--muted);
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 16px;

    margin-bottom: 25px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-card {
    padding: 21px;

    margin-bottom: 20px;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: 17px;

    box-shadow: var(--shadow-xs);
}

.admin-table-wrap {
    overflow: auto;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: 17px;

    box-shadow: var(--shadow-xs);
}

.admin-table {
    width: 100%;

    min-width: 650px;

    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 13px 15px;

    border-bottom: 1px solid var(--border);

    text-align: left;

    font-size: .81rem;

    vertical-align: top;
}

.admin-table th {
    background: #f8f9fc;

    color: #475467;

    font-size: .68rem;
    font-weight: 800;

    letter-spacing: .06em;

    text-transform: uppercase;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table a {
    color: var(--primary);

    font-weight: 750;
}

.admin-table .danger-link {
    color: var(--red);
}

/* Admin forms */

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;

    margin-bottom: 6px;

    color: #344054;

    font-size: .75rem;
    font-weight: 800;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    padding: 10px 12px;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: 11px;

    color: var(--text);

    outline: none;

    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.form-group textarea {
    min-height: 100px;

    resize: vertical;
}

.form-row {
    display: flex;
    flex-wrap: wrap;

    gap: 14px;
}

.form-row .form-group {
    flex: 1;

    min-width: 190px;
}

/* Admin stats */

.admin-stats {
    display: grid;

    grid-template-columns:
        repeat(5,minmax(0,1fr));

    gap: 14px;

    margin: 20px 0 28px;
}

.stat-card {
    padding: 18px;

    background:
        linear-gradient(
            145deg,
            #fff,
            #fafbff
        );

    border: 1px solid var(--border);

    border-radius: 15px;

    box-shadow: var(--shadow-xs);
}

.stat-card .value {
    font-size: 1.75rem;
    font-weight: 850;

    letter-spacing: -.05em;
}

.stat-card .label {
    margin-top: 3px;

    color: var(--muted);

    font-size: .75rem;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 31px 18px;

    background:
        linear-gradient(
            180deg,
            #111827,
            #0b1220
        );

    border-top: 1px solid #202938;

    color: #aeb8c8;

    text-align: center;

    font-size: .78rem;
}

.site-footer a {
    color: #fff;

    font-weight: 700;
}

.site-footer a:hover {
    color: #a5b4fc;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 1050px) {

    .category-grid {
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }

    .hero-inner {
        grid-template-columns: 1fr;

        gap: 43px;
    }

    .hero-panel {
        max-width: 760px;
    }

    .admin-stats {
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 820px) {

    .nav-wrap {
        width: calc(100% - 24px);

        min-height: 62px;

        padding: 8px 0;

        flex-wrap: wrap;
    }

    .header-auth {
        margin-left: auto;
    }

    .nav-toggle {
        display: flex !important;

        align-items: center;
        justify-content: center;

        width: 42px;
        height: 40px;

        margin-left: 8px;

        padding: 8px 10px;

        border: 1px solid var(--border);
        border-radius: 10px;

        background: #fff;

        cursor: pointer;
    }

    .nav-toggle span {
        display: block;

        width: 20px;
        height: 2px;

        margin: 3px 0;

        background: var(--text);

        border-radius: 999px;
    }

    .site-header .main-nav {
        display: none !important;

        width: 100%;

        flex: 0 0 100%;

        order: 10;

        flex-direction: column;
        align-items: stretch;

        padding: 8px 0 12px;
    }

    .site-header .main-nav.mobile-open {
        display: flex !important;
    }

    .main-nav > li {
        width: 100%;
    }

    .main-nav > li > button {
        width: 100%;

        justify-content: space-between;

        padding: 13px 10px;

        text-align: left;
    }

    .dropdown-panel {
        position: static !important;

        width: 100%;

        padding: 4px 8px;

        border: 0;

        box-shadow: none;

        background: #f7f8fb;
    }

    .main-nav > li.open .dropdown-panel {
        display: block;
    }

    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        position: sticky;

        width: 100%;
        height: auto;

        padding: 10px;

        z-index: 80;

        display: flex;

        flex-wrap: wrap;

        gap: 4px;
    }

    .admin-sidebar .brand,
    .admin-sidebar .nav-label,
    .admin-sidebar hr {
        display: none;
    }

    .admin-sidebar a {
        padding: 8px 10px;
    }

    .admin-main {
        padding: 22px 16px;
    }
}

@media (max-width: 600px) {

    .container,
    .category-grid {
        width: calc(100% - 24px);
    }

    .nav-wrap {
        width: calc(100% - 24px);
    }

    .header-auth {
        gap: 5px;
    }

    .header-account,
    .header-auth-button {
        min-height: 35px;

        padding: 0 9px;

        font-size: 11.5px;
    }

    .hero {
        padding: 58px 0 42px;
    }

    .hero h1 {
        font-size: 2.35rem;
    }

    .hero p {
        font-size: .97rem;
    }

    .hero-panel {
        padding: 22px;

        border-radius: 20px;
    }

    .hero-panel .word {
        font-size: 2rem;
    }

    .category-grid {
        grid-template-columns: 1fr;

        gap: 12px;

        padding: 25px 0 65px;
    }

    .category-card {
        min-height: auto;

        padding: 19px;
    }

    .page-header {
        padding: 40px 0 26px;
    }

    .page-header h1 {
        font-size: 1.85rem;
    }

    .content-section {
        padding: 23px 0 62px;
    }

    .toolbar {
        padding: 9px;
    }

    .toolbar input[type="text"] {
        min-width: 100%;
    }

    .word-card,
    .ref-card {
        padding: 19px;

        border-radius: 15px;
    }

    .word-card .word-text {
        font-size: 1.55rem;
    }

    .section-heading {
        flex-direction: column;

        align-items: flex-start;

        gap: 5px;
    }

    .account-page {
        padding: 38px 0 60px;
    }

    .account-header h1 {
        font-size: 1.9rem;
    }

    .account-card {
        padding: 19px;
    }

    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }

    .admin-topbar {
        flex-direction: column;

        align-items: flex-start;
    }

    .form-row .form-group {
        min-width: 100%;
    }

    .auth-modal-box {
        width: calc(100% - 24px);

        padding: 24px;

        border-radius: 18px;
    }
}

/* =========================================================
   PREMIUM WORDS / VOCABULARY EXPERIENCE
   Visual-only enhancement
   ========================================================= */

/* Words page background */
body {
    background:
        radial-gradient(circle at 8% 8%, rgba(79, 70, 229, 0.045), transparent 28%),
        radial-gradient(circle at 92% 35%, rgba(20, 184, 166, 0.035), transparent 26%),
        #f7f8fc;
}


/* ---------------------------------------------------------
   WORDS PAGE HEADER
   --------------------------------------------------------- */

.page-header {
    position: relative;
    overflow: hidden;
    padding: 72px 0 64px;
    background:
        linear-gradient(
            135deg,
            #f8f9ff 0%,
            #ffffff 48%,
            #f2fbfa 100%
        );
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.page-header::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -160px;
    top: -220px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.055);
    pointer-events: none;
}

.page-header::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    left: -140px;
    bottom: -170px;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.045);
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    max-width: 760px;
    margin: 0 auto 15px;
    text-align: center;
    font-size: clamp(2.4rem, 5vw, 4.25rem);
    line-height: 1.03;
    letter-spacing: -0.055em;
    font-weight: 850;
    color: #101828;
}

.page-header p {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #667085;
}


/* ---------------------------------------------------------
   SEARCH AREA
   --------------------------------------------------------- */

.content-section {
    padding-top: 38px;
    padding-bottom: 80px;
}

.toolbar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 150px auto;
    gap: 12px;
    max-width: 920px;
    margin: 0 auto 34px;
    padding: 12px;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 18px;
    box-shadow:
        0 12px 35px rgba(15,23,42,0.06),
        0 2px 7px rgba(15,23,42,0.03);
    backdrop-filter: blur(14px);
}

.toolbar input,
.toolbar select {
    min-height: 50px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #ffffff;
    color: #101828;
    padding: 0 15px;
    font-size: 0.95rem;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.toolbar input::placeholder {
    color: #98a2b3;
}

.toolbar input:focus,
.toolbar select:focus {
    border-color: rgba(79,70,229,0.55);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.09);
}

.toolbar .btn {
    min-height: 50px;
    border-radius: 12px;
}


/* ---------------------------------------------------------
   WORD CARD
   --------------------------------------------------------- */

.word-card {
    position: relative;
    max-width: 920px;
    margin: 0 auto 22px;
    padding: 28px 30px 27px;
    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #ffffff 72%,
            #fbfcff 100%
        );
    border: 1px solid rgba(15,23,42,0.075);
    border-radius: 22px;
    box-shadow:
        0 10px 28px rgba(15,23,42,0.055),
        0 2px 6px rgba(15,23,42,0.025);
    overflow: hidden;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.word-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        #4f46e5,
        #6366f1 45%,
        #14b8a6
    );
    opacity: 0.8;
}

.word-card::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -95px;
    bottom: -105px;
    border-radius: 50%;
    background: rgba(79,70,229,0.035);
    pointer-events: none;
}

.word-card:hover {
    transform: translateY(-3px);
    border-color: rgba(79,70,229,0.16);
    box-shadow:
        0 18px 42px rgba(15,23,42,0.085),
        0 4px 10px rgba(15,23,42,0.035);
}


/* ---------------------------------------------------------
   WORD TITLE
   --------------------------------------------------------- */

.word-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 21px;
}

.word-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #f0f1ff;
    color: #4f46e5;
    font-size: 0.82rem;
    font-weight: 750;
}

.word-text {
    color: #101828;
    font-size: clamp(1.55rem, 3vw, 2.05rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.pos-tag {
    margin-left: 3px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ecfdf8;
    border: 1px solid #ccefe7;
    color: #087f6b;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


/* ---------------------------------------------------------
   MEANING
   --------------------------------------------------------- */

.meaning-block {
    margin-bottom: 25px;
    padding: 19px 20px;
    border-radius: 15px;
    background: #f8f9fc;
    border: 1px solid #edf0f5;
}

.meaning-en {
    margin-bottom: 9px;
    color: #344054;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 500;
}

.meaning-kn {
    padding-top: 10px;
    border-top: 1px solid #e7e9ef;
    color: #4f46e5;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 650;
}


/* ---------------------------------------------------------
   SECTION LABELS
   --------------------------------------------------------- */

.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 25px 0 11px;
    color: #667085;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.section-label::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 10px;
    background: #4f46e5;
}


/* ---------------------------------------------------------
   EXAMPLES
   --------------------------------------------------------- */

.word-card ol.examples {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: examples;
}

.word-card ol.examples li {
    position: relative;
    margin: 7px 0;
    padding: 12px 15px 12px 48px;
    color: #344054;
    font-size: 0.94rem;
    line-height: 1.65;
    background: #fbfcfe;
    border: 1px solid #eef0f4;
    border-radius: 11px;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.word-card ol.examples li::before {
    content: counter(examples);
    counter-increment: examples;
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 23px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #eef0ff;
    color: #4f46e5;
    font-size: 0.68rem;
    font-weight: 800;
}

.word-card ol.examples li:hover {
    background: #f7f7ff;
    border-color: #dfe1fb;
    transform: translateX(2px);
}


/* ---------------------------------------------------------
   SYNONYMS
   --------------------------------------------------------- */

.synonyms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.synonyms span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f3f4f8;
    border: 1px solid #e7e9ef;
    color: #475467;
    font-size: 0.82rem;
    font-weight: 600;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.synonyms span:hover {
    background: #f0f1ff;
    border-color: #d9daf8;
    color: #4f46e5;
    transform: translateY(-1px);
}


/* ---------------------------------------------------------
   LOGIN TO SAVE
   --------------------------------------------------------- */

.word-login-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border-radius: 10px;
    background: #f5f6ff;
    border: 1px solid #e2e3fb;
    color: #4f46e5;
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
    transition: all 0.2s ease;
}

.word-login-link:hover {
    background: #eef0ff;
    border-color: #d4d6f7;
    transform: translateY(-1px);
}


/* ---------------------------------------------------------
   PAGINATION
   --------------------------------------------------------- */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    max-width: 920px;
    margin: 38px auto 0;
    padding-top: 8px;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
}

.pagination a {
    background: #ffffff;
    border: 1px solid #e4e7ec;
    color: #475467;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #f4f4ff;
    border-color: #d7d8f5;
    color: #4f46e5;
    transform: translateY(-2px);
}

.pagination a.current {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(79,70,229,0.22);
}

.pagination span {
    color: #98a2b3;
    min-width: 20px;
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .page-header {
        padding: 50px 0 45px;
    }

    .page-header h1 {
        font-size: 2.45rem;
    }

    .page-header p {
        padding: 0 10px;
        font-size: 0.94rem;
        line-height: 1.65;
    }

    .content-section {
        padding-top: 25px;
        padding-bottom: 55px;
    }

    .toolbar {
        grid-template-columns: 1fr;
        padding: 10px;
        margin-bottom: 25px;
        border-radius: 15px;
    }

    .toolbar input,
    .toolbar select,
    .toolbar .btn {
        width: 100%;
    }

    .word-card {
        padding: 22px 18px 21px;
        margin-bottom: 17px;
        border-radius: 18px;
    }

    .word-head {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 9px;
        margin-bottom: 18px;
    }

    .word-num {
        width: 34px;
        height: 34px;
    }

    .word-text {
        font-size: 1.55rem;
        padding-top: 4px;
    }

    .pos-tag {
        margin-left: 43px;
        margin-top: -5px;
    }

    .meaning-block {
        padding: 16px;
        border-radius: 13px;
    }

    .word-card ol.examples li {
        padding-left: 43px;
        font-size: 0.9rem;
    }

    .synonyms {
        gap: 6px;
    }

    .synonyms span {
        font-size: 0.77rem;
        padding: 7px 10px;
    }

    .pagination {
        gap: 5px;
        margin-top: 28px;
    }

    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 9px;
        font-size: 0.76rem;
    }
}


/* ---------------------------------------------------------
   VERY SMALL PHONES
   --------------------------------------------------------- */

@media (max-width: 400px) {

    .page-header h1 {
        font-size: 2.15rem;
    }

    .word-text {
        font-size: 1.4rem;
    }

    .word-card {
        padding: 20px 15px;
    }

    .meaning-block {
        padding: 14px;
    }

}

/* =========================================================
   PREMIUM GRAMMAR RULES PAGE
   Visual-only — no HTML/PHP/JS changes
   ========================================================= */

/* Grammar page atmosphere */
body {
    background:
        radial-gradient(circle at 5% 10%, rgba(79,70,229,.045), transparent 28%),
        radial-gradient(circle at 95% 45%, rgba(20,184,166,.035), transparent 28%),
        #f7f8fc;
}


/* ---------------------------------------------------------
   PAGE HEADER
   --------------------------------------------------------- */

.page-header {
    position: relative;
    overflow: hidden;
    padding: 70px 0 62px;
    background:
        linear-gradient(
            135deg,
            #f7f8ff 0%,
            #ffffff 50%,
            #f1fbf9 100%
        );
    border-bottom: 1px solid rgba(15,23,42,.07);
}

.page-header::before {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    right: -190px;
    top: -230px;
    border-radius: 50%;
    background: rgba(79,70,229,.055);
}

.page-header::after {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    left: -130px;
    bottom: -160px;
    border-radius: 50%;
    background: rgba(20,184,166,.045);
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    max-width: 800px;
    margin: 0 auto 15px;
    text-align: center;
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -.055em;
    font-weight: 850;
    color: #101828;
}

.page-header p {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    color: #667085;
    font-size: 1.04rem;
    line-height: 1.8;
}


/* ---------------------------------------------------------
   MAIN CONTENT
   --------------------------------------------------------- */

.content-section {
    padding-top: 42px;
    padding-bottom: 80px;
}


/* ---------------------------------------------------------
   GRAMMAR RULE CARDS
   --------------------------------------------------------- */

.ref-card {
    position: relative;
    max-width: 920px;
    margin: 0 auto 24px;
    padding: 30px 32px 32px;
    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #ffffff 72%,
            #fafbff 100%
        );
    border: 1px solid rgba(15,23,42,.075);
    border-radius: 22px;
    box-shadow:
        0 10px 30px rgba(15,23,42,.055),
        0 2px 7px rgba(15,23,42,.025);
    overflow: hidden;
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.ref-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        #4f46e5,
        #6366f1 45%,
        #14b8a6
    );
}

.ref-card::after {
    content: "";
    position: absolute;
    right: -85px;
    bottom: -90px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(79,70,229,.035);
    pointer-events: none;
}

.ref-card:hover {
    transform: translateY(-3px);
    border-color: rgba(79,70,229,.15);
    box-shadow:
        0 18px 44px rgba(15,23,42,.08),
        0 4px 10px rgba(15,23,42,.035);
}


/* ---------------------------------------------------------
   GRAMMAR TITLE
   --------------------------------------------------------- */

.ref-card h3 {
    position: relative;
    margin: 0 0 21px;
    padding-left: 48px;
    color: #101828;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.25;
    letter-spacing: -.025em;
    font-weight: 800;
}

.ref-card h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    width: 35px;
    height: 35px;
    border-radius: 11px;
    background: #eef0ff;
    box-shadow: inset 0 0 0 1px #e0e2fb;
}

.ref-card h3::after {
    content: "";
    position: absolute;
    left: 11px;
    top: 12px;
    width: 13px;
    height: 9px;
    border-left: 2px solid #4f46e5;
    border-bottom: 2px solid #4f46e5;
    transform: rotate(-45deg);
}


/* ---------------------------------------------------------
   GRAMMAR STRUCTURE
   --------------------------------------------------------- */

.ref-card .structure {
    position: relative;
    margin: 0 0 23px;
    padding: 17px 20px 17px 22px;
    border-radius: 14px;
    background:
        linear-gradient(
            100deg,
            #f1f2ff,
            #f7f8ff
        );
    border: 1px solid #e3e5fa;
    color: #3730a3;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .91rem;
    line-height: 1.7;
    font-weight: 650;
    overflow-x: auto;
}

.ref-card .structure::before {
    content: "STRUCTURE";
    display: block;
    margin-bottom: 6px;
    color: #6366f1;
    font-family: inherit;
    font-size: .61rem;
    letter-spacing: .13em;
    font-weight: 800;
}


/* ---------------------------------------------------------
   GRAMMAR EXPLANATION
   --------------------------------------------------------- */

.ref-card p {
    color: #475467;
    font-size: .98rem;
    line-height: 1.8;
}

.ref-card p:first-of-type {
    margin-top: 0;
}


/* ---------------------------------------------------------
   EXAMPLES
   --------------------------------------------------------- */

.ref-card ul.examples,
.ref-card ol.examples {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: grammar-example;
}

.ref-card ul.examples li,
.ref-card ol.examples li {
    position: relative;
    margin: 8px 0;
    padding: 13px 17px 13px 52px;
    background: #fbfcfe;
    border: 1px solid #edf0f4;
    border-radius: 12px;
    color: #344054;
    font-size: .94rem;
    line-height: 1.65;
    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.ref-card ul.examples li::before,
.ref-card ol.examples li::before {
    content: counter(grammar-example);
    counter-increment: grammar-example;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 8px;
    background: #eef0ff;
    color: #4f46e5;
    font-size: .68rem;
    font-weight: 800;
}

.ref-card ul.examples li:hover,
.ref-card ol.examples li:hover {
    background: #f7f7ff;
    border-color: #dfe1fb;
    transform: translateX(3px);
}


/* ---------------------------------------------------------
   SECTION LABEL
   --------------------------------------------------------- */

.ref-card .section-label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 26px 0 10px;
    color: #667085;
    font-size: .66rem;
    line-height: 1;
    letter-spacing: .12em;
    font-weight: 800;
    text-transform: uppercase;
}

.ref-card .section-label::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 10px;
    background: #4f46e5;
}


/* ---------------------------------------------------------
   TOOLBAR / SEARCH IF PRESENT
   --------------------------------------------------------- */

.toolbar {
    max-width: 920px;
    margin: 0 auto 34px;
    padding: 11px;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 17px;
    box-shadow:
        0 12px 34px rgba(15,23,42,.055),
        0 2px 7px rgba(15,23,42,.025);
    backdrop-filter: blur(14px);
}

.toolbar input,
.toolbar select {
    min-height: 48px;
    border: 1px solid #e4e7ec;
    border-radius: 11px;
    background: #fff;
    color: #101828;
    outline: none;
    transition: all .2s ease;
}

.toolbar input:focus,
.toolbar select:focus {
    border-color: rgba(79,70,229,.5);
    box-shadow: 0 0 0 4px rgba(79,70,229,.08);
}


/* ---------------------------------------------------------
   PAGINATION
   --------------------------------------------------------- */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    max-width: 920px;
    margin: 40px auto 0;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.pagination a {
    background: #fff;
    border: 1px solid #e4e7ec;
    color: #475467;
    transition: all .2s ease;
}

.pagination a:hover {
    background: #f4f4ff;
    border-color: #d7d8f5;
    color: #4f46e5;
    transform: translateY(-2px);
}

.pagination a.current {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
    box-shadow: 0 6px 16px rgba(79,70,229,.22);
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .page-header {
        padding: 50px 0 45px;
    }

    .page-header h1 {
        font-size: 2.4rem;
    }

    .page-header p {
        padding: 0 12px;
        font-size: .93rem;
    }

    .content-section {
        padding-top: 25px;
        padding-bottom: 55px;
    }

    .ref-card {
        padding: 23px 18px 24px;
        margin-bottom: 18px;
        border-radius: 18px;
    }

    .ref-card h3 {
        padding-left: 44px;
        font-size: 1.3rem;
    }

    .ref-card h3::before {
        width: 33px;
        height: 33px;
    }

    .ref-card h3::after {
        left: 10px;
        top: 11px;
    }

    .ref-card .structure {
        padding: 15px;
        font-size: .82rem;
    }

    .ref-card ul.examples li,
    .ref-card ol.examples li {
        padding-left: 46px;
        font-size: .9rem;
    }

    .pagination {
        margin-top: 28px;
    }

    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 9px;
        font-size: .76rem;
    }
}


/* ---------------------------------------------------------
   SMALL PHONES
   --------------------------------------------------------- */

@media (max-width: 400px) {

    .page-header h1 {
        font-size: 2.15rem;
    }

    .ref-card {
        padding: 20px 15px;
    }

    .ref-card h3 {
        font-size: 1.2rem;
    }
}




/* =========================================================
   FLUENTPATH — PREMIUM COMMON SENTENCES
   ISOLATED PAGE DESIGN
   No PHP / HTML / JS changes
   ========================================================= */


/* =========================================================
   COMMON SENTENCES ONLY — PAGE BACKGROUND
   ========================================================= */

body:has(#categorySelect) {
    background:
        radial-gradient(
            circle at 7% 8%,
            rgba(81, 70, 229, .055),
            transparent 28%
        ),
        radial-gradient(
            circle at 94% 42%,
            rgba(15, 159, 130, .04),
            transparent 27%
        ),
        #f7f8fc;
}


/* =========================================================
   COMMON SENTENCES ONLY — HEADER
   ========================================================= */

body:has(#categorySelect) .page-header {
    position: relative;
    overflow: hidden;

    padding: 68px 0 60px !important;

    background:
        radial-gradient(
            circle at 82% 15%,
            rgba(81,70,229,.08),
            transparent 27%
        ),
        linear-gradient(
            135deg,
            #f7f8ff 0%,
            #ffffff 52%,
            #f3fbfa 100%
        ) !important;

    border-bottom: 1px solid rgba(15,23,42,.07);
}

body:has(#categorySelect) .page-header::before {
    content: "";

    position: absolute;

    width: 430px;
    height: 430px;

    right: -210px;
    top: -250px;

    border-radius: 50%;

    background: rgba(81,70,229,.055);

    pointer-events: none;
}

body:has(#categorySelect) .page-header::after {
    content: "";

    position: absolute;

    width: 280px;
    height: 280px;

    left: -160px;
    bottom: -200px;

    border-radius: 50%;

    background: rgba(15,159,130,.045);

    pointer-events: none;
}

body:has(#categorySelect) .page-header .container {
    position: relative;
    z-index: 2;
}

body:has(#categorySelect) .page-header h1 {
    max-width: 850px;

    margin: 0 auto 14px !important;

    text-align: center;

    color: #101828 !important;

    font-size:
        clamp(
            2.5rem,
            5vw,
            4.25rem
        ) !important;

    line-height: 1.02;

    letter-spacing: -.062em !important;

    font-weight: 850;
}

body:has(#categorySelect) .page-header p {
    max-width: 720px;

    margin: 0 auto !important;

    text-align: center;

    color: #667085 !important;

    font-size: 1.02rem;

    line-height: 1.8;
}


/* =========================================================
   COMMON SENTENCES ONLY — CONTENT
   ========================================================= */

body:has(#categorySelect)
.page-header + .container.content-section {
    padding-top: 40px !important;
    padding-bottom: 90px !important;
}


/* =========================================================
   CATEGORY SELECTOR
   ========================================================= */

body:has(#categorySelect)
.page-header + .container.content-section
> div[style*="max-width:600px"] {

    max-width: 720px !important;

    margin: 0 auto 38px !important;

    padding: 15px;

    background: rgba(255,255,255,.9);

    border: 1px solid rgba(15,23,42,.075);

    border-radius: 18px;

    box-shadow:
        0 12px 35px rgba(15,23,42,.055),
        0 2px 7px rgba(15,23,42,.025);

    backdrop-filter: blur(16px);
}

body:has(#categorySelect)
.page-header + .container.content-section
> div[style*="max-width:600px"] label {

    display: block;

    margin: 0 0 9px !important;

    color: #667085 !important;

    font-size: .66rem !important;

    line-height: 1;

    letter-spacing: .13em;

    font-weight: 850 !important;

    text-transform: uppercase;
}

body:has(#categorySelect) #categorySelect {

    width: 100% !important;

    min-height: 52px;

    padding: 0 16px !important;

    background: #ffffff !important;

    border: 1px solid #e1e4ea !important;

    border-radius: 12px !important;

    color: #101828 !important;

    font-size: .94rem !important;

    font-weight: 650;

    cursor: pointer;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

body:has(#categorySelect) #categorySelect:hover {
    border-color: #c9cce0 !important;
}

body:has(#categorySelect) #categorySelect:focus {

    border-color: rgba(81,70,229,.55) !important;

    box-shadow:
        0 0 0 4px rgba(81,70,229,.09);
}


/* =========================================================
   CATEGORY TITLE
   ========================================================= */

body:has(#categorySelect)
.page-header + .container.content-section > h2 {

    max-width: 920px;

    margin: 0 auto 18px !important;

    color: #101828 !important;

    font-size: 1.55rem !important;

    line-height: 1.2;

    letter-spacing: -.035em;

    font-weight: 800 !important;
}

body:has(#categorySelect)
.page-header + .container.content-section > h2::before {

    content: "";

    display: inline-block;

    width: 5px;
    height: 25px;

    margin-right: 11px;

    vertical-align: -3px;

    border-radius: 99px;

    background:
        linear-gradient(
            180deg,
            #5146e5,
            #0f9f82
        );
}


/* =========================================================
   COMMON SENTENCE CARDS ONLY
   ========================================================= */

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card {

    position: relative;

    display: flex !important;

    max-width: 920px;

    min-height: 148px;

    margin: 0 auto 17px !important;

    padding: 25px 27px !important;

    gap: 18px !important;

    align-items: flex-start !important;

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #ffffff 68%,
            #fafbff 100%
        ) !important;

    border: 1px solid rgba(15,23,42,.075) !important;

    border-radius: 20px !important;

    box-shadow:
        0 9px 26px rgba(16,24,40,.045),
        0 2px 7px rgba(16,24,40,.02) !important;

    overflow: hidden;

    transition:
        transform .24s ease,
        box-shadow .24s ease,
        border-color .24s ease;
}


/* Top accent */

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card::before {

    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 3px;

    background:
        linear-gradient(
            90deg,
            #5146e5 0%,
            #7168f1 45%,
            #0f9f82 100%
        );
}


/* Decorative circle */

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card::after {

    content: "";

    position: absolute;

    right: -70px;
    bottom: -85px;

    width: 175px;
    height: 175px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(81,70,229,.055),
            rgba(81,70,229,.015) 60%,
            transparent 72%
        );

    pointer-events: none;
}


/* Hover */

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card:hover {

    transform: translateY(-3px);

    border-color: rgba(81,70,229,.15) !important;

    box-shadow:
        0 19px 42px rgba(16,24,40,.075),
        0 4px 10px rgba(16,24,40,.025) !important;
}


/* =========================================================
   COMMON SENTENCE NUMBER
   ========================================================= */

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card > div:first-child {

    position: relative;

    z-index: 3;

    flex: 0 0 auto;

    width: 38px;

    min-width: 38px !important;

    height: 38px !important;

    margin-top: 1px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 12px !important;

    background:
        linear-gradient(
            145deg,
            #eef0ff,
            #f6f6ff
        ) !important;

    border: 1px solid #e0e2fa;

    color: #5146e5 !important;

    font-size: .76rem !important;

    font-weight: 850 !important;
}


/* =========================================================
   COMMON SENTENCE TEXT
   ========================================================= */

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card > div:nth-child(2) {

    position: relative;

    z-index: 3;

    min-width: 0;

    flex: 1;

    padding-right: 4px;
}

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card > div:nth-child(2)
> p:first-child {

    margin: 1px 0 10px !important;

    color: #172033 !important;

    font-size: 1.1rem !important;

    line-height: 1.65 !important;

    font-weight: 650 !important;

    letter-spacing: -.012em;
}


/* =========================================================
   KANNADA MEANING
   ========================================================= */

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card > div:nth-child(2)
> p:nth-child(2) {

    margin: 0 !important;

    padding-top: 11px;

    border-top: 1px solid #edf0f4;

    color: #087f6b !important;

    font-size: .96rem !important;

    line-height: 1.8 !important;

    font-weight: 650 !important;
}


/* =========================================================
   LOGIN / LEARN ACTION
   ========================================================= */

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card a {

    position: relative;

    z-index: 10;

    display: block;

    margin-top: 16px !important;

    padding-top: 10px;

    border-top: 1px solid #f0f1f4;

    text-align: right !important;

    color: #5146e5 !important;

    font-size: .76rem !important;

    font-weight: 700;

    text-decoration: none;

    transition:
        color .2s ease,
        transform .2s ease;
}

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card a:hover {

    color: #3730a3 !important;

    transform: translateX(-2px);
}


/* =========================================================
   LEARNING HEART
   ========================================================= */

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card button,

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card .heart-button,

body:has(#categorySelect)
.page-header + .container.content-section
.ref-card .learning-heart {

    position: relative;

    z-index: 10;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

body:has(#categorySelect)
.page-header + .container.content-section
p[style*="color:#777"] {

    max-width: 720px;

    margin: 30px auto;

    padding: 30px;

    text-align: center;

    background: #ffffff;

    border: 1px dashed #d7dce6;

    border-radius: 17px;

    color: #667085 !important;

    box-shadow:
        0 8px 25px rgba(16,24,40,.035);
}


/* =========================================================
   COMMON SENTENCES — MOBILE
   ========================================================= */

@media (max-width: 700px) {

    body:has(#categorySelect) .page-header {

        padding: 50px 0 44px !important;
    }

    body:has(#categorySelect) .page-header h1 {

        font-size: 2.45rem !important;
    }

    body:has(#categorySelect) .page-header p {

        padding: 0 14px;

        font-size: .93rem;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section {

        padding-top: 25px !important;

        padding-bottom: 60px !important;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section
    > div[style*="max-width:600px"] {

        margin-bottom: 27px !important;

        padding: 11px;

        border-radius: 15px;
    }

    body:has(#categorySelect) #categorySelect {

        min-height: 48px;

        font-size: .9rem !important;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section
    > h2 {

        font-size: 1.35rem !important;

        margin-bottom: 14px !important;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section
    .ref-card {

        min-height: 0;

        padding: 21px 17px !important;

        gap: 12px !important;

        margin-bottom: 14px !important;

        border-radius: 17px !important;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section
    .ref-card > div:first-child {

        width: 34px;

        min-width: 34px !important;

        height: 34px !important;

        border-radius: 10px !important;

        font-size: .68rem !important;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section
    .ref-card > div:nth-child(2)
    > p:first-child {

        font-size: 1rem !important;

        line-height: 1.6 !important;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section
    .ref-card > div:nth-child(2)
    > p:nth-child(2) {

        font-size: .89rem !important;

        line-height: 1.7 !important;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section
    .ref-card a {

        font-size: .71rem !important;
    }
}


/* =========================================================
   COMMON SENTENCES — SMALL PHONES
   ========================================================= */

@media (max-width: 400px) {

    body:has(#categorySelect) .page-header h1 {

        font-size: 2.15rem !important;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section
    .ref-card {

        padding: 19px 14px !important;

        gap: 10px !important;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section
    .ref-card > div:nth-child(2)
    > p:first-child {

        font-size: .95rem !important;
    }

    body:has(#categorySelect)
    .page-header + .container.content-section
    .ref-card > div:nth-child(2)
    > p:nth-child(2) {

        font-size: .85rem !important;
    }
}