/* ═══════════════════════════════════════════════════════════════════
   ThePlay — Design System v4
   Premium Dark · Purple warmth · Visible glass · Bold accents
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────────────── */
:root {
    /* Backgrounds — warm dark purple, NOT flat black */
    --c-bg: #110F1F;
    --c-bg-warm: #161428;
    --c-bg-raised: #1A1832;
    --c-bg-card: rgba(255,255,255,0.045);
    --c-bg-card-hover: rgba(255,255,255,0.075);
    --c-bg-card-solid: #1E1B38;
    --c-bg-elevated: rgba(255,255,255,0.08);
    --c-bg-glass: rgba(22,20,40,0.75);
    --c-bg-section: #161428;
    --c-bg-section-alt: #110F1F;

    /* Borders — visible, luminous */
    --c-border: rgba(255,255,255,0.08);
    --c-border-hover: rgba(255,255,255,0.16);
    --c-border-active: rgba(255,255,255,0.24);
    --c-border-accent: rgba(99,91,255,0.35);
    --c-border-glow: rgba(99,91,255,0.25);

    /* Text — higher contrast */
    --c-text-primary: #F2F1F7;
    --c-text-secondary: #B5B0CC;
    --c-text-tertiary: #7D78A0;
    --c-text-quaternary: #524D70;

    /* Accent — bright, bold */
    --c-accent: #7C6FFF;
    --c-accent-hover: #9488FF;
    --c-accent-light: #AEA4FF;
    --c-accent-dim: rgba(124,111,255,0.15);
    --c-accent-dim-strong: rgba(124,111,255,0.25);
    --c-cyan: #22D3EE;
    --c-green: #34D399;
    --c-red: #FB7185;
    --c-amber: #FBBF24;

    /* Gradients — bold, visible */
    --g-accent: linear-gradient(135deg, #7C6FFF, #22D3EE);
    --g-accent-warm: linear-gradient(135deg, #7C6FFF, #C084FC);
    --g-accent-subtle: linear-gradient(135deg, rgba(124,111,255,0.14), rgba(34,211,238,0.08));
    --g-hero: radial-gradient(ellipse 80% 60% at 50% -5%, rgba(124,111,255,0.28) 0%, rgba(34,211,238,0.05) 40%, transparent 65%);
    --g-glow: radial-gradient(circle, rgba(124,111,255,0.14) 0%, transparent 70%);
    --g-card: linear-gradient(160deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.015) 100%);
    --g-card-border: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
    --g-section-glow: radial-gradient(ellipse 50% 40% at 50% 50%, rgba(124,111,255,0.07) 0%, transparent 100%);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.25);
    --shadow-xl: 0 16px 56px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
    --shadow-card: 0 0 0 1px var(--c-border), 0 2px 8px rgba(0,0,0,0.3), 0 8px 32px rgba(0,0,0,0.15);
    --shadow-card-hover: 0 0 0 1px var(--c-border-hover), 0 4px 16px rgba(0,0,0,0.4), 0 16px 48px rgba(0,0,0,0.2);
    --shadow-glow: 0 0 60px rgba(124,111,255,0.18);
    --shadow-glow-strong: 0 0 100px rgba(124,111,255,0.3);
    --shadow-accent: 0 4px 24px rgba(124,111,255,0.35);
    --shadow-accent-strong: 0 8px 48px rgba(124,111,255,0.4);

    /* Radii */
    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-2xl: 24px;
    --r-full: 9999px;

    /* Spacing */
    --s-section: clamp(80px, 10vh, 140px);
    --s-container: clamp(20px, 5vw, 80px);

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Dashboard compat */
    --bg: var(--c-bg);
    --bg-card: var(--c-bg-card-solid);
    --bg-hover: var(--c-bg-card-hover);
    --accent: var(--c-accent);
    --accent-dark: #6358CC;
    --accent-light: var(--c-accent-light);
    --text: var(--c-text-primary);
    --text-dim: var(--c-text-secondary);
    --text-muted: var(--c-text-tertiary);
    --danger: var(--c-red);
    --success: var(--c-green);
    --radius: var(--r-md);
    --radius-sm: var(--r-sm);
    --radius-lg: var(--r-lg);
    --glass-border: var(--c-border);
    --glass-border-hover: var(--c-border-hover);
    --bg-section: var(--c-bg-section);
    --bg-section-alt: var(--c-bg-section-alt);
}

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

body {
    font-family: var(--font);
    font-feature-settings: "ss01", "cv01";
    font-variant-numeric: tabular-nums;
    background: var(--c-bg);
    color: var(--c-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: rgba(99,91,255,0.3);
    color: #fff;
}

img { display: block; max-width: 100%; height: auto; }

/* ═══════════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════════ */
.tp-site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--s-container);
    height: 64px;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}

.tp-site-nav.scrolled,
.tp-site-nav.solid {
    background: rgba(17,15,31,0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom-color: var(--c-border);
}

.tp-site-nav__logo {
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    color: var(--c-text-primary);
    letter-spacing: -0.5px;
}

.tp-site-nav__logo-img {
    height: 26px;
    width: auto;
    display: block;
}

.tp-site-nav__links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.tp-site-nav__links a {
    color: var(--c-text-tertiary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.tp-site-nav__links a:hover,
.tp-site-nav__links a.active {
    color: var(--c-text-primary);
}

.tp-site-nav__links a.active {
    position: relative;
}

.tp-site-nav__links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--c-accent);
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(99,91,255,0.5);
}

.tp-site-nav__cta {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--c-text-secondary);
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-full);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.tp-site-nav__cta:hover {
    background: var(--c-bg-card-hover);
    border-color: var(--c-border-hover);
    color: var(--c-text-primary);
}

.tp-site-nav__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tp-site-nav__right .tp-site-nav__cta--register {
    color: #fff;
    background: var(--c-accent);
    border-color: var(--c-accent);
}

.tp-site-nav__right .tp-site-nav__cta--register:hover {
    background: var(--c-accent-hover);
    box-shadow: var(--shadow-accent);
    transform: translateY(-1px);
}

/* Language Dropdown */
.tp-lang-dropdown {
    position: relative;
}
.tp-lang-dropdown__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--c-text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.tp-lang-dropdown__btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
}
.tp-lang-dropdown__btn svg {
    transition: transform 0.2s;
}
.tp-lang-dropdown.open .tp-lang-dropdown__btn svg {
    transform: rotate(180deg);
}
.tp-lang-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--c-bg-secondary);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    z-index: 100;
}
.tp-lang-dropdown.open .tp-lang-dropdown__menu {
    display: block;
}
.tp-lang-dropdown__item {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--c-text-tertiary);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.tp-lang-dropdown__item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--c-text-primary);
}
.tp-lang-dropdown__item.active {
    color: var(--c-accent);
    font-weight: 600;
}

/* Hamburger */
.tp-site-nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.tp-site-nav__hamburger span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--c-text-secondary);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.tp-site-nav__hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.tp-site-nav__hamburger.open span:nth-child(2) { opacity: 0; }
.tp-site-nav__hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile-only nav items */
.tp-site-nav__links-mobile-only { display: none; }

/* Dashboard Nav Logo */
.tp-nav__logo { display: flex; align-items: center; text-decoration: none; }
.tp-nav__logo img { height: 26px; width: auto; display: block; }

/* ── Focus Visible (Accessibility) ──────────────────────────────── */
.tp-btn:focus-visible,
.tp-site-nav__cta:focus-visible,
.tp-hero__btn:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 1px;
}
a:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   HERO — Rich gradient background
   ═══════════════════════════════════════════════════════════════════ */
.tp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px var(--s-container) 60px;
    overflow: hidden;
    clip-path: inset(0);
}

.tp-hero__bg {
    position: absolute;
    inset: 0;
    background: var(--g-hero);
    pointer-events: none;
}

/* Subtle grid overlay */
.tp-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 0%, transparent 100%);
    pointer-events: none;
}

.tp-hero__content {
    position: relative;
    max-width: 900px;
    width: 100%;
}

.tp-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--c-accent-light);
    background: var(--c-accent-dim);
    border: 1px solid var(--c-border-accent);
    border-radius: var(--r-full);
    margin-bottom: 32px;
    box-shadow: 0 0 30px rgba(99,91,255,0.08);
}

.tp-hero__title {
    margin-bottom: 24px;
    line-height: 1;
}

.tp-hero__logo-img {
    height: clamp(56px, 9vw, 100px);
    width: auto;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 0 50px rgba(124,111,255,0.35)) drop-shadow(0 0 100px rgba(124,111,255,0.15));
}

.tp-hero__subtitle {
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--c-text-secondary);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 36px;
    text-wrap: balance;
}

.tp-hero__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.tp-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    border-radius: var(--r-full);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tp-hero__btn--primary {
    color: #fff;
    background: var(--c-accent);
    border: 1px solid var(--c-accent);
    box-shadow: 0 0 24px rgba(124,111,255,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

.tp-hero__btn--primary:hover {
    background: var(--c-accent-hover);
    box-shadow: var(--shadow-accent-strong), inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.tp-hero__btn--ghost {
    color: var(--c-text-secondary);
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    backdrop-filter: blur(8px);
}

.tp-hero__btn--ghost:hover {
    color: var(--c-text-primary);
    border-color: var(--c-border-hover);
    background: var(--c-bg-card-hover);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* TV Frame */
.tp-hero__tv-wrap {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.tp-hero__tv-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 160%;
    background: radial-gradient(ellipse at center, rgba(124,111,255,0.18) 0%, rgba(34,211,238,0.06) 40%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
}

.tp-hero__tv {
    position: relative;
    z-index: 1;
}

.tp-hero__tv-bezel {
    background: linear-gradient(180deg, #252340 0%, #18163A 100%);
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 80px rgba(124,111,255,0.08);
}

.tp-hero__tv-screen {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #050508;
}

.tp-hero__tv-stand {
    width: 24%;
    height: 16px;
    margin: 0 auto;
    background: linear-gradient(180deg, #252340, #18163A);
    clip-path: polygon(12% 0, 88% 0, 100% 100%, 0% 100%);
}

/* Carousel */
.tp-carousel { position: absolute; inset: 0; }
.tp-carousel__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.7s ease;
}
.tp-carousel__slide--active { opacity: 1; }

.tp-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    position: relative;
    z-index: 5;
}

.tp-carousel__dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    border: none;
    background: var(--c-text-quaternary);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}

.tp-carousel__dot--active {
    background: var(--c-accent);
    width: 20px;
    box-shadow: 0 0 12px rgba(99,91,255,0.6);
}

/* Floating pills — glass effect */
.tp-hero__floats {
    position: absolute;
    inset: -24px;
    pointer-events: none;
    z-index: 2;
}

.tp-hero__float {
    position: absolute;
    padding: 7px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--c-text-secondary);
    background: rgba(18,17,32,0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--c-border);
    border-radius: var(--r-full);
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    animation: floatPill 5s ease-in-out infinite;
}

.tp-hero__float--tl { top: 10%; left: -6%; animation-delay: 0s; }
.tp-hero__float--tr { top: 6%; right: -4%; animation-delay: 1.2s; }
.tp-hero__float--bl { bottom: 20%; left: -8%; animation-delay: 2.4s; }
.tp-hero__float--br { bottom: 16%; right: -6%; animation-delay: 0.6s; }

@keyframes floatPill {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.tp-hero__scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 32px;
    border: 1.5px solid var(--c-border-hover);
    border-radius: 10px;
    display: flex;
    justify-content: center;
}

.tp-hero__scroll::after {
    content: '';
    width: 3px;
    height: 6px;
    background: var(--c-accent);
    border-radius: 2px;
    margin-top: 6px;
    animation: scrollDot 2.5s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(99,91,255,0.5);
}

@keyframes scrollDot {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.2; transform: translateY(10px); }
}

/* ═══════════════════════════════════════════════════════════════════
   PAIN POINT — with glow backdrop
   ═══════════════════════════════════════════════════════════════════ */
.tp-pain {
    text-align: center;
    padding: var(--s-section) var(--s-container);
    background: var(--c-bg);
    border-top: 1px solid var(--c-border);
    position: relative;
    overflow: hidden;
}

.tp-pain::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(124,111,255,0.10) 0%, transparent 60%);
    pointer-events: none;
}

.tp-pain__title {
    font-size: clamp(22px, 3.5vw, 34px);
    font-weight: 700;
    color: var(--c-text-primary);
    max-width: 600px;
    margin: 0 auto 16px;
    text-wrap: balance;
    letter-spacing: -0.5px;
    position: relative;
}

.tp-pain__text {
    font-size: 16px;
    color: var(--c-text-tertiary);
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════════
   SHOWCASE SECTIONS — alternating bg for depth
   ═══════════════════════════════════════════════════════════════════ */
.tp-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(40px, 6vw, 100px);
    padding: var(--s-section) var(--s-container);
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
}

.tp-showcase--left .tp-showcase__visual { order: -1; }

.tp-showcase__label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--c-accent-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.tp-showcase__title {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 16px;
    text-wrap: balance;
    color: var(--c-text-primary);
}

.tp-gradient-text {
    background: var(--g-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tp-showcase__desc {
    font-size: 15px;
    color: var(--c-text-secondary);
    line-height: 1.7;
    max-width: 400px;
}

.tp-showcase__bullets {
    list-style: none;
    margin-top: 20px;
    padding: 0;
}

.tp-showcase__bullets li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: var(--c-text-tertiary);
    line-height: 2.0;
}

.tp-showcase__bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-accent);
    box-shadow: 0 0 8px rgba(99,91,255,0.5);
}

/* TV in showcase */
.tp-showcase__tv {
    width: 100%;
    max-width: 560px;
}

.tp-showcase__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Pairing visual */
.tp-showcase__pair {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.tp-showcase__phone {
    width: 140px;
    background: linear-gradient(180deg, #1E1D30, #12112A);
    border-radius: 20px;
    padding: 6px;
    box-shadow: var(--shadow-xl);
}

.tp-showcase__phone-notch {
    width: 40%;
    height: 5px;
    margin: 3px auto 6px;
    background: #0A0A14;
    border-radius: 3px;
}

.tp-showcase__phone-screen {
    background: #0A0A14;
    border-radius: 14px;
    padding: 10px 8px;
    min-height: 240px;
    font-size: 7px;
    color: var(--c-text-tertiary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tp-showcase__phone-title {
    font-size: 9px;
    font-weight: 700;
    color: var(--c-text-secondary);
}

.tp-showcase__phone-card {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 6px;
    padding: 6px;
    line-height: 1.5;
}

.tp-showcase__phone-btn {
    margin-top: auto;
    background: var(--c-accent);
    color: #fff;
    font-size: 7px;
    font-weight: 600;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
}

.tp-showcase__pair-bridge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.tp-showcase__pair-line {
    width: 40px;
    border-top: 1.5px dashed var(--c-border-hover);
}

.tp-showcase__pair-code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--c-accent-light);
    padding: 5px 12px;
    background: var(--c-accent-dim);
    border: 1px solid var(--c-border-accent);
    border-radius: var(--r-sm);
    box-shadow: 0 0 20px rgba(99,91,255,0.1);
}

.tp-showcase__pair-tv { width: 180px; }

/* ═══════════════════════════════════════════════════════════════════
   THEME PICKER
   ═══════════════════════════════════════════════════════════════════ */
.tp-showcase-themes {
    padding: var(--s-section) var(--s-container);
    text-align: center;
    background: var(--c-bg-section);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    position: relative;
}

.tp-showcase-themes::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 400px;
    background: var(--g-section-glow);
    pointer-events: none;
}

.tp-showcase-themes__header {
    max-width: 500px;
    margin: 0 auto 48px;
    position: relative;
}

.tp-showcase-themes__tv-wrap {
    max-width: 600px;
    margin: 0 auto 32px;
    position: relative;
}

.tp-theme-picker {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
}

.tp-theme-picker__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--c-bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--c-border);
    border-radius: var(--r-full);
    color: var(--c-text-tertiary);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
}

.tp-theme-picker__btn:hover {
    border-color: var(--tc);
    color: var(--c-text-secondary);
}

.tp-theme-picker__btn--active {
    border-color: var(--tc);
    color: var(--c-text-primary);
    box-shadow: 0 0 20px color-mix(in srgb, var(--tc) 25%, transparent);
}

.tp-theme-picker__color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tc);
    box-shadow: 0 0 6px var(--tc);
}

.tp-theme-picker__name {}

/* ═══════════════════════════════════════════════════════════════════
   STATS — with accent glow
   ═══════════════════════════════════════════════════════════════════ */
.tp-stats {
    display: flex;
    justify-content: center;
    gap: clamp(48px, 8vw, 120px);
    padding: 80px var(--s-container);
    background: var(--c-bg);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    position: relative;
}

.tp-stats::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 200px;
    background: var(--g-section-glow);
    pointer-events: none;
}

.tp-stats__item { text-align: center; position: relative; }

.tp-stats__number {
    display: block;
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    letter-spacing: -2px;
    background: var(--g-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    filter: drop-shadow(0 0 20px rgba(99,91,255,0.15));
}

.tp-stats__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text-quaternary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   FINALE CTA — rich gradient background
   ═══════════════════════════════════════════════════════════════════ */
.tp-finale {
    text-align: center;
    padding: var(--s-section) var(--s-container);
    position: relative;
    background: linear-gradient(180deg, var(--c-bg-section) 0%, #0D0B1A 100%);
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(124,111,255,0.2), transparent) 1;
    overflow: hidden;
}

.tp-finale::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124,111,255,0.15) 0%, rgba(34,211,238,0.03) 40%, transparent 60%);
    pointer-events: none;
}

.tp-finale__title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
    position: relative;
    text-wrap: balance;
}

.tp-finale__desc {
    font-size: 16px;
    color: var(--c-text-tertiary);
    margin-bottom: 32px;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */
.tp-site-footer {
    border-top: 1px solid var(--c-border);
    padding: 48px var(--s-container) 32px;
    text-align: center;
    background: var(--c-bg);
}

.tp-site-footer__links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tp-site-footer__links a {
    color: var(--c-text-quaternary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.tp-site-footer__links a:hover { color: var(--c-text-secondary); }

.tp-site-footer__copy {
    color: var(--c-text-quaternary);
    font-size: 12px;
}

.tp-site-footer__badge {
    display: inline-block;
    margin-top: 12px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 500;
    color: var(--c-text-quaternary);
    border: 1px solid var(--c-border);
    border-radius: var(--r-full);
}

/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════ */
.animate-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-in.delay-1 { transition-delay: 0.1s; }
.animate-in.delay-2 { transition-delay: 0.2s; }
.animate-in.delay-3 { transition-delay: 0.3s; }

/* ═══════════════════════════════════════════════════════════════════
   FEATURES PAGE — Glass cards with glow
   ═══════════════════════════════════════════════════════════════════ */
.tp-site-section {
    padding: var(--s-section) var(--s-container);
}

.tp-site-section--alt {
    background: var(--c-bg-section);
}

.tp-site-section__header {
    text-align: center;
    max-width: 540px;
    margin: 0 auto 64px;
}

.tp-site-section__label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--c-accent-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.tp-site-section__title {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    text-wrap: balance;
    color: var(--c-text-primary);
}

.tp-site-section__desc {
    font-size: 15px;
    color: var(--c-text-secondary);
    line-height: 1.7;
}

/* ── Bento Grid — connected cells, inner dividers only ──────────── */
.tp-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 1100px;
    margin: 0 auto;
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--c-bg-card);
}

.tp-bento--3 {
    grid-template-columns: repeat(3, 1fr);
}

.tp-bento__cell {
    padding: 32px 28px;
    position: relative;
    transition: background 0.3s;
}

.tp-bento__cell:hover {
    background: rgba(124,111,255,0.04);
}

/* Inner dividers: right border on left cells, bottom border on top row */
.tp-bento__cell:nth-child(odd) {
    border-right: 1px solid var(--c-border);
}

.tp-bento__cell:nth-child(-n+2) {
    border-bottom: 1px solid var(--c-border);
}

/* 3-col variant dividers */
.tp-bento--3 .tp-bento__cell:nth-child(odd) {
    border-right: none;
}
.tp-bento--3 .tp-bento__cell:nth-child(-n+2) {
    border-bottom: none;
}
.tp-bento--3 .tp-bento__cell:not(:nth-child(3n)) {
    border-right: 1px solid var(--c-border);
}

.tp-bento__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-accent-light);
    margin-bottom: 16px;
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s;
}

.tp-bento__cell:hover .tp-bento__icon {
    opacity: 1;
    transform: scale(1.08);
}

.tp-bento__icon svg {
    width: 24px;
    height: 24px;
}

.tp-bento__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--c-text-primary);
}

.tp-bento__text {
    font-size: 13px;
    color: var(--c-text-tertiary);
    line-height: 1.65;
}

.tp-feat-category {
    max-width: 1100px;
    margin: 0 auto 64px;
}

.tp-feat-category__title {
    font-size: 11px;
    font-weight: 700;
    color: var(--c-accent-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    padding-left: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   CTA BANNER — glassmorphism
   ═══════════════════════════════════════════════════════════════════ */
.tp-cta-banner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 56px 48px;
    background: var(--c-bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--c-border);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
}

.tp-cta-banner__title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--c-text-primary);
}

.tp-cta-banner__text {
    font-size: 15px;
    color: var(--c-text-secondary);
    margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════════════════════════════ */
.tp-faq-list {
    max-width: 680px;
    margin: 0 auto;
}

.tp-faq__category {
    font-size: 11px;
    font-weight: 700;
    color: var(--c-accent-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 40px 0 12px;
}

.tp-faq__category:first-child { margin-top: 0; }

.tp-faq__item {
    border-bottom: 1px solid var(--c-border);
}

.tp-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    color: var(--c-text-primary);
}

.tp-faq__question:hover { color: var(--c-accent-light); }

.tp-faq__question::after {
    content: '+';
    font-size: 18px;
    font-weight: 300;
    color: var(--c-text-quaternary);
    transition: transform 0.3s, color 0.3s;
    flex-shrink: 0;
    margin-left: 16px;
}

.tp-faq__item.open .tp-faq__question::after {
    transform: rotate(45deg);
    color: var(--c-accent);
}

.tp-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.tp-faq__item.open .tp-faq__answer { max-height: 500px; padding-bottom: 18px; }

.tp-faq__answer p {
    font-size: 14px;
    color: var(--c-text-tertiary);
    line-height: 1.7;
}

.tp-faq__answer code {
    background: var(--c-accent-dim);
    color: var(--c-accent-light);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════
   DOCS
   ═══════════════════════════════════════════════════════════════════ */
.tp-docs {
    display: flex;
    gap: 48px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px var(--s-container);
}

.tp-docs__nav {
    position: sticky;
    top: 88px;
    width: 200px;
    flex-shrink: 0;
    align-self: flex-start;
}

.tp-docs__nav-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--c-text-quaternary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.tp-docs__nav a {
    display: block;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--c-text-quaternary);
    text-decoration: none;
    border-left: 1.5px solid transparent;
    transition: all 0.2s;
}

.tp-docs__nav a:hover { color: var(--c-text-secondary); }

.tp-docs__nav a.active {
    color: var(--c-accent-light);
    border-left-color: var(--c-accent);
}

.tp-docs__content { flex: 1; min-width: 0; }

.tp-docs__section {
    margin-bottom: 56px;
    scroll-margin-top: 88px;
}

.tp-docs__section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    color: var(--c-text-primary);
}

.tp-docs__section h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 24px 0 10px;
    color: var(--c-text-primary);
}

.tp-docs__section p {
    font-size: 14px;
    color: var(--c-text-secondary);
    line-height: 1.75;
    margin-bottom: 14px;
}

.tp-docs__section ul {
    margin: 0 0 14px 20px;
    color: var(--c-text-secondary);
    font-size: 14px;
    line-height: 1.75;
}

.tp-docs__section code {
    background: var(--c-accent-dim);
    color: var(--c-accent-light);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 13px;
}

.tp-docs__section pre {
    background: var(--c-bg-raised);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    padding: 18px 20px;
    overflow-x: auto;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--c-text-secondary);
}

.tp-docs__section pre code { background: none; padding: 0; color: inherit; }

.tp-docs__section table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
    font-size: 13px;
}

.tp-docs__section th, .tp-docs__section td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--c-border);
}

.tp-docs__section th {
    color: var(--c-text-primary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tp-docs__section td { color: var(--c-text-secondary); }

/* ═══════════════════════════════════════════════════════════════════
   AUTH (Login / Register) — glass card
   ═══════════════════════════════════════════════════════════════════ */
.tp-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 100px 20px 60px;
    position: relative;
}

.tp-auth::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 400px;
    background: radial-gradient(circle, rgba(99,91,255,0.10) 0%, transparent 60%);
    pointer-events: none;
}

.tp-auth__card {
    background: var(--c-bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--c-border);
    border-radius: var(--r-2xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.tp-auth__logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--c-text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.tp-auth__subtitle {
    color: var(--c-text-tertiary);
    margin-bottom: 28px;
    font-size: 14px;
}

.tp-auth__form { text-align: left; }

.tp-auth__footer {
    margin-top: 20px;
    font-size: 13px;
    color: var(--c-text-tertiary);
}

.tp-auth__footer a { color: var(--c-accent-light); text-decoration: none; font-weight: 500; }
.tp-auth__footer a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════
   FORMS (shared)
   ═══════════════════════════════════════════════════════════════════ */
.tp-form-group { margin-bottom: 14px; }

.tp-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text-tertiary);
    margin-bottom: 5px;
}

.tp-form-group input,
.tp-form-group select {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: var(--font);
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    color: var(--c-text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tp-form-group input:focus,
.tp-form-group select:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(99,91,255,0.12), 0 0 20px rgba(99,91,255,0.06);
}

.tp-form-group input::placeholder { color: var(--c-text-quaternary); }

.tp-form-error {
    background: rgba(255,68,102,0.08);
    color: var(--c-red);
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,68,102,0.15);
}

.tp-input--code {
    font-size: 24px !important;
    text-align: center;
    letter-spacing: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS (shared)
   ═══════════════════════════════════════════════════════════════════ */
.tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    background: var(--c-bg-card);
    color: var(--c-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.tp-btn:hover {
    background: var(--c-bg-card-hover);
    color: var(--c-text-primary);
    border-color: var(--c-border-hover);
}

.tp-btn--primary {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #fff;
    box-shadow: 0 0 16px rgba(99,91,255,0.15);
}

.tp-btn--primary:hover {
    background: var(--c-accent-hover);
    box-shadow: var(--shadow-accent);
    transform: translateY(-1px);
}

.tp-btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tp-btn--danger {
    color: var(--c-text-tertiary);
}

.tp-btn--danger:hover {
    background: rgba(255,68,102,0.08);
    border-color: var(--c-red);
    color: var(--c-red);
}

.tp-btn--sm { padding: 7px 14px; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════ */
.tp-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.tp-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--r-md);
    background: var(--c-bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-primary);
    pointer-events: auto;
    animation: toastIn 0.3s ease-out;
    max-width: 380px;
}

.tp-toast--success { border-left: 3px solid var(--c-green); }
.tp-toast--error { border-left: 3px solid var(--c-red); }
.tp-toast--info { border-left: 3px solid var(--c-accent); }

.tp-toast.leaving {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD — glass panels
   ═══════════════════════════════════════════════════════════════════ */
.tp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 60px;
    background: rgba(17,15,31,0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 1px 0 rgba(124,111,255,0.04);
}

.tp-nav__logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--c-text-primary);
}

.tp-nav__right { display: flex; align-items: center; gap: 12px; }
.tp-nav__user { color: var(--c-text-tertiary); font-size: 13px; font-weight: 500; }

.tp-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px;
}

.tp-section { margin-bottom: 48px; }

.tp-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.tp-section__header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-text-primary);
    letter-spacing: -0.3px;
}

.tp-empty {
    color: var(--c-text-quaternary);
    font-size: 14px;
    text-align: center;
    padding: 48px 32px;
    background: var(--c-bg-card);
    border: 1px dashed var(--c-border);
    border-radius: var(--r-lg);
}

.tp-cards { display: flex; flex-direction: column; gap: 12px; }

.tp-card {
    background: var(--g-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 20px 24px;
    transition: all 0.25s;
    box-shadow: var(--shadow-card);
    position: relative;
}

.tp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    border-radius: var(--r-md) var(--r-md) 0 0;
}

.tp-card:hover {
    border-color: var(--c-border-glow);
    box-shadow: var(--shadow-card-hover), 0 0 30px rgba(99,91,255,0.05);
}

.tp-card__header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.tp-card__title { font-size: 15px; font-weight: 600; color: var(--c-text-primary); }
.tp-card__meta { font-size: 12px; color: var(--c-text-quaternary); font-weight: 500; }
.tp-card__body { margin-bottom: 12px; }
.tp-card__info { font-size: 13px; color: var(--c-text-tertiary); margin-bottom: 3px; }
.tp-card__url { font-family: 'SF Mono', 'Fira Code', monospace; word-break: break-all; font-size: 12px; }
.tp-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Modal — glass */
.tp-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1000; }
.tp-modal[hidden] { display: none; }
.tp-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); }
.tp-modal__content {
    position: relative;
    background: var(--c-bg-raised);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    padding: 32px;
    width: 100%;
    max-width: 440px;
    z-index: 1;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.tp-modal__content h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--c-text-primary); }
.tp-modal__content > p { color: var(--c-text-secondary); font-size: 14px; margin-bottom: 20px; }
.tp-modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.tp-assign-list { max-height: 280px; overflow-y: auto; }
.tp-assign-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; cursor: pointer; border-radius: var(--r-sm); transition: background 0.15s; }
.tp-assign-item:hover { background: var(--c-bg-card-hover); }
.tp-assign-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--c-accent); }

/* Confirm Modal */
.tp-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* Loading spinner */
.tp-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.tp-spinner--dark {
    border-color: var(--c-border);
    border-top-color: var(--c-accent);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Badges ─────────────────────────────────────────────────────── */
.tp-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 8px;
}
.tp-badge--muted {
    background: rgba(255,255,255,0.06);
    color: var(--c-text-tertiary);
}
.tp-badge--warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.tp-badge--accent {
    background: var(--g-accent);
    color: #fff;
}
.tp-badge--success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.tp-badge--danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ── Feature Flag Toggle ───────────────────────────────────────── */
.tp-feature-flag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tp-feature-flag__info {
    flex: 1;
    min-width: 0;
}
.tp-feature-flag__label {
    color: var(--c-text-primary);
    font-size: 0.9rem;
}
.tp-feature-flag__desc {
    color: var(--c-text-tertiary);
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.tp-toggle {
    position: relative;
    width: 2.8rem;
    height: 1.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    border: none;
}
.tp-toggle.active {
    background: var(--c-accent);
}
.tp-toggle::after {
    content: '';
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.tp-toggle.active::after {
    transform: translateX(1.3rem);
}

/* ── Admin Section ─────────────────────────────────────────────── */
.tp-section-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tp-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tp-admin-table th,
.tp-admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}
.tp-admin-table th {
    color: var(--c-text-tertiary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tp-admin-table td {
    color: var(--c-text-secondary);
}
.tp-admin-table tr:hover td {
    background: var(--c-bg-card);
}

/* ═══════════════════════════════════════════════════════════════════
   404 ERROR PAGE
   ═══════════════════════════════════════════════════════════════════ */
.tp-error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
}

.tp-error-card {
    background: var(--c-bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--c-border);
    border-radius: var(--r-2xl);
    padding: 56px 48px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.tp-error-code {
    font-size: 80px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 16px;
    background: var(--g-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(99,91,255,0.2));
}

.tp-error-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--c-text-primary);
    margin-bottom: 10px;
}

.tp-error-desc {
    color: var(--c-text-tertiary);
    margin-bottom: 28px;
    font-size: 14px;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════
   GRADIENT DIVIDERS & SECTION ACCENTS
   ═══════════════════════════════════════════════════════════════════ */

/* Gradient line between sections */
.tp-pain,
.tp-showcase-themes,
.tp-stats {
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(124,111,255,0.2), transparent) 1;
}

.tp-stats {
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(124,111,255,0.2), transparent) 1;
}

/* Alternating section backgrounds — visible difference */
.tp-showcase:nth-child(even) {
    background: var(--c-bg-section);
}

/* Phone in pairing section — purple tint */
.tp-showcase__phone {
    background: linear-gradient(180deg, #252340, #18163A) !important;
}

/* CTA banner — visible glow */
.tp-cta-banner::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--r-2xl);
    background: linear-gradient(135deg, rgba(124,111,255,0.15), transparent 50%, rgba(34,211,238,0.08));
    z-index: -1;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    padding: 1px;
}

/* Auth card — visible gradient border */
.tp-auth__card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--r-2xl);
    background: linear-gradient(160deg, rgba(124,111,255,0.2), transparent 40%, rgba(34,211,238,0.06));
    z-index: -1;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    padding: 1px;
}

/* Dashboard cards — accent left bar on hover */
.tp-card:hover {
    border-left: 2px solid var(--c-accent);
}

/* Modal glow backdrop */
.tp-modal__content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 30%, rgba(124,111,255,0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .tp-site-nav { height: 56px; }
    .tp-site-nav__links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: rgba(17,15,31,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 72px 28px 28px;
        gap: 20px;
        transition: right 0.3s ease;
        border-left: 1px solid var(--c-border);
        z-index: 99;
    }
    .tp-site-nav__links.open { right: 0; }
    .tp-site-nav__links a { font-size: 16px; }
    .tp-site-nav__links-mobile-only { display: list-item; }
    .tp-site-nav__hamburger { display: flex; z-index: 100; }
    .tp-site-nav__right .tp-site-nav__cta,
    .tp-site-nav__right .tp-site-nav__cta--register { display: none; }
    .tp-site-nav__right { gap: 8px; }
    .tp-site-nav__logo-img { height: 22px; }

    .tp-hero { padding: 100px 20px 40px; min-height: auto; }
    .tp-hero__title { font-size: clamp(44px, 12vw, 68px); }
    .tp-hero__floats { display: none; }

    .tp-showcase {
        grid-template-columns: 1fr;
        padding: 60px 20px;
        gap: 32px;
    }
    .tp-showcase--left .tp-showcase__visual { order: 0; }
    .tp-showcase__tv { max-width: 100%; margin: 0 auto; }
    .tp-showcase__desc { max-width: 100%; }

    .tp-showcase-themes { padding: 60px 20px; }
    .tp-theme-picker__name { display: none; }
    .tp-theme-picker__btn { padding: 8px 14px; }

    .tp-showcase__pair { flex-direction: column; }
    .tp-showcase__pair-bridge { transform: rotate(90deg); }
    .tp-showcase__pair-tv { width: 80%; max-width: 300px; }

    .tp-stats { flex-wrap: wrap; gap: 24px 40px; padding: 48px 20px; }

    .tp-site-section { padding: 60px 20px; }
    .tp-bento { grid-template-columns: 1fr; }
    .tp-bento--3 { grid-template-columns: 1fr; }
    .tp-bento__cell:nth-child(odd) { border-right: none; }
    .tp-bento__cell:not(:last-child) { border-bottom: 1px solid var(--c-border); }
    .tp-bento__cell:nth-child(-n+2) { border-bottom: 1px solid var(--c-border); }
    .tp-bento--3 .tp-bento__cell:not(:nth-child(3n)) { border-right: none; }

    .tp-docs { flex-direction: column; padding: 72px 20px; gap: 24px; }
    .tp-docs__nav {
        position: static;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
    }
    .tp-docs__nav-title { display: none; }
    .tp-docs__nav a { border-left: none; padding: 6px 12px; font-size: 12px; border-radius: var(--r-full); }
    .tp-docs__nav a.active { border-left: none; background: var(--c-accent-dim); }

    .tp-pain { padding: 60px 20px; }
    .tp-finale { padding: 60px 20px; }
    .tp-cta-banner { padding: 36px 20px; }
    .tp-nav { padding: 0 16px; }
    .tp-main { padding: 24px 16px; }
    .tp-auth__card { padding: 32px 24px; }
    .tp-card { padding: 16px; }
    .tp-card__header { flex-direction: column; gap: 3px; }
    .tp-section__header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .tp-site-footer { padding: 32px 20px 24px; }
    .tp-toast-container { top: 12px; right: 12px; left: 12px; }
    .tp-toast { max-width: 100%; }
    .tp-modal__content { margin: 16px; max-width: calc(100% - 32px); }
}
