/*
Theme Name: NovaTube
Theme URI:
Author: Sand
Description: Premium gradient-accented video theme. Rich card effects, horizontal trending rows, featured hero, two-column single page, mobile drawer navigation, Inter font. Dark-only, mobile-first, SEO-optimized.
Version: 1.0.1
Requires at least: 5.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: novatube
Tags: video, dark-mode, gradient, responsive-layout, custom-colors, premium
*/

/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
    --nt-accent-1: #ec4899;
    --nt-accent-2: #8b5cf6;
    --nt-gradient: linear-gradient(135deg, var(--nt-accent-1), var(--nt-accent-2));
    --nt-gradient-h: linear-gradient(90deg, var(--nt-accent-1), var(--nt-accent-2));

    --nt-bg-0: #09090b;
    --nt-bg-1: #12121a;
    --nt-bg-2: #1a1a25;
    --nt-bg-3: #232330;

    --nt-text: #f1f1f6;
    --nt-text-2: #a1a1aa;
    --nt-text-3: #71717a;

    --nt-line: rgba(255,255,255,0.06);
    --nt-line-2: rgba(255,255,255,0.1);

    --nt-r: 12px;
    --nt-r-sm: 6px;
    --nt-r-full: 9999px;

    --nt-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --nt-fast: 0.15s;
    --nt-med: 0.3s;

    --nt-sh-card: 0 2px 8px rgba(0,0,0,0.3);
    --nt-sh-lift: 0 12px 40px rgba(0,0,0,0.5);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--nt-text);
    background: var(--nt-bg-0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; }

/* ========================================
   Layout
   ======================================== */
.nt-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.nt-content { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 16px 12px 32px; }

/* ========================================
   Gradient Stripe
   ======================================== */
.nt-stripe { height: 4px; background: var(--nt-gradient-h); }

/* ========================================
   Header
   ======================================== */
.nt-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9,9,11,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--nt-line);
}

.nt-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 12px;
    height: 56px;
}

.nt-logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.nt-logo-gradient {
    background: var(--nt-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nt-logo-white { color: var(--nt-text); }

.nt-topbar-spacer { flex: 1; }

/* Hamburger */
.nt-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 10px 8px;
    border-radius: var(--nt-r-sm);
}

.nt-hamburger span {
    display: block;
    height: 2px;
    background: var(--nt-text-2);
    border-radius: 1px;
    transition: transform 0.2s var(--nt-ease), opacity 0.2s;
}

.nt-hamburger.is-active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nt-hamburger.is-active span:nth-child(2) { opacity: 0; }
.nt-hamburger.is-active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Desktop search */
.nt-header-search {
    display: none;
    position: relative;
    max-width: 360px;
    width: 100%;
}

.nt-header-search input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    border: 1px solid var(--nt-line-2);
    border-radius: var(--nt-r-full);
    background: var(--nt-bg-1);
    color: var(--nt-text);
    font-size: 0.8125rem;
    outline: none;
    transition: border-color var(--nt-fast);
}

.nt-header-search input:focus { border-color: var(--nt-accent-1); }

.nt-header-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nt-text-3);
    pointer-events: none;
    line-height: 0;
}

.nt-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--nt-text-2);
    transition: color var(--nt-fast), background var(--nt-fast);
}

.nt-icon-btn:hover { color: var(--nt-text); background: var(--nt-bg-2); }

/* ========================================
   Off-Canvas Drawer
   ======================================== */
.nt-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--nt-bg-1);
    border-right: 1px solid var(--nt-line);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform var(--nt-med) var(--nt-ease);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nt-drawer.is-open { transform: translateX(0); }

.nt-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--nt-med), visibility var(--nt-med);
}

.nt-drawer-overlay.is-open { opacity: 1; visibility: visible; }

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

.nt-drawer-head .nt-logo { font-size: 1.125rem; }

.nt-drawer-nav { padding: 8px 12px; flex: 1; }

.nt-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--nt-text-2);
    border-radius: var(--nt-r-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--nt-fast), background var(--nt-fast);
}

.nt-drawer-nav a:hover,
.nt-drawer-nav a.active { color: var(--nt-text); background: var(--nt-bg-2); }

.nt-drawer-nav a.active { border-left: 3px solid; border-image: var(--nt-gradient) 1; }

.nt-nav-divider { height: 1px; background: var(--nt-line); margin: 8px 12px; }

.nt-drawer-search {
    padding: 12px 16px;
    border-top: 1px solid var(--nt-line);
}

.nt-drawer-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--nt-line-2);
    border-radius: var(--nt-r-sm);
    background: var(--nt-bg-2);
    color: var(--nt-text);
    font-size: 0.8125rem;
    outline: none;
}

/* ========================================
   Search Overlay
   ======================================== */
.nt-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(9,9,11,0.92);
    backdrop-filter: blur(8px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
}

.nt-search-overlay.is-open { display: flex; }

.nt-search-overlay form { position: relative; width: 90%; max-width: 520px; }

.nt-search-overlay input {
    width: 100%;
    padding: 16px 48px 16px 18px;
    border: 2px solid transparent;
    border-image: var(--nt-gradient) 1;
    border-radius: 0;
    background: var(--nt-bg-1);
    color: var(--nt-text);
    font-size: 1.125rem;
    outline: none;
}

.nt-search-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nt-text-3);
}

/* ========================================
   Hero Section
   ======================================== */
.nt-hero {
    position: relative;
    border-radius: var(--nt-r);
    overflow: hidden;
    margin-bottom: 24px;
    aspect-ratio: 21 / 9;
}

.nt-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nt-hero-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 30%, var(--nt-bg-0) 100%);
}

.nt-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
}

.nt-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--nt-gradient);
    border-radius: var(--nt-r-full);
    font-size: 0.6875rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nt-hero-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    max-width: 600px;
}

.nt-hero-title a { color: #fff; }
.nt-hero-title a:hover { opacity: 0.9; }

.nt-hero-meta {
    display: flex;
    gap: 14px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 14px;
}

.nt-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nt-btn-gradient {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--nt-gradient);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--nt-r-full);
    transition: opacity var(--nt-fast), transform var(--nt-fast);
}

.nt-btn-gradient:hover { opacity: 0.9; transform: translateY(-1px); }

/* ========================================
   Horizontal Scroll Row
   ======================================== */
.nt-section { margin-bottom: 28px; }

.nt-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.nt-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nt-section-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--nt-text-2);
    transition: color var(--nt-fast);
}

.nt-section-more:hover { color: var(--nt-accent-1); }

.nt-hscroll-wrap {
    position: relative;
}

.nt-hscroll-wrap::before,
.nt-hscroll-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 48px;
    z-index: 2;
    pointer-events: none;
    transition: opacity var(--nt-fast);
}

.nt-hscroll-wrap::before {
    left: 0;
    background: linear-gradient(to right, var(--nt-bg-0), transparent);
    opacity: 0;
}

.nt-hscroll-wrap::after {
    right: 0;
    background: linear-gradient(to left, var(--nt-bg-0), transparent);
}

.nt-hscroll-wrap.scroll-start::before { opacity: 0; }
.nt-hscroll-wrap.scroll-mid::before { opacity: 1; }
.nt-hscroll-wrap.scroll-end::after { opacity: 0; }

.nt-hscroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 4px;
}

.nt-hscroll::-webkit-scrollbar { display: none; }

.nt-hscroll .nt-card {
    flex: 0 0 42%;
    scroll-snap-align: start;
}

/* ========================================
   Category Chips
   ======================================== */
.nt-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 16px;
    scrollbar-width: none;
}

.nt-chips::-webkit-scrollbar { display: none; }

.nt-chip {
    flex-shrink: 0;
    padding: 6px 16px;
    border: 1px solid var(--nt-line-2);
    border-radius: var(--nt-r-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--nt-text-2);
    white-space: nowrap;
    transition: all var(--nt-fast) var(--nt-ease);
}

.nt-chip:hover { border-color: var(--nt-accent-1); color: var(--nt-accent-1); }

.nt-chip.active {
    background: var(--nt-gradient);
    border-color: transparent;
    color: #fff;
}

/* ========================================
   Video Grid
   ======================================== */
.nt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    content-visibility: auto;
    contain-intrinsic-size: auto 320px;
}

.nt-grid--editorial .nt-card:first-child {
    grid-column: span 1;
}

/* ========================================
   Video Card — The Premium Component
   ======================================== */
.nt-card {
    position: relative;
    border-radius: var(--nt-r);
    overflow: hidden;
    background: var(--nt-bg-1);
    contain: layout style;
    transition: transform var(--nt-med) var(--nt-ease), box-shadow var(--nt-med) var(--nt-ease);
}

/* Gradient hover border via mask trick */
.nt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--nt-r);
    padding: 2px;
    background: var(--nt-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--nt-med);
    z-index: 3;
    pointer-events: none;
}

.nt-card:hover::before { opacity: 1; }
.nt-card:hover { transform: translateY(-4px); box-shadow: var(--nt-sh-lift); }

.nt-card-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--nt-bg-2);
}

.nt-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--nt-med) var(--nt-ease);
}

.nt-card:hover .nt-card-thumb img { transform: scale(1.05); }

/* Gradient overlay on hover */
.nt-card-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(9,9,11,0.7));
    opacity: 0;
    transition: opacity var(--nt-med);
    pointer-events: none;
}

.nt-card:hover .nt-card-hover-overlay { opacity: 1; }

/* Play button — gradient circle */
.nt-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--nt-med);
    pointer-events: none;
}

.nt-card:hover .nt-card-play { opacity: 1; }

.nt-play-circle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nt-gradient);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(236,72,153,0.3);
}

.nt-play-circle svg {
    width: 16px;
    height: 16px;
    fill: #fff;
    margin-left: 2px;
}

/* Views badge — frosted glass (top-left) */
.nt-card-views {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 500;
    border-radius: var(--nt-r-sm);
    z-index: 2;
}

/* Duration badge — gradient (bottom-right) */
.nt-card-dur {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 3px 8px;
    background: var(--nt-gradient);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--nt-r-sm);
    z-index: 2;
    line-height: 1.3;
}

/* Rating bar — 3px gradient at bottom of thumbnail */
.nt-card-rating-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.08);
    z-index: 2;
}

.nt-card-rating-fill {
    height: 100%;
    background: var(--nt-gradient-h);
    border-radius: 0 2px 2px 0;
}

/* Card info */
.nt-card-info { padding: 10px 10px 12px; }

.nt-card-title {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nt-card-title a { color: var(--nt-text); transition: color var(--nt-fast); }
.nt-card-title a:hover { color: var(--nt-accent-1); }

.nt-card-sub {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.6875rem;
    color: var(--nt-text-3);
}

/* ========================================
   Page Title
   ======================================== */
.nt-page-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid;
    border-image: var(--nt-gradient) 1;
    display: inline-block;
}

/* ========================================
   Breadcrumbs
   ======================================== */
.nt-breadcrumbs {
    font-size: 0.75rem;
    color: var(--nt-text-3);
    margin-bottom: 14px;
    padding: 4px 0;
}

.nt-breadcrumbs a { color: var(--nt-text-2); transition: color var(--nt-fast); }
.nt-breadcrumbs a:hover { color: var(--nt-accent-1); }
.nt-breadcrumbs .sep { margin: 0 6px; opacity: 0.4; }

/* ========================================
   Single Video Page
   ======================================== */
.nt-single-layout {
    display: grid;
    gap: 24px;
}

.nt-player-zone {
    position: relative;
    margin-bottom: 16px;
}

.nt-player-glow {
    position: absolute;
    inset: -24px;
    background: radial-gradient(ellipse at center, rgba(236,72,153,0.12), rgba(139,92,246,0.08), transparent 70%);
    filter: blur(40px);
    z-index: -1;
    pointer-events: none;
}

.nt-player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--nt-r);
    overflow: hidden;
}

.nt-player-frame iframe,
.nt-player-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.nt-player-frame img { width: 100%; height: 100%; object-fit: cover; }

.nt-carousel-wrap { margin-bottom: 16px; }

.nt-detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.nt-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
    font-size: 0.75rem;
    color: var(--nt-text-2);
}

.nt-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nt-meta-chip--rating { color: var(--nt-accent-1); }

.nt-rating-bar {
    display: inline-block;
    width: 52px;
    height: 4px;
    background: var(--nt-bg-3);
    border-radius: 2px;
    overflow: hidden;
    vertical-align: middle;
    margin-left: 4px;
}

.nt-rating-fill {
    display: block;
    height: 100%;
    background: var(--nt-gradient-h);
    border-radius: 2px;
}

/* Download button */
.nt-download-section { margin-bottom: 16px; }

.nt-btn-gradient--block {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* Description */
.nt-desc { margin-bottom: 20px; }

.nt-desc-body {
    max-height: 120px;
    overflow: hidden;
    color: var(--nt-text-2);
    font-size: 0.8125rem;
    line-height: 1.7;
    transition: max-height var(--nt-med) var(--nt-ease);
}

.nt-desc-body.is-expanded { max-height: 3000px; }

.nt-desc-toggle {
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--nt-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Detail sections */
.nt-detail-section { margin-bottom: 20px; }

.nt-detail-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nt-text-2);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nt-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.nt-tag {
    padding: 5px 12px;
    background: var(--nt-bg-2);
    border: 1px solid var(--nt-line-2);
    border-radius: var(--nt-r-full);
    font-size: 0.75rem;
    color: var(--nt-text-2);
    transition: all var(--nt-fast);
}

.nt-tag:hover { border-color: var(--nt-accent-1); color: var(--nt-accent-1); }

.nt-stars-row { display: flex; flex-wrap: wrap; gap: 8px; }

.nt-star-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 4px;
    background: var(--nt-bg-2);
    border: 1px solid var(--nt-line-2);
    border-radius: var(--nt-r-full);
    font-size: 0.75rem;
    color: var(--nt-text-2);
    transition: border-color var(--nt-fast);
}

.nt-star-pill:hover { border-color: var(--nt-accent-1); }
.nt-star-pill img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.nt-star-pill-placeholder { width: 26px; height: 26px; border-radius: 50%; background: var(--nt-bg-3); }

/* Sidebar */
.nt-single-aside { display: none; }

.nt-aside-card {
    background: var(--nt-bg-1);
    border: 1px solid var(--nt-line);
    border-radius: var(--nt-r);
    padding: 16px;
    margin-bottom: 14px;
}

.nt-aside-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--nt-text);
}

.nt-info-list { list-style: none; }
.nt-info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--nt-line);
    font-size: 0.75rem;
}
.nt-info-list li:last-child { border-bottom: none; }
.nt-info-label { color: var(--nt-text-3); display: flex; align-items: center; gap: 6px; }
.nt-info-value { color: var(--nt-text); font-weight: 500; }
.nt-info-value--rating { display: flex; align-items: center; gap: 6px; color: var(--nt-accent-1); }

/* Related */
.nt-related { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--nt-line); }

/* Mobile stars (shown on mobile, hidden desktop) */
.nt-detail-section--desktop-stars { display: none; }

/* ========================================
   Archive Pages
   ======================================== */
.nt-archive-head { margin-bottom: 20px; }
.nt-archive-title { font-size: 1.25rem; font-weight: 700; }
.nt-archive-desc { margin-top: 6px; font-size: 0.8125rem; color: var(--nt-text-2); line-height: 1.6; }

.nt-star-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.nt-star-head-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    border-image: var(--nt-gradient) 1;
    border-radius: 50%;
    padding: 2px;
    background-origin: border-box;
    background-clip: content-box, border-box;
    background-image: linear-gradient(var(--nt-bg-0), var(--nt-bg-0)), var(--nt-gradient);
}

/* ========================================
   Term Grid
   ======================================== */
.nt-term-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.nt-term-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--nt-bg-1);
    border: 1px solid var(--nt-line);
    border-radius: var(--nt-r);
    transition: border-color var(--nt-fast), transform var(--nt-fast);
}

.nt-term-card:hover { border-color: var(--nt-accent-1); transform: translateY(-2px); }

.nt-term-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--nt-bg-3);
    flex-shrink: 0;
    object-fit: cover;
}

.nt-term-name { font-size: 0.8125rem; font-weight: 500; color: var(--nt-text); }
.nt-term-count { font-size: 0.6875rem; color: var(--nt-text-3); }

.nt-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ========================================
   Pagination
   ======================================== */
.nt-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 28px;
    padding: 12px 0;
}

.nt-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border-radius: var(--nt-r-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--nt-text-2);
    transition: all var(--nt-fast);
}

.nt-pagination a.page-numbers:hover { background: var(--nt-bg-2); color: var(--nt-text); }
.nt-pagination .page-numbers.current { background: var(--nt-gradient); color: #fff; font-weight: 600; }
.nt-pagination .page-numbers.dots { color: var(--nt-text-3); }

/* ========================================
   404
   ======================================== */
.nt-404 { text-align: center; padding: 60px 16px; }
.nt-404-num {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    background: var(--nt-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nt-404-text { margin-top: 12px; font-size: 1rem; color: var(--nt-text-2); }

/* ========================================
   Footer
   ======================================== */
.nt-footer {
    background: var(--nt-bg-1);
    border-top: 3px solid;
    border-image: var(--nt-gradient) 1;
    padding: 32px 16px;
    margin-top: auto;
}

.nt-footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nt-footer-brand .nt-logo { margin-bottom: 8px; }

.nt-footer-desc {
    font-size: 0.8125rem;
    color: var(--nt-text-3);
    line-height: 1.6;
    max-width: 600px;
}

.nt-footer-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.nt-footer-nav a {
    font-size: 0.8125rem;
    color: var(--nt-text-2);
    transition: color var(--nt-fast);
}

.nt-footer-nav a:hover { color: var(--nt-accent-1); }

.nt-footer-copy {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: var(--nt-text-3);
    max-width: 1440px;
    margin: 16px auto 0;
    padding-top: 16px;
    border-top: 1px solid var(--nt-line);
}

/* ========================================
   Mobile Bottom Bar
   ======================================== */
.nt-bottombar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    justify-content: space-around;
    background: rgba(9,9,11,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--nt-line);
    padding: 4px 0 env(safe-area-inset-bottom, 4px);
}

.nt-bottombar a,
.nt-bottombar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    font-size: 0.5625rem;
    color: var(--nt-text-3);
    transition: color var(--nt-fast);
    background: none;
    border: none;
}

.nt-bottombar a:hover,
.nt-bottombar button:hover,
.nt-bottombar a.active { color: var(--nt-accent-1); }

.has-bottom-nav { padding-bottom: 64px; }
.has-bottom-nav .nt-footer { padding-bottom: 64px; }

/* ========================================
   Search Form
   ======================================== */
.nt-searchform input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--nt-line-2);
    border-radius: var(--nt-r);
    background: var(--nt-bg-2);
    color: var(--nt-text);
    font-size: 0.875rem;
    outline: none;
}

.nt-searchform input:focus { border-color: var(--nt-accent-1); }

/* body scroll lock when drawer is open */
body.drawer-open { overflow: hidden; }

/* ========================================
   Responsive
   ======================================== */
@media (min-width: 540px) {
    .nt-grid { grid-template-columns: repeat(3, 1fr); }
    .nt-grid--editorial .nt-card:first-child { grid-column: span 2; }
    .nt-term-grid { grid-template-columns: repeat(3, 1fr); }
    .nt-hscroll .nt-card { flex: 0 0 30%; }
    .nt-hero-title { font-size: 1.5rem; }
}

@media (min-width: 900px) {
    .nt-grid { grid-template-columns: repeat(4, 1fr); }
    .nt-content { padding: 20px 20px 48px; }
    .nt-topbar { padding: 0 20px; }
    .nt-hamburger { display: none; }
    .nt-header-search { display: block; }
    .nt-btn-search-mobile { display: none; }
    .nt-bottombar { display: none; }
    .has-bottom-nav { padding-bottom: 0; }
    .has-bottom-nav .nt-footer { padding-bottom: 32px; }
    .nt-term-grid { grid-template-columns: repeat(4, 1fr); }
    .nt-hscroll .nt-card { flex: 0 0 22%; }
    .nt-hero { aspect-ratio: 21 / 7; }
    .nt-hero-title { font-size: 1.75rem; }
    .nt-hero-content { padding: 32px; }
    .nt-footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

@media (min-width: 1200px) {
    .nt-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; }
    .nt-content { padding: 24px 28px 56px; }
    .nt-topbar { padding: 0 28px; }
    .nt-term-grid { grid-template-columns: repeat(5, 1fr); }
    .nt-hscroll .nt-card { flex: 0 0 18%; }

    /* Two-column single page */
    .nt-single-layout { grid-template-columns: 1fr 320px; }
    .nt-single-aside { display: block; }
    .nt-detail-section--mobile-stars { display: none; }
    .nt-detail-section--desktop-stars { display: block; }
    .nt-mobile-download { display: none; }

    .nt-hero-content { padding: 40px; }
    .nt-hero-title { font-size: 2rem; }
}

/* ========================================
   Print
   ======================================== */
@media print {
    .nt-header, .nt-bottombar, .nt-pagination, .nt-drawer, .nt-drawer-overlay, .nt-search-overlay, .nt-stripe { display: none !important; }
    body { background: #fff; color: #000; }
}
