/* =========================================================
   DENTALHUB · Design System
   Author concept: medical-dark, premium, animated
   ========================================================= */

:root {
    /* Palette */
    --bg-0: #07090f;
    --bg-1: #0c1018;
    --bg-2: #131826;
    --bg-3: #1b2233;
    --bg-card: #141a28;
    --bg-elev: #1a2032;
    --line: rgba(255, 255, 255, 0.06);
    --line-2: rgba(255, 255, 255, 0.1);

    --text: #eef1f8;
    --text-dim: #9aa3b8;
    --text-mute: #6b7388;

    --brand: #00e0c7;
    --brand-2: #00b4ff;
    --brand-soft: rgba(0, 224, 199, 0.14);
    --accent: #ff3b6b;
    --accent-soft: rgba(255, 59, 107, 0.14);
    --warn: #ffb84d;
    --ok: #4ade80;

    --grad-brand: linear-gradient(135deg, #00e0c7 0%, #00b4ff 100%);
    --grad-accent: linear-gradient(135deg, #ff3b6b 0%, #ff7a59 100%);
    --grad-bg: radial-gradient(ellipse 120% 80% at 85% -15%, rgba(0, 224, 199, 0.14) 0%, transparent 55%),
               radial-gradient(ellipse 90% 70% at 5% 105%, rgba(0, 180, 255, 0.11) 0%, transparent 50%),
               radial-gradient(ellipse 60% 50% at 50% 50%, rgba(255, 59, 107, 0.04) 0%, transparent 60%),
               linear-gradient(180deg, #07090f 0%, #0a0d15 100%);

    /* Geometry */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 0 1px rgba(0, 224, 199, 0.25), 0 14px 50px rgba(0, 224, 199, 0.18);

    /* Layout */
    --sidebar-w: 280px;
    --header-h: 78px;

    /* Easing */
    --e-out: cubic-bezier(0.22, 1, 0.36, 1);
    --e-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset --------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
body {
    font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
    background: var(--grad-bg);
    background-attachment: fixed;
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color .25s var(--e-out); }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--brand-soft); color: var(--text); }

/* Scrollbar ----------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--bg-3);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--bg-elev); background-clip: padding-box; }

/* Layout -------------------------------------------------- */
.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
}

/* Animated background — smooth vector glows (no blur filter) */
.bg-fx {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    contain: strict;
}
.bg-fx::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        conic-gradient(from 210deg at 70% 20%, rgba(0, 224, 199, 0.06), transparent 35%, rgba(0, 180, 255, 0.05), transparent 65%, rgba(255, 59, 107, 0.04), transparent 85%),
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(0, 180, 255, 0.05), transparent 55%);
    opacity: 0.85;
    animation: mesh-drift 40s ease-in-out infinite;
}
.bg-fx::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(7, 9, 15, 0.35) 100%);
    pointer-events: none;
}
.bg-fx .blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}
.bg-fx .b1 {
    width: min(110vw, 980px);
    height: min(110vw, 980px);
    top: -28%;
    left: -18%;
    background: radial-gradient(circle at 42% 42%,
        rgba(0, 224, 199, 0.38) 0%,
        rgba(0, 224, 199, 0.18) 22%,
        rgba(0, 224, 199, 0.07) 42%,
        rgba(0, 224, 199, 0.02) 58%,
        transparent 72%);
    animation: float-glow-1 26s ease-in-out infinite;
}
.bg-fx .b2 {
    width: min(120vw, 1080px);
    height: min(120vw, 1080px);
    bottom: -32%;
    right: -22%;
    background: radial-gradient(circle at 58% 58%,
        rgba(0, 180, 255, 0.34) 0%,
        rgba(0, 180, 255, 0.16) 24%,
        rgba(0, 180, 255, 0.06) 44%,
        rgba(0, 180, 255, 0.02) 60%,
        transparent 74%);
    animation: float-glow-2 32s ease-in-out infinite;
    animation-delay: -10s;
}
.bg-fx .b3 {
    width: min(90vw, 820px);
    height: min(90vw, 820px);
    top: 32%;
    left: 50%;
    margin-left: min(-45vw, -410px);
    background: radial-gradient(circle at 50% 50%,
        rgba(255, 59, 107, 0.22) 0%,
        rgba(255, 59, 107, 0.1) 28%,
        rgba(255, 59, 107, 0.04) 48%,
        transparent 70%);
    animation: float-glow-3 28s ease-in-out infinite;
    animation-delay: -18s;
}

@keyframes mesh-drift {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); opacity: 0.85; }
    50% { transform: translate3d(-2%, 1%, 0) rotate(3deg) scale(1.04); opacity: 0.95; }
}
@keyframes float-glow-1 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    33% { transform: translate3d(5vw, -3vh, 0) scale(1.06); }
    66% { transform: translate3d(-2vw, 4vh, 0) scale(0.97); }
}
@keyframes float-glow-2 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    40% { transform: translate3d(-4vw, -2vh, 0) scale(1.05); }
    70% { transform: translate3d(3vw, 3vh, 0) scale(0.98); }
}
@keyframes float-glow-3 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    45% { transform: translate3d(-3vw, 2vh, 0) scale(1.04); }
    75% { transform: translate3d(4vw, -3vh, 0) scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
    .bg-fx::before,
    .bg-fx .blob { animation: none; }
}

/* Sidebar ------------------------------------------------- */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, rgba(20, 26, 40, 0.85) 0%, rgba(12, 16, 24, 0.85) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-right: 1px solid var(--line);
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    z-index: 50;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 18px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
}
.brand:hover { color: inherit; }
.brand-logo {
    width: 40px; height: 40px;
    border-radius: 11px;
    background: var(--grad-brand);
    display: grid; place-items: center;
    box-shadow: 0 8px 24px rgba(0, 224, 199, .35);
    position: relative;
    overflow: hidden;
}
.brand-logo::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shine 4s var(--e-out) infinite;
}
@keyframes shine { 0% { transform: translateX(-100%); } 60% { transform: translateX(120%); } 100% { transform: translateX(120%); } }
.brand-logo svg { width: 22px; height: 22px; color: #051a18; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 14px; letter-spacing: .3px; line-height: 1.25; }
.brand-text span { font-size: 11px; color: var(--text-mute); letter-spacing: 1.2px; text-transform: uppercase; }

.user-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    transition: border-color .25s var(--e-out), transform .25s var(--e-out);
}
.user-card:hover { border-color: rgba(0, 224, 199, .35); transform: translateY(-1px); }
.user-card .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--grad-brand);
    display: grid; place-items: center;
    color: #052320; font-weight: 700;
    font-size: 14px;
}
.user-card .info { flex: 1; min-width: 0; }
.user-card .info b { font-size: 13px; display: block; }
.user-card .info a { font-size: 12px; color: var(--brand); }

/* Nav */
.nav {
    display: flex; flex-direction: column; gap: 4px;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-right: -4px;
}
.nav::-webkit-scrollbar { width: 6px; }
.nav-section { padding: 12px 0 4px; }
.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--text-mute);
    padding: 4px 12px 8px;
    font-weight: 600;
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: all .22s var(--e-out);
    cursor: pointer;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-item:hover {
    background: var(--bg-2);
    color: var(--text);
    transform: translateX(2px);
}
.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 224, 199, .14), rgba(0, 224, 199, 0));
    color: var(--text);
}
.nav-item.active::before {
    content: "";
    position: absolute; left: -22px; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--grad-brand);
}
.nav-item .badge {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
}

.nav-group { margin-top: 4px; }
.nav-group > .nav-item .chev { margin-left: auto; transition: transform .25s var(--e-out); }
.nav-group.open > .nav-item .chev { transform: rotate(90deg); }
.nav-sub {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s var(--e-out);
}
.nav-sub > div { overflow: hidden; }
.nav-group.open .nav-sub { grid-template-rows: 1fr; }
.nav-sub a {
    display: block;
    font-size: 13px;
    padding: 7px 12px 7px 42px;
    color: var(--text-dim);
    border-radius: var(--r-sm);
    margin: 1px 0;
}
.nav-sub a:hover { background: var(--bg-2); color: var(--text); }
.nav-sub a.active { color: var(--brand); }

.sidebar-footer {
    border-top: 1px solid var(--line);
    padding-top: 14px;
    font-size: 12px;
    color: var(--text-mute);
    display: flex; flex-direction: column; gap: 6px;
}
.sidebar-footer a { color: var(--text-dim); }
.sidebar-footer a:hover { color: var(--brand); }

/* Main / Content ----------------------------------------- */
.main { min-width: 0; }
.topbar {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 38px;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    background: rgba(10, 14, 22, 0.55);
    position: sticky; top: 0; z-index: 40;
}
.search {
    flex: 1; max-width: 540px;
    position: relative;
}
.search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: var(--text-mute); }
.search input:focus { border-color: rgba(0, 224, 199, .55); box-shadow: 0 0 0 4px rgba(0, 224, 199, .12); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-mute); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    display: grid; place-items: center;
    transition: all .22s var(--e-out);
    color: var(--text-dim);
    position: relative;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn .dot {
    position: absolute; top: 8px; right: 9px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 0 2px var(--bg-2);
}

.content {
    padding: 36px 38px 80px;
    max-width: 1480px;
}

/* Headings ------------------------------------------------ */
.page-head { margin-bottom: 26px; }
.page-head h1 {
    margin: 0 0 6px;
    font-size: 30px;
    letter-spacing: -.3px;
    font-weight: 700;
}
.page-head .subtitle { color: var(--text-dim); font-size: 14px; }

.section-head {
    display: flex; align-items: end; justify-content: space-between;
    margin: 30px 0 18px;
}
.section-head h2 { margin: 0; font-size: 20px; }
.section-head .more { color: var(--brand); font-size: 13px; font-weight: 600; }

/* Buttons ------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    background: var(--grad-brand);
    color: #052320;
    transition: transform .2s var(--e-out), box-shadow .25s var(--e-out), filter .2s;
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 224, 199, .35);
    color: #052320;
    filter: brightness(1.05);
}
.btn:active { transform: translateY(0); }
.btn-ghost {
    background: var(--bg-2);
    color: var(--text);
    border: 1px solid var(--line);
}
.btn-ghost:hover {
    box-shadow: none;
    background: var(--bg-3);
    color: var(--text);
    border-color: var(--line-2);
}
.btn-accent {
    background: var(--grad-accent);
    color: #fff;
}
.btn-accent:hover { box-shadow: 0 12px 30px rgba(255, 59, 107, .4); color: #fff; }
.btn-danger { background: rgba(255, 59, 107, .15); color: var(--accent); }
.btn-danger:hover { background: rgba(255, 59, 107, .25); color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-icon { padding: 10px; min-width: 40px; }

/* Hero ---------------------------------------------------- */
.hero {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    padding: 60px 56px;
    background:
        radial-gradient(700px 340px at 90% 0%, rgba(0, 180, 255, .25), transparent 60%),
        radial-gradient(500px 260px at 0% 100%, rgba(255, 59, 107, .18), transparent 60%),
        linear-gradient(135deg, #0e1426 0%, #131933 50%, #0e1426 100%);
    border: 1px solid var(--line);
    margin-bottom: 38px;
    isolation: isolate;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 18% 28%, rgba(0, 224, 199, 0.2) 0%, rgba(0, 224, 199, 0.06) 35%, transparent 62%),
        radial-gradient(ellipse 65% 50% at 82% 72%, rgba(0, 180, 255, 0.18) 0%, rgba(0, 180, 255, 0.05) 38%, transparent 65%);
    pointer-events: none;
    animation: hero-pulse 8s ease-in-out infinite;
}
@keyframes hero-pulse { 0%,100% { opacity: 1;} 50% { opacity: .55;} }

.hero .grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}
.hero-inner {
    position: relative; z-index: 1;
    max-width: 720px;
    display: flex; flex-direction: column; gap: 18px;
}
.hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 224, 199, .12);
    color: var(--brand);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    border: 1px solid rgba(0, 224, 199, .25);
    width: fit-content;
}
.hero-tag .live-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 224, 199, .25);
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.4); opacity: .55; } }

.hero h1 {
    font-size: 50px; line-height: 1.05;
    margin: 0; letter-spacing: -.8px;
    font-weight: 800;
}
.hero h1 .accent {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p { font-size: 16px; color: var(--text-dim); max-width: 580px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }

.hero-stats {
    position: relative; z-index: 1;
    display: flex; gap: 36px; margin-top: 36px;
    flex-wrap: wrap;
}
.hero-stats .stat strong {
    display: block; font-size: 28px; font-weight: 800; letter-spacing: -.5px;
    background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats .stat span { font-size: 12px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 1.2px; }

/* Sort/filter bar ---------------------------------------- */
.list-bar {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 22px;
}
.list-bar .label { color: var(--text-mute); font-size: 13px; margin-right: 6px; }
.chip {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-dim);
    background: var(--bg-2);
    border: 1px solid var(--line);
    cursor: pointer;
    transition: all .2s var(--e-out);
    font-weight: 500;
}
.chip:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-1px); }
.chip.active { color: #052320; background: var(--grad-brand); border-color: transparent; }

.view-toggle { margin-left: auto; display: flex; gap: 6px; background: var(--bg-2); padding: 4px; border-radius: 10px; border: 1px solid var(--line); }
.view-toggle button {
    width: 34px; height: 30px; border-radius: 7px; color: var(--text-mute);
    display: grid; place-items: center; transition: all .2s var(--e-out);
}
.view-toggle button.active { background: var(--bg-3); color: var(--text); }
.view-toggle button svg { width: 16px; height: 16px; }

/* Video grid --------------------------------------------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 22px;
}
.video-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform .35s var(--e-out), border-color .25s, box-shadow .35s;
    position: relative;
    will-change: transform;
}
.video-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 224, 199, .35);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 224, 199, .15);
}
.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-2);
}
.video-thumb .cover {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s var(--e-out), filter .35s;
}
.video-card:hover .cover { transform: scale(1.07); filter: brightness(1.08); }
.video-thumb::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(7, 9, 15, .8) 100%);
    pointer-events: none;
}
.video-thumb .play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.85);
    width: 56px; height: 56px;
    background: rgba(7, 9, 15, .65);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: grid; place-items: center;
    opacity: 0;
    transition: all .35s var(--e-spring);
    z-index: 2;
    border: 1px solid rgba(255,255,255,.18);
}
.video-thumb .play svg { width: 22px; height: 22px; color: #fff; margin-left: 3px; }
.video-card:hover .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.video-thumb .duration {
    position: absolute; bottom: 10px; right: 10px;
    padding: 4px 8px;
    background: rgba(7, 9, 15, .72);
    backdrop-filter: blur(6px);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}
.video-thumb .new-tag {
    position: static;
    padding: 4px 8px;
    background: var(--grad-accent);
    color: #fff;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: 0 4px 12px rgba(255, 59, 107, .4);
}

.video-meta {
    padding: 14px 16px 16px;
}
.video-meta h3 {
    font-size: 15px; font-weight: 600; line-height: 1.35;
    margin: 0 0 6px;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}
.video-meta .row {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: var(--text-mute);
}
.video-meta .row .views { display: inline-flex; align-items: center; gap: 6px; }
.video-meta .row .views svg { width: 14px; height: 14px; }

/* List view */
.video-list {
    display: flex; flex-direction: column; gap: 14px;
}
.video-list .video-card {
    display: grid; grid-template-columns: 320px 1fr;
}
.video-list .video-thumb { aspect-ratio: auto; }
.video-list .video-meta { padding: 22px 26px; }
.video-list .video-meta h3 { font-size: 18px; min-height: 0; -webkit-line-clamp: unset; line-clamp: unset; }
.video-list .video-meta .desc { color: var(--text-dim); font-size: 13px; margin: 8px 0 12px; }

/* Pagination --------------------------------------------- */
.pagi {
    display: flex; align-items: center; gap: 6px;
    list-style: none; padding: 0; margin: 36px 0 0;
    justify-content: center; flex-wrap: wrap;
}
.pagi li a {
    min-width: 36px; height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    display: grid; place-items: center;
    background: var(--bg-2);
    border: 1px solid var(--line);
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 600;
    transition: all .2s var(--e-out);
}
.pagi li a:hover { color: var(--text); border-color: var(--line-2); }
.pagi li a.active { background: var(--grad-brand); color: #052320; border-color: transparent; }
.pagi li.disabled a { opacity: .4; pointer-events: none; }

/* Modal video popup -------------------------------------- */
.modal {
    position: fixed; inset: 0;
    background: rgba(5, 7, 12, .82);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: grid; place-items: center;
    padding: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--e-out);
}
.modal.active { opacity: 1; pointer-events: auto; }
.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    width: min(1080px, 100%);
    overflow: hidden;
    transform: translateY(20px) scale(.97);
    transition: transform .35s var(--e-spring);
    max-height: 92vh;
    display: flex; flex-direction: column;
}
.modal.active .modal-card { transform: translateY(0) scale(1); }
.modal-video {
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
}
.modal-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.modal-body { padding: 22px 28px 26px; overflow-y: auto; }
.modal-body h2 { margin: 0 0 8px; font-size: 22px; }
.modal-body .meta { color: var(--text-mute); font-size: 13px; margin-bottom: 14px; display: flex; gap: 18px; }
.modal-body .desc { color: var(--text-dim); font-size: 14px; line-height: 1.6; }
.modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(7, 9, 15, .7);
    backdrop-filter: blur(6px);
    color: #fff;
    display: grid; place-items: center;
    z-index: 5;
    transition: all .2s;
}
.modal-close:hover { background: var(--accent); transform: rotate(90deg); }
.modal-warn {
    margin-top: 18px;
    padding: 14px 18px;
    background: rgba(255, 184, 77, .08);
    border: 1px solid rgba(255, 184, 77, .25);
    border-radius: var(--r-md);
    color: #ffd592;
    font-size: 13px;
}
.modal-warn b { color: var(--warn); display: block; margin-bottom: 4px; font-size: 14px; }

/* Categories scroller ------------------------------------ */
.cats-row {
    display: flex; gap: 14px; overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
}
.cat-card {
    min-width: 240px;
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: all .3s var(--e-out);
    cursor: pointer;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; gap: 10px;
}
.cat-card::after {
    content: "";
    position: absolute; right: -40px; top: -40px;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: var(--grad-brand);
    opacity: .08;
    transition: transform .5s var(--e-out), opacity .3s;
}
.cat-card:hover { border-color: rgba(0, 224, 199, .35); transform: translateY(-3px); }
.cat-card:hover::after { transform: scale(1.4); opacity: .14; }
.cat-card .icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid; place-items: center;
    margin-bottom: 6px;
}
.cat-card .icon svg { width: 22px; height: 22px; }
.cat-card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.cat-card .count { color: var(--text-mute); font-size: 12px; }

/* Auth pages --------------------------------------------- */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.auth-side {
    background:
        radial-gradient(ellipse 90% 70% at 25% 0%, rgba(0, 224, 199, 0.22) 0%, rgba(0, 224, 199, 0.06) 40%, transparent 68%),
        radial-gradient(ellipse 80% 60% at 75% 100%, rgba(0, 180, 255, 0.2) 0%, rgba(0, 180, 255, 0.05) 42%, transparent 70%),
        linear-gradient(135deg, #0c1322 0%, #0a0e18 100%);
    position: relative;
    padding: 50px;
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
}
.auth-side::before {
    content: "";
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 75%);
}
.auth-side .pitch {
    position: relative; z-index: 1; max-width: 480px;
}
.auth-side .pitch h2 { font-size: 36px; line-height: 1.1; letter-spacing: -.5px; margin: 0 0 14px; }
.auth-side .pitch h2 span {
    background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-side .pitch p { color: var(--text-dim); font-size: 15px; line-height: 1.6; }
.auth-side .features {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; gap: 14px;
    margin-top: 30px;
}
.auth-side .features li {
    display: flex; align-items: center; gap: 12px;
    color: var(--text-dim);
    list-style: none;
    font-size: 14px;
}
.auth-side .features li svg { color: var(--brand); width: 20px; height: 20px; flex-shrink: 0; }
.auth-form-wrap {
    background: var(--bg-1);
    display: grid; place-items: center;
    padding: 50px;
}
.auth-form { width: 100%; max-width: 380px; }
.auth-form .logo { margin-bottom: 30px; display: inline-flex; align-items: center; gap: 12px; }
.auth-form .logo .brand-logo { width: 36px; height: 36px; }
.auth-form .logo b { font-size: 17px; }
.auth-form h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.4px; }
.auth-form .sub { color: var(--text-dim); margin-bottom: 28px; font-size: 14px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; font-weight: 500; }
.field input, .field textarea, .field select {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
    border-color: rgba(0, 224, 199, .55);
    box-shadow: 0 0 0 4px rgba(0, 224, 199, .12);
}
.field textarea { resize: vertical; min-height: 90px; font-family: inherit; }
.checkbox {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 13px; color: var(--text-dim);
    cursor: pointer;
    user-select: none;
}
.checkbox input { display: none; }
.checkbox .box {
    width: 18px; height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--line-2);
    display: grid; place-items: center;
    transition: all .2s var(--e-out);
}
.checkbox input:checked ~ .box { background: var(--grad-brand); border-color: transparent; }
.checkbox input:checked ~ .box::after { content: ""; width: 5px; height: 9px; border: solid #052320; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px; }
.btn-block { width: 100%; padding: 14px; }
.auth-form .alt { font-size: 13px; color: var(--text-dim); text-align: center; margin-top: 22px; }
.auth-form .alt a { color: var(--brand); font-weight: 600; }

/* Single video page (player full) ------------------------ */
.player-page { padding: 0 0 60px; }
.player-bg {
    background: linear-gradient(180deg, rgba(0, 224, 199, .08), transparent 70%);
    padding: 28px 38px 40px;
    border-bottom: 1px solid var(--line);
}
.player-shell {
    max-width: 1180px; margin: 0 auto;
    background: #000; aspect-ratio: 16/9;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    position: relative;
}
.player-shell video { width: 100%; height: 100%; object-fit: contain; }
.player-info { max-width: 1180px; margin: 30px auto 0; padding: 0 38px; }
.player-info h1 { font-size: 28px; margin: 0 0 12px; letter-spacing: -.3px; }
.player-info .meta { display: flex; gap: 18px; color: var(--text-mute); font-size: 13px; margin-bottom: 20px; flex-wrap: wrap; }
.player-info .meta span { display: inline-flex; align-items: center; gap: 6px; }
.player-info .desc {
    color: var(--text-dim); font-size: 15px; line-height: 1.7;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 22px 26px;
    margin-bottom: 30px;
}

/* Comments ----------------------------------------------- */
.comments { max-width: 1180px; margin: 0 auto; padding: 0 38px; }
.comments h2 { font-size: 18px; margin: 0 0 18px; }
.comment-form {
    display: flex; gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 16px;
    margin-bottom: 22px;
}
.comment-form .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad-brand); flex-shrink: 0; display: grid; place-items: center; color: #052320; font-weight: 700; }
.comment-form-body { flex: 1; }
.comment-form textarea {
    width: 100%;
    padding: 10px 0;
    background: transparent;
    border: none;
    color: var(--text);
    resize: none;
    outline: none;
    min-height: 60px;
}
.comment-form .actions { display: flex; justify-content: flex-end; gap: 10px; }

.comment {
    display: flex; gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.comment .avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: var(--bg-3); display: grid; place-items: center; font-weight: 700; color: var(--text); font-size: 13px; }
.comment .body { flex: 1; }
.comment .top { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.comment .top b { font-size: 14px; }
.comment .top time { font-size: 12px; color: var(--text-mute); }
.comment p { margin: 0 0 6px; color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.comment .react { display: flex; gap: 14px; font-size: 12px; color: var(--text-mute); }
.comment .react button { display: inline-flex; align-items: center; gap: 5px; transition: color .2s; }
.comment .react button:hover { color: var(--brand); }

/* Mobile / Responsive ------------------------------------ */
.mobile-toggle { display: none; }
@media (max-width: 1080px) {
    .app { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        width: 300px;
        transform: translateX(-100%);
        transition: transform .35s var(--e-out);
    }
    .sidebar.open { transform: translateX(0); box-shadow: 30px 0 60px rgba(0,0,0,.5); }
    .mobile-toggle {
        display: grid; place-items: center;
        width: 40px; height: 40px;
        background: var(--bg-2); border: 1px solid var(--line);
        border-radius: 10px;
        color: var(--text);
    }
    .topbar { padding: 0 20px; gap: 14px; }
    .content { padding: 24px 20px 60px; }
    .hero { padding: 40px 28px; }
    .hero h1 { font-size: 34px; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-side { display: none; }
}
@media (max-width: 540px) {
    .video-grid { grid-template-columns: 1fr; }
    .video-list .video-card { grid-template-columns: 1fr; }
    .hero h1 { font-size: 28px; }
    .hero { padding: 30px 22px; }
}

/* Reveal animations -------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--e-out), transform .7s var(--e-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }

/* Toast --------------------------------------------------- */
.toast-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: var(--bg-elev);
    border: 1px solid var(--line-2);
    border-left: 3px solid var(--brand);
    border-radius: 12px;
    padding: 14px 18px;
    min-width: 280px;
    box-shadow: var(--shadow-md);
    display: flex; gap: 12px; align-items: center;
    animation: toast-in .35s var(--e-spring);
}
.toast.success { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--accent); }
.toast b { display: block; font-size: 13px; }
.toast small { color: var(--text-mute); font-size: 12px; }
@keyframes toast-in { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Empty state -------------------------------------------- */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}
.empty svg { width: 80px; height: 80px; opacity: .35; margin-bottom: 16px; }
.empty h3 { color: var(--text); margin: 0 0 6px; }

/* Contacts ----------------------------------------------- */
.contact-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 30px;
}
.contact-list { display: flex; flex-direction: column; gap: 18px; margin-top: 22px; }
.contact-list .item {
    display: flex; align-items: center; gap: 14px;
}
.contact-list .item .ico {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center;
}
.contact-list .item .ico svg { width: 20px; height: 20px; }
.contact-list .item small { display: block; font-size: 12px; color: var(--text-mute); margin-bottom: 2px; }
.contact-list .item b { font-size: 15px; }

/* Video card links --------------------------------------- */
.video-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.video-card-link:hover { color: inherit; }
.video-card-list { display: grid; grid-template-columns: 320px 1fr; }

/* Access badges ------------------------------------------ */
.video-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 3;
    pointer-events: none;
}
.access-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.access-badge svg { width: 12px; height: 12px; }
.access-badge.free { background: rgba(74, 222, 128, .2); color: var(--ok); border: 1px solid rgba(74, 222, 128, .35); }
.access-badge.paid { background: rgba(255, 184, 77, .15); color: var(--warn); border: 1px solid rgba(255, 184, 77, .3); }
.access-badge.large { position: static; display: inline-flex; font-size: 12px; padding: 6px 12px; margin-bottom: 12px; }

/* Paywall player ----------------------------------------- */
.player-shell {
    max-width: 1180px;
    margin: 0 auto;
    background: #000;
    aspect-ratio: 16/9;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    position: relative;
}
.player-shell video { width: 100%; height: 100%; object-fit: contain; }
.player-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-dim);
    padding: 40px;
    text-align: center;
}
.player-empty svg { width: 48px; height: 48px; opacity: .4; }
.paywall-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 12, .88);
    backdrop-filter: blur(6px);
    place-items: center;
    z-index: 10;
    padding: 30px;
}
.paywall-overlay.is-visible {
    display: grid;
}
.paywall-box {
    text-align: center;
    max-width: 420px;
}
.paywall-icon {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--warn);
    display: grid; place-items: center;
}
.paywall-icon svg { width: 26px; height: 26px; }
.paywall-box h3 { margin: 0 0 10px; font-size: 22px; }
.paywall-box p { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; line-height: 1.6; }
.paywall-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.player-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* CTA banner --------------------------------------------- */
.cta-banner {
    margin-top: 50px;
    padding: 36px 40px;
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, rgba(255, 59, 107, .12), rgba(0, 224, 199, .1));
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cta-banner h2 { margin: 0 0 8px; font-size: 22px; }
.cta-banner p { margin: 0; color: var(--text-dim); font-size: 14px; max-width: 520px; }

/* About page --------------------------------------------- */
.about-hero {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.about-avatar {
    width: 100px; height: 100px;
    border-radius: 24px;
    background: var(--grad-brand);
    display: grid; place-items: center;
    font-size: 42px;
    font-weight: 800;
    color: #052320;
    flex-shrink: 0;
}
.about-hero h1 { margin: 8px 0 12px; font-size: 32px; }
.about-lead { color: var(--text-dim); font-size: 16px; line-height: 1.7; max-width: 640px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.about-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 28px;
}
.about-card h3 { margin: 0 0 14px; font-size: 18px; }
.about-card p { color: var(--text-dim); font-size: 14px; line-height: 1.65; margin: 0 0 12px; }
.about-card.accent { background: linear-gradient(135deg, rgba(0, 224, 199, .08), rgba(0, 180, 255, .06)); border-color: rgba(0, 224, 199, .2); }
.about-list { list-style: none; padding: 0; margin: 0; }
.about-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.about-list li span { color: var(--text-mute); }

/* Pricing ------------------------------------------------ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    max-width: 720px;
    margin: 0 auto 40px;
}
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 32px 28px;
    position: relative;
    transition: transform .25s var(--e-out), border-color .25s;
}
.plan-card:hover { transform: translateY(-4px); border-color: rgba(0, 224, 199, .3); }
.plan-card.featured { border-color: rgba(0, 224, 199, .45); box-shadow: var(--shadow-glow); }
.plan-badge {
    position: absolute; top: -10px; right: 20px;
    background: var(--grad-brand);
    color: #052320;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}
.plan-card h3 { margin: 0 0 8px; font-size: 18px; }
.plan-price { font-size: 36px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
.plan-period { color: var(--text-mute); font-size: 13px; margin-bottom: 20px; }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 24px; }
.plan-card li {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: var(--text-dim);
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.plan-card li svg { color: var(--ok); width: 16px; height: 16px; flex-shrink: 0; }
.pricing-note {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 28px;
}
.pricing-note h3 { margin: 0 0 14px; }
.pricing-note ul { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 14px; line-height: 1.8; }
.sub-status { max-width: 480px; margin: 0 auto 30px; }
.sub-active {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px;
    background: rgba(74, 222, 128, .1);
    border: 1px solid rgba(74, 222, 128, .3);
    border-radius: var(--r-md);
    color: var(--ok);
}
.sub-active svg { width: 24px; height: 24px; flex-shrink: 0; }
.sub-active b { display: block; color: var(--text); }
.sub-active span { font-size: 13px; color: var(--text-dim); }

/* Profile ------------------------------------------------ */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px 28px;
    margin-bottom: 16px;
}
.profile-card h3 { margin: 0 0 12px; font-size: 16px; }
.profile-card p { color: var(--text-dim); font-size: 14px; margin: 0; }
.profile-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--grad-brand);
    display: grid; place-items: center;
    font-weight: 800;
    font-size: 22px;
    color: #052320;
    flex-shrink: 0;
}
.profile-card:first-child { display: flex; align-items: center; gap: 18px; }
.profile-card:first-child h2 { margin: 0 0 4px; font-size: 20px; }
.sub-ok, .sub-none { display: flex; align-items: center; gap: 8px; }
.sub-ok svg, .sub-none svg { width: 18px; height: 18px; }
.sub-ok { color: var(--ok); }
.sub-none svg { color: var(--warn); }

/* Misc --------------------------------------------------- */
.empty-inline { color: var(--text-mute); font-size: 14px; padding: 20px 0; }
.auth-prompt { padding: 20px; text-align: center; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); }
.auth-prompt p { margin: 0 0 14px; color: var(--text-dim); }
.field-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--text-mute); }
.admin-hint { font-size: 12px; color: var(--text-mute); margin-top: 20px; text-align: center; line-height: 1.5; }
.settings-list { list-style: none; padding: 0; margin: 16px 0 0; }
.settings-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.settings-list span { color: var(--text-mute); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.tbl-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Telegram ------------------------------------------------ */
.btn-tg {
    background: linear-gradient(135deg, #229ED9 0%, #1a8bc7 100%);
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(34, 158, 217, .35);
}
.btn-tg:hover { box-shadow: 0 12px 32px rgba(34, 158, 217, .5); color: #fff !important; filter: brightness(1.06); }
.btn-tg-outline {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(34, 158, 217, .12);
    color: #29a9eb !important;
    border: 1px solid rgba(34, 158, 217, .35);
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
}
.btn-tg-outline:hover { background: rgba(34, 158, 217, .22); color: #fff !important; }
.btn-tg-outline svg { width: 16px; height: 16px; }

.tg-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 32px;
    margin: 40px 0;
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, rgba(34, 158, 217, .18) 0%, rgba(34, 158, 217, .06) 50%, rgba(0, 224, 199, .06) 100%);
    border: 1px solid rgba(34, 158, 217, .28);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .3s var(--e-out), border-color .3s, box-shadow .3s;
}
.tg-banner:hover { color: inherit; transform: translateY(-3px); border-color: rgba(34, 158, 217, .5); box-shadow: 0 20px 50px rgba(34, 158, 217, .15); }
.tg-banner-glow {
    position: absolute; right: -80px; top: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(34, 158, 217, 0.35) 0%,
        rgba(34, 158, 217, 0.12) 35%,
        rgba(34, 158, 217, 0.04) 55%,
        transparent 72%);
    pointer-events: none;
}
.tg-banner-icon {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #229ED9, #1a7fb8);
    display: grid; place-items: center;
    flex-shrink: 0;
    box-shadow: 0 12px 30px rgba(34, 158, 217, .4);
    position: relative; z-index: 1;
}
.tg-banner-icon svg { width: 34px; height: 34px; color: #fff; }
.tg-banner-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.tg-banner-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #29a9eb;
    margin-bottom: 6px;
}
.tg-banner-body h3 { margin: 0 0 6px; font-size: 20px; }
.tg-banner-body p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.tg-banner-cta { flex-shrink: 0; position: relative; z-index: 1; }

.tg-sidebar-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-top: auto;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(34, 158, 217, .14), rgba(34, 158, 217, .06));
    border: 1px solid rgba(34, 158, 217, .25);
    text-decoration: none;
    color: inherit;
    transition: all .25s var(--e-out);
}
.tg-sidebar-card:hover { color: inherit; border-color: rgba(34, 158, 217, .45); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(34, 158, 217, .12); }
.tg-sidebar-card .tg-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: #229ED9;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.tg-sidebar-card .tg-icon svg { width: 20px; height: 20px; color: #fff; }
.tg-sidebar-card .tg-text { flex: 1; min-width: 0; }
.tg-sidebar-card .tg-text b { display: block; font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-sidebar-card .tg-text span { font-size: 11px; color: var(--text-mute); display: block; margin-top: 2px; line-height: 1.3; }
.tg-sidebar-card .tg-arrow { color: #29a9eb; font-weight: 700; font-size: 16px; }
.nav-item.tg-nav:hover { color: #29a9eb; }

.tg-compact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(34, 158, 217, .12);
    border: 1px solid rgba(34, 158, 217, .3);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all .25s var(--e-out);
}
.tg-compact:hover { color: #fff; background: #229ED9; border-color: #229ED9; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(34, 158, 217, .35); }
.tg-compact svg { width: 20px; height: 20px; color: #29a9eb; }
.tg-compact:hover svg { color: #fff; }
.tg-pill {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(34, 158, 217, .2);
    color: #29a9eb;
}
.tg-compact:hover .tg-pill { background: rgba(255,255,255,.2); color: #fff; }

.tg-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px 14px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #229ED9, #1a7fb8);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 12px 40px rgba(34, 158, 217, .45);
    transition: transform .25s var(--e-spring), box-shadow .25s;
    animation: tg-pulse 3s ease-in-out infinite;
}
.tg-float:hover { color: #fff; transform: translateY(-4px) scale(1.03); box-shadow: 0 16px 50px rgba(34, 158, 217, .55); }
.tg-float svg { width: 26px; height: 26px; }
.tg-float-label { padding-right: 4px; }
@keyframes tg-pulse {
    0%, 100% { box-shadow: 0 12px 40px rgba(34, 158, 217, .45); }
    50% { box-shadow: 0 12px 50px rgba(34, 158, 217, .65), 0 0 0 8px rgba(34, 158, 217, .12); }
}

.tg-feature-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 32px 36px;
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, rgba(34, 158, 217, .2), rgba(34, 158, 217, .05));
    border: 1px solid rgba(34, 158, 217, .3);
    text-decoration: none;
    color: inherit;
    transition: all .3s var(--e-out);
    position: relative;
    overflow: hidden;
}
.tg-feature-card::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(34, 158, 217, .25), transparent 50%);
    pointer-events: none;
}
.tg-feature-card:hover { color: inherit; transform: translateY(-4px); border-color: rgba(34, 158, 217, .5); box-shadow: 0 24px 60px rgba(34, 158, 217, .18); }
.tg-feature-icon {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: #229ED9;
    display: grid; place-items: center;
    flex-shrink: 0;
    box-shadow: 0 14px 36px rgba(34, 158, 217, .45);
    position: relative; z-index: 1;
}
.tg-feature-icon svg { width: 38px; height: 38px; color: #fff; }
.tg-feature-body { flex: 1; position: relative; z-index: 1; }
.tg-feature-body h2 { margin: 0 0 8px; font-size: 24px; }
.tg-feature-body p { margin: 0; color: var(--text-dim); font-size: 15px; max-width: 520px; }
.tg-feature-cta { position: relative; z-index: 1; flex-shrink: 0; }

.demo-banner {
    max-width: 640px;
    margin: 0 auto 28px;
    padding: 14px 20px;
    border-radius: var(--r-md);
    background: rgba(255, 184, 77, .1);
    border: 1px solid rgba(255, 184, 77, .3);
    color: #ffd592;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
}
.demo-banner b { color: var(--warn); }

.contact-list .item a { color: var(--text); transition: color .2s; }
.contact-list .item a:hover { color: var(--brand); }

.search-hint {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: var(--r-md);
    background: var(--bg-card);
    border: 1px solid var(--line);
    font-size: 14px;
    color: var(--text-dim);
}
.search-hint a { color: var(--brand); font-weight: 600; }
.search-hint strong { color: var(--text); }

.msg-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
.msg-item.unread { background: rgba(0, 224, 199, .04); margin: 0 -16px; padding: 18px 16px; border-radius: var(--r-md); }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.msg-head b { font-size: 15px; }
.msg-head span { color: var(--text-dim); font-size: 13px; }
.msg-head time { color: var(--text-mute); font-size: 12px; margin-left: auto; }
.msg-item p { margin: 0 0 12px; color: var(--text-dim); font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.compact-list .row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 768px) {
    .tg-banner { flex-direction: column; text-align: center; padding: 24px; }
    .tg-banner-cta { width: 100%; }
    .tg-banner-cta .btn { width: 100%; }
    .tg-feature-card { flex-direction: column; text-align: center; padding: 28px 24px; }
    .tg-float .tg-float-label { display: none; }
    .tg-float { padding: 14px; border-radius: 50%; }
}
