/* ================================================
   THUMBNAIL.PRO — Premium Dark Theme
   ================================================ */

:root {
    /* Premium Dark Theme Colors */
    --yt-bg: #080b12;
    --yt-surface: #111827;
    --yt-surface-hover: #1e293b;
    --yt-border: rgba(148, 163, 184, 0.10);

    --yt-red: #22d3ee;
    --yt-red-hover: #06b6d4;
    --yt-blue: #a78bfa;
    --yt-blue-hover: #c4b5fd;
    --yt-blue-bg: rgba(167, 139, 250, 0.12);

    --accent-cyan: #22d3ee;
    --accent-coral: #fb923c;
    --accent-violet: #a78bfa;
    --accent-emerald: #34d399;
    --accent-rose: #fb7185;

    --yt-text-primary: #f8fafc;
    --yt-text-secondary: #94a3b8;
    --yt-text-disabled: #64748b;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 20px;

    --font: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --font-display: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-blue: 0 0 0 3px rgba(167, 139, 250, 0.15);
    --glow-cyan: 0 0 60px rgba(34, 211, 238, 0.25);
    --glow-violet: 0 0 60px rgba(167, 139, 250, 0.25);
    --border-color: rgba(148, 163, 184, 0.08);
    --border-hover: rgba(148, 163, 184, 0.18);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--yt-bg);
    color: var(--yt-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Mesh Gradient Background */
.mesh-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: var(--yt-bg);
}

.mesh-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 60% 40% at 15% 25%, rgba(34, 211, 238, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 50% 35% at 85% 65%, rgba(167, 139, 250, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 40% 25% at 50% 90%, rgba(52, 211, 153, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 35% 40% at 75% 15%, rgba(251, 146, 60, 0.05) 0%, transparent 50%);
}

/* Particle Canvas */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* === Ambient Animated Background === */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ambient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    animation: blobFloat 18s ease-in-out infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    top: -10%;
    left: -5%;
    animation-delay: 0s;
    opacity: 0.15;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-rose));
    top: 40%;
    right: -10%;
    animation-delay: -6s;
    animation-duration: 22s;
    opacity: 0.12;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
    bottom: -5%;
    left: 30%;
    animation-delay: -12s;
    animation-duration: 25s;
    opacity: 0.10;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(30px, 40px) scale(1.05); }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 0%, transparent 70%);
}

/* === Navbar (Mimics YT Topbar) === */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(8, 11, 18, 0.95) 0%, rgba(8, 11, 18, 0.7) 70%, transparent 100%);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: background 0.3s, box-shadow 0.3s;
}

.navbar:hover {
    background: rgba(8, 11, 18, 0.92);
}

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding-left: 12px;
}

.brand-icon {
    width: 28px;
    height: 28px;
    background: transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--yt-red);
    font-size: 24px;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--yt-text-primary);
    letter-spacing: -0.5px;
}

.brand-dot {
    color: var(--yt-red);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--yt-text-primary);
    font: 400 0.95rem var(--font);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--yt-surface-hover);
}

.nav-btn.active {
    background: var(--yt-text-primary);
    color: var(--yt-bg);
    font-weight: 500;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--yt-border);
    margin: 0 8px;
}

/* Premium "Purchase Tokens" button */
.nav-btn-tokens {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(249, 115, 22, 0.10));
    border: 1px solid rgba(250, 204, 21, 0.25);
    color: #facc15 !important;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.nav-btn-tokens::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(250, 204, 21, 0.12) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: tokenShimmer 2.5s linear infinite;
}

@keyframes tokenShimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.nav-btn-tokens:hover {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(249, 115, 22, 0.16));
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.18);
    color: #fde047 !important;
}

.nav-btn-tokens.active {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.25), rgba(249, 115, 22, 0.2));
    border-color: rgba(250, 204, 21, 0.6);
    color: #fff !important;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.25);
}

.nav-btn-tokens svg {
    color: #facc15;
    flex-shrink: 0;
}

/* Gold "Create Account" nav CTA (shown only when logged out) */
.nav-btn-create-account {
    background: linear-gradient(135deg, rgba(250,204,21,0.18) 0%, rgba(234,179,8,0.10) 50%, rgba(249,115,22,0.14) 100%);
    border: 1px solid rgba(250,204,21,0.45);
    color: #fef08a !important;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 0 12px rgba(250,204,21,0.12), inset 0 1px 0 rgba(255,255,255,0.08);
}

.nav-btn-create-account:hover {
    background: linear-gradient(135deg, rgba(250,204,21,0.28) 0%, rgba(234,179,8,0.18) 50%, rgba(249,115,22,0.24) 100%);
    border-color: rgba(250,204,21,0.75);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(250,204,21,0.3), inset 0 1px 0 rgba(255,255,255,0.12);
}

.nav-btn-create-account:active {
    transform: translateY(0);
}

.nav-create-coin {
    font-size: 1rem;
    line-height: 1;
    display: inline-block;
}


/* === Mobile Hamburger Button === */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: 8px;
    transition: background var(--transition);
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background: rgba(255,255,255,0.06);
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--yt-text-primary);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s, width 0.3s;
    transform-origin: center;
}

/* Animated X when open */
.mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
    width: 0;
}
.mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Backdrop overlay (created by app.js) */
.nav-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: 56px;
    z-index: 998;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.nav-drawer-backdrop.open {
    display: block;
    animation: backdropFadeIn 0.25s ease;
}
@keyframes backdropFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* === Utility Classes === */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.w-full {
    width: 100%;
}

.spacer {
    flex: 1;
}

.glass-panel {
    background: var(--yt-bg);
    border: 1px solid var(--yt-border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

/* Gradient accent text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 50%, var(--accent-coral) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font: 500 0.95rem var(--font);
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 10px 24px;
    font-size: 1rem;
    border-radius: 24px;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #ffffff;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
    color: #ffffff;
}

.btn-secondary {
    background: var(--yt-surface);
    color: var(--yt-text-primary);
}

.btn-secondary:hover {
    background: var(--yt-surface-hover);
}

/* Mimic YT blue outline button */
.btn-outline {
    background: transparent;
    border: 1px solid var(--yt-border);
    color: var(--yt-blue);
    font-weight: 500;
}

.btn-outline:hover {
    background: var(--yt-blue-bg);
    border-color: transparent;
}

.btn-ghost {
    background: transparent;
    color: var(--yt-text-primary);
}

.btn-ghost:hover {
    background: var(--yt-surface-hover);
}

.btn-google {
    background: var(--yt-surface);
    border: 1px solid var(--yt-border);
    color: var(--yt-text-primary);
    font-weight: 500;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-google:hover {
    background: var(--yt-surface-hover);
}

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

/* === Screens === */
.screen {
    display: none;
    padding-top: 80px;
    padding-bottom: 80px;
    min-height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: screenFadeIn 0.35s ease-out;
}

@keyframes screenFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Select dropdown dark theme */
select.input-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

select.input-control option {
    background: var(--yt-surface);
    color: var(--yt-text-primary);
    padding: 8px;
}

.screen-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--yt-border);
}

.screen-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--yt-text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.screen-header p {
    font-size: 0.95rem;
    color: var(--yt-text-secondary);
}

/* === Landing Hero === */
.landing-hero {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Badge + stat-chips in a row */
.hero-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(138, 92, 246, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--yt-text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    backdrop-filter: blur(8px);
}

.hero-stat-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 100px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--yt-text-disabled);
    white-space: nowrap;
}

/* Main headline */
.hero-headline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 24px;
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -2px;
}

.hero-line-plain {
    font-size: clamp(3rem, 6.5vw, 5rem);
    color: var(--yt-text-primary);
    display: block;
}

.hero-line-highlight {
    font-size: clamp(3rem, 6.5vw, 5rem);
    display: block;
    background: linear-gradient(100deg, #f8fafc 0%, #cbd5e1 60%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* The "Clicked." italic make it pop in red */
.hero-em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 60%, var(--accent-coral) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: gradientShift 6s ease-in-out infinite;
}

/* Animated underline beneath "Clicked." */
.hero-em::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 4px;
    width: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
    opacity: 0.7;
}

/* Sub-copy */
.hero-sub {
    font-size: 1.1rem;
    color: var(--yt-text-secondary);
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.7;
    font-weight: 400;
}

.landing-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 80px;
}

/* Feature Cards (Mimic YT Video Cards) */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    text-align: left;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s, border-color 0.35s;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.03));
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 1;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.2);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 40px rgba(34, 211, 238, 0.06);
}

.feature-icon {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, var(--yt-surface), rgba(17, 24, 39, 0.6));
    color: var(--yt-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.35s;
    position: relative;
    overflow: hidden;
}

.feature-icon::after {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    top: -60%;
    left: -60%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
    pointer-events: none;
}

.feature-card:hover .feature-icon::after {
    opacity: 1;
    transform: translate(60%, 60%);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.4s;
}

.feature-card:hover .feature-icon svg {
    opacity: 1;
    transform: scale(1.12);
}

.feature-card:hover .feature-icon {
    background: linear-gradient(145deg, var(--yt-surface-hover), rgba(30, 41, 59, 0.6));
    border-color: rgba(255, 255, 255, 0.08);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--yt-text-primary);
    margin-bottom: 4px;
    padding: 0 4px;
    transition: color 0.3s;
}

.feature-card:hover h3 {
    color: #fff;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--yt-text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0 4px;
}

/* Showcase */
.showcase-section {
    width: 100%;
    padding-bottom: 40px;
}

.showcase-section h3 {
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 24px;
    color: var(--yt-text-primary);
    border-bottom: 1px solid var(--yt-border);
    padding-bottom: 12px;
}

/* =============================================
   LANDING — Logged-Out Guest Section
   ============================================= */

#landingGuestSection {
    width: 100%;
    margin-top: 48px;
}

/* Feature Pills Row */
.lp-features-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 48px;
}

.lp-feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 100px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--yt-text-secondary);
    transition: all 0.2s;
    cursor: default;
    backdrop-filter: blur(8px);
}

.lp-feature-pill:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.14);
    color: var(--yt-text-primary);
    transform: translateY(-1px);
}

.lp-pill-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Feature Cards Grid */
.lp-feature-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 18px;
    margin-bottom: 56px;
}

.lp-card {
    position: relative;
    background: linear-gradient(165deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 32px 26px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s, border-color 0.35s;
    backdrop-filter: blur(8px);
}

/* Gradient border shimmer overlay */
.lp-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.08) 0%,
        transparent 40%,
        transparent 60%,
        rgba(255,255,255,0.05) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.4s;
}

.lp-card:hover::before {
    opacity: 1;
}

.lp-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(255,255,255,0.14);
    box-shadow:
        0 24px 64px rgba(0,0,0,0.45),
        0 0 0 1px rgba(255,255,255,0.06);
}

/* Coloured glow orb in corner of each card */
.lp-card-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow, #fff) 0%, transparent 70%);
    top: -80px;
    right: -80px;
    opacity: 0.10;
    pointer-events: none;
    transition: opacity 0.5s, transform 0.5s;
    filter: blur(10px);
}

.lp-card:hover .lp-card-glow {
    opacity: 0.25;
    transform: scale(1.15);
}

/* Bottom accent line */
.lp-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--glow, rgba(255,255,255,0.15)), transparent);
    opacity: 0;
    transition: opacity 0.35s, left 0.35s, right 0.35s;
}

.lp-card:hover::after {
    opacity: 0.6;
    left: 10%;
    right: 10%;
}

/* Hero card — primary spotlight card */
.lp-card-hero {
    background: linear-gradient(155deg, rgba(34,211,238,0.07) 0%, rgba(17,24,39,0.7) 50%, rgba(34,211,238,0.03) 100%);
    border-color: rgba(34, 211, 238, 0.2);
    --glow: #22d3ee;
}

.lp-card-hero:hover {
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow:
        0 24px 64px rgba(34, 211, 238, 0.12),
        0 0 0 1px rgba(34, 211, 238, 0.1);
}

/* Icon wrap — glassmorphism container for the icon */
.lp-card-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--icon-color, #fff);
    transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
    position: relative;
}

/* Icon ring glow on hover */
.lp-card:hover .lp-card-icon-wrap {
    transform: scale(1.1) rotate(2deg);
    box-shadow:
        0 0 20px color-mix(in srgb, var(--icon-color, #fff) 25%, transparent),
        0 0 40px color-mix(in srgb, var(--icon-color, #fff) 10%, transparent);
    border-color: color-mix(in srgb, var(--icon-color, #fff) 30%, transparent);
}

.lp-card-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--yt-text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    transition: color 0.3s;
}

.lp-card:hover .lp-card-title {
    color: #fff;
}

.lp-card-desc {
    font-size: 0.875rem;
    color: var(--yt-text-secondary);
    line-height: 1.65;
}

.lp-card-bullets {
    list-style: none;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.lp-card-bullets li {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-card-bullets li::first-letter {
    color: #22d3ee;
}

/* CTA Block */
.lp-cta-wrap {
    position: relative;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(34,211,238,0.5), rgba(167,139,250,0.5), rgba(251,146,60,0.5));
    margin-bottom: 72px;
    overflow: hidden;
}

.lp-cta-glow-ring {
    position: absolute;
    inset: -40px;
    background: conic-gradient(from 0deg, #22d3ee, #a78bfa, #fb923c, #22d3ee);
    border-radius: 50%;
    opacity: 0.1;
    animation: ctaRingSpin 8s linear infinite;
    pointer-events: none;
    filter: blur(40px);
}

@keyframes ctaRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.lp-cta-inner {
    position: relative;
    background: linear-gradient(145deg, rgba(17,24,39,0.97), rgba(8,11,18,0.97));
    border-radius: 22px;
    padding: 30px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(30px);
}

.lp-cta-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-cyan);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
}

.lp-cta-heading {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--yt-text-primary);
    letter-spacing: -0.5px;
    margin: 0;
    background: linear-gradient(135deg, #fff 20%, rgba(255,255,255,0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lp-cta-sub {
    font-size: 0.88rem;
    color: var(--yt-text-secondary);
    max-width: 420px;
    line-height: 1.5;
    margin: 0;
}

/* The big CTA button — gold style matching nav create-account button */
.lp-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    padding: 11px 28px;
    border-radius: 100px;
    border: 1px solid rgba(250,204,21,0.45);
    cursor: pointer;
    font: 700 0.95rem var(--font);
    letter-spacing: 0.02em;
    color: #fef08a;
    background: linear-gradient(135deg, rgba(250,204,21,0.18) 0%, rgba(234,179,8,0.10) 50%, rgba(249,115,22,0.14) 100%);
    box-shadow: 0 0 12px rgba(250,204,21,0.12), inset 0 1px 0 rgba(255,255,255,0.08);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s, background 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.lp-cta-btn:hover {
    background: linear-gradient(135deg, rgba(250,204,21,0.28) 0%, rgba(234,179,8,0.18) 50%, rgba(249,115,22,0.24) 100%);
    border-color: rgba(250,204,21,0.75);
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 24px rgba(250,204,21,0.3), inset 0 1px 0 rgba(255,255,255,0.12);
}

.lp-cta-btn:active {
    transform: translateY(0) scale(0.99);
}

.lp-cta-note {
    font-size: 0.75rem;
    color: var(--yt-text-disabled);
    margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .lp-feature-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .lp-feature-grid {
        grid-template-columns: 1fr;
    }
    .lp-cta-inner {
        padding: 24px 18px;
    }
    .lp-features-row {
        gap: 8px;
    }
}

/* =============================================
   LANDING — Logged-In Dashboard
   ============================================= */

.dashboard-greeting {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-cyan);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.dashboard-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--yt-text-primary);
    letter-spacing: -0.5px;
    margin: 0 0 36px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
    margin-bottom: 60px;
}

/* Individual dash card (button reset) */
.dash-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 26px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1),
                box-shadow 0.25s,
                border-color 0.25s,
                background 0.25s;
    font-family: var(--font);
}

.dash-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.13);
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

/* Coloured ambient glow */
.dash-card-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow, #fff) 0%, transparent 70%);
    top: -80px;
    right: -80px;
    opacity: 0.1;
    pointer-events: none;
    transition: opacity 0.3s;
}

.dash-card:hover .dash-card-glow {
    opacity: 0.2;
}

/* Icon circle */
.dash-card-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-color, #fff);
    transition: transform 0.25s, box-shadow 0.25s;
}

.dash-card:hover .dash-card-icon {
    transform: scale(1.08);
    box-shadow: 0 0 20px color-mix(in srgb, var(--icon-color, #fff) 25%, transparent);
}

/* Text block */
.dash-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.dash-card-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--yt-text-primary);
    letter-spacing: -0.1px;
}

.dash-card-desc {
    font-size: 0.82rem;
    color: var(--yt-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Arrow */
.dash-card-arrow {
    flex-shrink: 0;
    color: rgba(255,255,255,0.2);
    transition: color 0.2s, transform 0.2s;
}

.dash-card:hover .dash-card-arrow {
    color: rgba(255,255,255,0.6);
    transform: translateX(3px);
}

/* Responsive */
@media (max-width: 700px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* === Generator === */
.generator-workspace {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.prompt-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(8, 11, 18, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.prompt-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 0%, rgba(167, 139, 250, 0.1), transparent 40%),
                radial-gradient(circle at 90% 100%, rgba(34, 211, 238, 0.08), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.prompt-panel > * {
    position: relative;
    z-index: 1;
}

.prompt-panel>div,
.prompt-panel>p,
.prompt-panel>button {
    margin-bottom: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--yt-text-primary);
}

.tag {
    background: var(--yt-surface);
    color: var(--yt-text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--yt-border);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--yt-bg);
    border: 1px solid var(--yt-border);
    border-radius: var(--radius-md);
    color: var(--yt-text-primary);
    font: 1rem var(--font);
    resize: vertical;
    transition: var(--transition);
}

.input-control:focus {
    outline: none;
    border-color: var(--yt-blue);
    box-shadow: var(--glow-blue);
}

.input-control::placeholder {
    color: var(--yt-text-disabled);
}

.style-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--yt-surface);
    border: none;
    color: var(--yt-text-primary);
    font: 400 0.85rem var(--font);
    cursor: pointer;
    transition: var(--transition);
}

.chip:hover,
.chip.active {
    background: var(--yt-text-primary);
    color: var(--yt-bg);
    font-weight: 500;
    transform: translateY(-1px);
}

.hint {
    font-size: 0.8rem;
    color: var(--yt-text-secondary);
    text-align: left;
    margin-top: -12px;
}

/* Reference Image Upload */
.ref-image-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ref-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.ref-grid .ref-thumb {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--yt-border);
    aspect-ratio: 16/9;
}

.ref-grid .ref-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ref-grid .ref-thumb .ref-remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ref-grid .ref-thumb .ref-remove-btn:hover {
    background: var(--yt-red);
}

.ref-upload-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 14px;
    border-radius: var(--radius-md);
    border: 2px dashed rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--yt-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.2);
}

.ref-upload-zone:hover {
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(168, 85, 247, 0.08);
    color: var(--yt-text-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.ref-upload-zone svg {
    transition: transform 0.3s, color 0.3s;
}

.ref-upload-zone:hover svg {
    transform: translateY(-2px);
    color: #a855f7;
    opacity: 1;
}


/* Prompt Button Enhancements */
.prompt-action-btn {
    border-radius: var(--radius-md) !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#createPromptBtn {
    background: rgba(168, 85, 247, 0.05);
    border-color: rgba(168, 85, 247, 0.3) !important;
    color: #d8b4fe !important;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.1);
}

#createPromptBtn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.6) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(168, 85, 247, 0.2);
}


/* Polished Textarea */
#promptInput {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    line-height: 1.6;
    border-radius: 12px;
}
#promptInput:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 0 4px rgba(168, 85, 247, 0.15);
}

/* Layers list */
.layers-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--yt-surface);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--yt-text-secondary);
}

.layer-item img {
    width: 32px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
}

.layer-item .layer-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layer-item .layer-remove {
    background: none;
    border: none;
    color: var(--yt-text-disabled);
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
}

.layer-item .layer-remove:hover {
    color: var(--yt-red);
}

/* Quality slider */
.quality-slider-section {
    margin-bottom: 8px;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--yt-border);
    border-radius: 2px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--yt-blue);
    cursor: pointer;
    border: 2px solid var(--yt-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--yt-text-primary);
    cursor: pointer;
    border: 2px solid var(--yt-bg);
}

/* === Enhanced Modal System === */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    animation: modalOverlayIn 0.3s ease-out;
}

.modal-overlay.closing {
    animation: modalOverlayOut 0.25s ease-in forwards;
}

@keyframes modalOverlayIn {
    from { opacity: 0; backdrop-filter: blur(0); }
    to { opacity: 1; backdrop-filter: blur(12px); }
}
@keyframes modalOverlayOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.modal-card {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(8, 11, 18, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px;
    width: 100%;
    max-width: 480px;
    position: relative;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: modalCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-overlay.closing .modal-card {
    animation: modalCardOut 0.2s ease-in forwards;
}

/* Subtle gradient accent at top of modal */
.modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet), var(--accent-coral));
    opacity: 0.6;
    border-radius: 20px 20px 0 0;
}

@keyframes modalCardIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalCardOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to { opacity: 0; transform: scale(0.9) translateY(20px); }
}

/* ===== Editor Gallery Picker Modal ===== */
.ed-gallery-modal-card {
    max-width: 720px !important;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
}

.ed-gallery-count-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--yt-blue);
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 100px;
    padding: 3px 10px;
    letter-spacing: 0.02em;
}

.ed-gallery-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    overflow-y: auto;
    flex: 1;
    padding: 8px 4px 8px 4px;
    align-items: start;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.ed-gallery-picker-grid::-webkit-scrollbar {
    width: 6px;
}
.ed-gallery-picker-grid::-webkit-scrollbar-track {
    background: transparent;
}
.ed-gallery-picker-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.ed-gallery-picker-item {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 2px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: edGalleryItemIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.ed-gallery-picker-item:hover {
    border-color: var(--yt-blue);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(62, 166, 255, 0.12);
}
.ed-gallery-picker-item:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}
.ed-gallery-picker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.ed-gallery-picker-item:hover img {
    transform: scale(1.05);
}

/* Blue check overlay on hover */
.ed-gallery-picker-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(62, 166, 255, 0.25) 100%);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.ed-gallery-picker-item:hover::after {
    opacity: 1;
}

@keyframes edGalleryItemIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* Mobile */
@media (max-width: 768px) {
    .ed-gallery-modal-card {
        max-width: calc(100vw - 24px) !important;
        max-height: 85vh;
        margin: 0 12px;
        padding: 20px 16px;
    }
    .ed-gallery-picker-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
@media (max-width: 400px) {
    .ed-gallery-picker-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--yt-text-primary);
    letter-spacing: -0.3px;
}

.modal-header .ref-remove-btn {
    position: static;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--yt-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.modal-header .ref-remove-btn:hover {
    background: rgba(255, 60, 60, 0.12);
    border-color: rgba(255, 60, 60, 0.3);
    color: #ff4444;
    transform: rotate(90deg);
}

.preview-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 32px;
    background: var(--yt-bg);
    border: 1px solid var(--yt-border);
    border-radius: var(--radius-lg);
    width: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 4px 24px rgba(0, 0, 0, 0.4);
}

.preview-panel img {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.result-area {
    width: 100%;
    text-align: center;
}

.empty-state,
.empty-state-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
    color: var(--yt-text-secondary);
}

.empty-state p,
.empty-state-full p {
    font-size: 0.95rem;
}

/* Spinner */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--yt-blue);
    animation: spin 1s ease-in-out infinite;
}

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

/* === Editor — Full Professional Overhaul === */

/* Editor screen fills full viewport */
#editor-screen {
    padding: 0 !important;
    margin: 0;
    display: none;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
#editor-screen.active {
    display: flex !important;
}

/* --- Toolbar --- */
.ed-toolbar {
    height: 48px;
    min-height: 48px;
    background: rgba(24, 24, 24, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    margin-top: 56px; /* below navbar */
    z-index: 10;
    backdrop-filter: blur(12px);
    gap: 8px;
}

.ed-toolbar-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.ed-toolbar-center {
    gap: 2px;
}

.ed-toolbar-divider {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,0.08);
    margin: 0 6px;
}

.ed-tool-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--yt-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.ed-tool-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.08);
    color: var(--yt-text-primary);
}
.ed-tool-btn.active {
    background: rgba(62, 166, 255, 0.15);
    color: var(--yt-blue);
}
.ed-tool-btn:disabled {
    opacity: 0.25;
    cursor: default;
}
.ed-tool-btn.ed-tool-sm {
    width: 30px;
    height: 30px;
}
.ed-tool-btn.ed-tool-danger:hover:not(:disabled) {
    background: rgba(255, 60, 60, 0.12);
    color: #ff4444;
}

.ed-zoom-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 2px;
}

.ed-zoom-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--yt-text-secondary);
    min-width: 42px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    user-select: none;
}

/* --- Editor Body --- */
.ed-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* --- Canvas Viewport --- */
.ed-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
        linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
        linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #141414;
    overflow: hidden;
    position: relative;
    cursor: default;
}

.ed-canvas-container {
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
}

.ed-canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.ed-handles-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* --- Right Panel --- */
.ed-panel-right {
    width: 280px;
    min-width: 280px;
    background: rgba(18, 18, 18, 0.98);
    border-left: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.ed-panel-right::-webkit-scrollbar {
    width: 4px;
}
.ed-panel-right::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.ed-panel-section {
    padding: 14px 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ed-panel-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ed-panel-section-header h4 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--yt-text-secondary);
}

.ed-panel-actions {
    display: flex;
    gap: 4px;
}

.ed-icon-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    color: var(--yt-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.ed-icon-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--yt-text-primary);
    border-color: rgba(255,255,255,0.12);
}

/* --- Layers List --- */
.ed-layers-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.06) transparent;
}

.ed-layers-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 0;
    color: var(--yt-text-disabled);
    font-size: 0.78rem;
}

.ed-layer-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
    min-height: 34px;
    user-select: none;
}
.ed-layer-item:hover {
    background: rgba(255,255,255,0.04);
}
.ed-layer-item.selected {
    background: rgba(62, 166, 255, 0.1);
    border-color: rgba(62, 166, 255, 0.25);
}

.ed-layer-grab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 100%;
    color: var(--yt-text-secondary);
    cursor: grab;
    opacity: 0.6;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ed-layer-item:hover .ed-layer-grab {
    opacity: 1;
    color: var(--yt-text-primary);
}
.ed-layer-item.dragging {
    opacity: 0.5;
    background: rgba(255,255,255,0.1);
}
.ed-layer-item.drag-over-top {
    border-top: 2px solid var(--yt-blue);
}
.ed-layer-item.drag-over-bottom {
    border-bottom: 2px solid var(--yt-blue);
}

.ed-layer-visibility {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--yt-text-disabled);
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.15s;
    padding: 0;
}
.ed-layer-visibility.visible {
    opacity: 1;
    color: var(--yt-blue);
}
.ed-layer-item:hover .ed-layer-visibility {
    opacity: 1;
}

.ed-layer-thumb {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ed-layer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ed-layer-thumb .ed-layer-type-icon {
    font: 700 0.7rem var(--font);
    color: var(--yt-text-disabled);
}

.ed-layer-info {
    flex: 1;
    min-width: 0;
}
.ed-layer-name {
    font-size: 0.78rem;
    color: var(--yt-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.ed-layer-type {
    font-size: 0.65rem;
    color: var(--yt-text-disabled);
    text-transform: uppercase;
}

.ed-layer-actions {
    display: flex;
    gap: 1px;
    opacity: 0;
    transition: opacity 0.12s;
    flex-shrink: 0;
}
.ed-layer-item:hover .ed-layer-actions,
.ed-layer-item.selected .ed-layer-actions {
    opacity: 1;
}

.ed-layer-action-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--yt-text-disabled);
    cursor: pointer;
    font-size: 0.6rem;
    padding: 0;
    transition: all 0.12s;
}
.ed-layer-action-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--yt-text-primary);
}
.ed-layer-action-btn.ed-layer-del {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    color: #ff6b6b;
    background: rgba(255, 60, 60, 0.1);
    margin-left: 2px;
}
.ed-layer-action-btn.ed-layer-del:hover {
    background: rgba(255, 60, 60, 0.25);
    color: #ff2222;
    transform: scale(1.05);
}

/* --- Properties Panel --- */
.ed-prop-layer-name {
    font-size: 0.72rem;
    color: var(--yt-text-disabled);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ed-prop-group {
    margin-bottom: 12px;
}

.ed-prop-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--yt-text-disabled);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.ed-prop-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ed-prop-field {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.ed-prop-field:focus-within {
    border-color: rgba(62, 166, 255, 0.4);
}

.ed-prop-field-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--yt-text-disabled);
    padding: 0 6px;
    min-width: 18px;
    text-align: center;
    user-select: none;
}

.ed-prop-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--yt-text-primary);
    font: 500 0.78rem var(--font);
    padding: 5px 6px;
    outline: none;
    font-variant-numeric: tabular-nums;
}
.ed-prop-input::-webkit-inner-spin-button,
.ed-prop-input::-webkit-outer-spin-button {
    opacity: 0;
}
.ed-prop-input:hover::-webkit-inner-spin-button,
.ed-prop-input:hover::-webkit-outer-spin-button {
    opacity: 1;
}

.ed-prop-input-sm {
    width: 48px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 5px;
    padding: 3px 4px;
    text-align: center;
    font-size: 0.72rem;
    transition: border-color 0.15s;
}
.ed-prop-input-sm:focus {
    border-color: rgba(62, 166, 255, 0.4);
}

.ed-prop-input-full {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 7px 8px;
    font-size: 0.82rem;
    transition: border-color 0.15s;
}
.ed-prop-input-full:focus {
    border-color: rgba(62, 166, 255, 0.4);
}

.ed-prop-unit {
    font-size: 0.65rem;
    color: var(--yt-text-disabled);
    min-width: 12px;
    flex-shrink: 0;
}

.ed-prop-slider-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.ed-prop-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}
.ed-prop-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--yt-blue);
    border: 2px solid rgba(0,0,0,0.4);
    cursor: pointer;
    transition: transform 0.1s;
}
.ed-prop-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}
.ed-prop-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--yt-blue);
    border: 2px solid rgba(0,0,0,0.4);
    cursor: pointer;
}

.ed-lock-btn {
    width: 24px;
    height: 24px;
}
.ed-lock-btn.locked {
    color: var(--yt-blue);
    background: rgba(62, 166, 255, 0.12);
    border-color: rgba(62, 166, 255, 0.3);
}

/* --- Text Properties --- */
.ed-color-input {
    width: 32px;
    height: 26px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    cursor: pointer;
    background: transparent;
    padding: 1px;
}
.ed-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}
.ed-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.ed-text-style-row {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    align-items: center;
}

.ed-style-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    color: var(--yt-text-secondary);
    cursor: pointer;
    font: 700 0.82rem var(--font);
    transition: all 0.15s;
}
.ed-style-btn.ed-style-italic {
    font-style: italic;
}
.ed-style-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--yt-text-primary);
}
.ed-style-btn.active {
    background: rgba(62, 166, 255, 0.15);
    color: var(--yt-blue);
    border-color: rgba(62, 166, 255, 0.3);
}

.ed-font-select {
    flex: 1;
    height: 28px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    color: var(--yt-text-primary);
    font: 500 0.72rem var(--font);
    padding: 0 6px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 20px;
}
.ed-font-select option {
    background: var(--yt-surface);
    color: var(--yt-text-primary);
}

.ed-reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 6px 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    color: var(--yt-text-disabled);
    font: 500 0.72rem var(--font);
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 4px;
}
.ed-reset-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--yt-text-secondary);
}

/* --- AI Tools --- */
.ed-ai-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.2);
    padding: 2px 6px;
    border-radius: 100px;
    letter-spacing: 0.05em;
}

.ed-ai-tools-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ed-ai-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}
.ed-ai-btn:hover {
    background: rgba(167, 139, 250, 0.06);
    border-color: rgba(167, 139, 250, 0.15);
    transform: translateY(-1px);
}

.ed-ai-btn-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.ed-ai-btn-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ed-ai-btn-text span {
    font: 500 0.78rem var(--font);
    color: var(--yt-text-primary);
}
.ed-ai-btn-text small {
    font: 400 0.65rem var(--font);
    color: var(--yt-text-disabled);
}

/* --- Export --- */
.ed-export-section {
    margin-top: auto;
    border-bottom: none !important;
}

.ed-export-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 0;
    background: linear-gradient(135deg, var(--yt-blue) 0%, #8a5cf6 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font: 600 0.88rem var(--font);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 12px rgba(62, 166, 255, 0.2);
}
.ed-export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(62, 166, 255, 0.35);
    filter: brightness(1.1);
}

/* --- Status Bar --- */
.ed-statusbar {
    height: 24px;
    min-height: 24px;
    background: rgba(18, 18, 18, 0.95);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 16px;
    font-size: 0.65rem;
    color: var(--yt-text-disabled);
    font-variant-numeric: tabular-nums;
}
.ed-statusbar span {
    white-space: nowrap;
}

/* --- Canvas Transform Overlay --- */
.ed-transform-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.ed-transform-box {
    position: absolute;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(0,0,0,0.15);
    transform-origin: center center;
}

/* Dashed guides inside the bounding box */
.ed-transform-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    pointer-events: none;
}

/* Corner resize handles */
.ed-t-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: transparent;
    border: 3px solid #ffffff;
    pointer-events: all;
    z-index: 2;
    transition: transform 0.1s;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.ed-t-handle:hover {
    transform: scale(1.2);
}
.ed-t-handle.nw { 
    top: -3px; left: -3px; 
    border-right: none; border-bottom: none; 
    cursor: nw-resize; 
    transform-origin: top left;
}
.ed-t-handle.ne { 
    top: -3px; right: -3px; 
    border-left: none; border-bottom: none; 
    cursor: ne-resize; 
    transform-origin: top right;
}
.ed-t-handle.sw { 
    bottom: -3px; left: -3px; 
    border-right: none; border-top: none; 
    cursor: sw-resize; 
    transform-origin: bottom left;
}
.ed-t-handle.se { 
    bottom: -3px; right: -3px; 
    border-left: none; border-top: none; 
    cursor: se-resize; 
    transform-origin: bottom right;
}

/* Side resize handles */
.ed-t-handle-side {
    position: absolute;
    background: rgba(255, 255, 255, 0.75);
    border: 1.5px solid rgba(62, 166, 255, 0.7);
    border-radius: 3px;
    pointer-events: all;
    z-index: 2;
    transition: background 0.15s, transform 0.1s;
}
.ed-t-handle-side:hover {
    background: #ffffff;
}
.ed-t-handle-side.top, .ed-t-handle-side.bottom {
    width: 24px;
    height: 6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}
.ed-t-handle-side.top { top: -3px; }
.ed-t-handle-side.bottom { bottom: -3px; }
.ed-t-handle-side.left, .ed-t-handle-side.right {
    width: 6px;
    height: 24px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
}
.ed-t-handle-side.left { left: -3px; }
.ed-t-handle-side.right { right: -3px; }

/* Rotation handle — circle above the box */
.ed-t-handle-rotate {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--yt-blue);
    border: 2.5px solid #fff;
    pointer-events: all;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5), 0 0 12px rgba(62, 166, 255, 0.35);
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: transform 0.1s, box-shadow 0.15s;
}
.ed-t-handle-rotate:hover {
    transform: translate(-50%, -50%) scale(1.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 18px rgba(62, 166, 255, 0.5);
}
.ed-t-handle-rotate:active {
    cursor: grabbing;
}

/* Rotation arm line */
.ed-t-rotate-arm {
    position: absolute;
    width: 1.5px;
    height: 24px;
    background: rgba(255, 255, 255, 0.5);
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 2;
}

/* Live readout badges on the transform box */
.ed-t-readout {
    position: absolute;
    display: flex;
    gap: 6px;
    top: -28px;
    right: 0;
    pointer-events: none;
    z-index: 4;
}
.ed-t-readout-tag {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: #fff;
    font: 600 0.65rem var(--font);
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}
.ed-t-readout-tag.rotation {
    color: #fbbf24;
}
.ed-t-readout-tag.scale {
    color: #34d399;
}

/* --- Layer Lock Button --- */
.ed-layer-lock {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--yt-text-disabled);
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.35;
    transition: opacity 0.15s, color 0.15s;
    padding: 0;
}
.ed-layer-lock:hover {
    opacity: 0.8;
}
.ed-layer-lock.locked {
    opacity: 1;
    color: #f59e0b;
}
.ed-layer-item:hover .ed-layer-lock {
    opacity: 0.7;
}
.ed-layer-item:hover .ed-layer-lock.locked {
    opacity: 1;
}

/* Locked layer styling */
.ed-layer-item.is-locked {
    opacity: 0.65;
}
.ed-layer-item.is-locked .ed-layer-name {
    color: var(--yt-text-disabled);
}
.ed-layer-item.is-locked .ed-layer-thumb {
    filter: grayscale(0.4);
}

/* --- Mobile Panel Toggle FAB --- */
.ed-mobile-panel-toggle {
    display: none;
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(62, 166, 255, 0.9);
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 20;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 20px rgba(62, 166, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ed-mobile-panel-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 28px rgba(62, 166, 255, 0.4);
}

@media (max-width: 768px) {
    .ed-mobile-panel-toggle {
        display: flex;
    }
    .ed-zoom-controls {
        display: none !important;
    }
    /* Hide canvas frame resize/rotate handles on mobile */
    .ed-t-handle,
    .ed-t-handle-side,
    .ed-t-handle-rotate,
    .ed-t-rotate-arm {
        display: none !important;
    }
    /* Ensure export section doesn't use margin-top:auto which can push it off-screen */
    .ed-export-section {
        margin-top: 8px !important;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
}

/* Legacy aliases (keep for compat) */
.ed-selection-box {
    position: absolute;
    border: 1.5px solid var(--yt-blue);
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}

.ed-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border: 1.5px solid var(--yt-blue);
    border-radius: 1px;
    pointer-events: all;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    transform: translate(-50%, -50%);
}

.ed-handle-rotate {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--yt-blue);
    border: 2px solid #fff;
    cursor: grab;
}

.tool-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--yt-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-btn {
    cursor: pointer;
    text-align: center;
    justify-content: center;
}

/* === Compressor === */
.compressor-workspace {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.upload-zone {
    border: 2px dashed var(--yt-border);
    border-radius: var(--radius-lg);
    padding: 64px 32px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    background: transparent;
}

.upload-zone:hover {
    background: rgba(62, 166, 255, 0.04);
    border-color: var(--yt-blue);
    box-shadow: 0 0 24px rgba(62, 166, 255, 0.06);
}

.upload-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--yt-text-primary);
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--yt-text-secondary);
}

.compressor-results {
    padding: 24px;
    background: var(--yt-surface);
    border-radius: var(--radius-lg);
}

.stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    background: var(--yt-bg);
    border: 1px solid var(--yt-border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.2s;
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--yt-text-secondary);
    text-transform: uppercase;
    font-weight: 500;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--yt-text-primary);
    letter-spacing: -0.5px;
}

.stat-card.target .stat-value {
    color: #4CAF50;
}

/* YT green */
.stat-card.limit .stat-value {
    color: var(--yt-text-disabled);
}

.stat-arrow {
    color: var(--yt-text-secondary);
}

/* === Gallery === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px 16px;
}
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }
}

.gallery-item {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover img {
    border-color: rgba(62, 166, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(62, 166, 255, 0.08);
    transform: scale(1.02);
}

/* Gallery item hover overlay with zoom icon */
.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.6) 100%);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
    z-index: 1;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.gallery-item-footer p {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--yt-text-primary);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    padding-right: 12px;
    margin-bottom: 8px;
}

.gallery-item {
    position: relative;
}

.gallery-expiry-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* === Auth === */
.auth-wrapper {
    max-width: 400px;
    margin: 40px auto 0;
}

.auth-card {
    padding: 40px 32px;
    text-align: center;
    background: var(--yt-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--yt-border);
}

.auth-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--yt-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.auth-card h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--yt-text-primary);
    margin-bottom: 8px;
}

.auth-card p {
    color: var(--yt-text-secondary);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

/* Password Strength Segments */
.pw-str-seg {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.pw-req-icon {
    display: inline-block;
    width: 12px;
    text-align: center;
    font-size: 0.7rem;
    transition: color 0.25s;
}

.password-toggle-btn:hover {
    color: var(--yt-text-primary) !important;
}

/* =============================================
   COMPREHENSIVE MOBILE / TOUCH / RESPONSIVE
   ============================================= */

/* Mobile panel toggle FAB (hidden on desktop) */
.ed-mobile-panel-toggle {
    display: none;
}

/* General touch-friendly sizing */
@media (pointer: coarse) {
    .btn, .nav-btn, .chip, .ed-tool-btn, .ed-ai-btn, .ed-icon-btn {
        min-height: 44px;
    }
    .ed-tool-btn {
        width: 40px;
        height: 40px;
    }
    .ed-layer-item {
        min-height: 44px;
        padding: 8px;
    }
    .ed-layer-action-btn {
        width: 28px;
        height: 28px;
    }
    .ed-layer-actions {
        opacity: 1;
    }
    .layer-controls {
        opacity: 1;
    }
    .ed-prop-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }
    .ed-prop-slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }
    .ed-style-btn {
        width: 36px;
        height: 36px;
    }
}

/* Mobile Nav Drawer */
.nav-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 998;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s;
}
.nav-drawer-backdrop.open {
    display: block;
    opacity: 1;
}

/* === Tablet breakpoint === */
@media (max-width: 1024px) {
    .generator-workspace {
        grid-template-columns: 1fr;
    }
    .preview-panel {
        min-height: 300px;
    }
}

/* === Mobile breakpoint === */
@media (max-width: 768px) {
    /* --- Navbar --- */
    .navbar {
        padding: 0 12px;
        height: 52px;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255,255,255,0.06);
        flex-direction: column;
        padding: 72px 16px 24px;
        gap: 4px;
        z-index: 999;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        box-shadow: -8px 0 40px rgba(0,0,0,0.5);
    }
    .nav-links.open {
        right: 0;
    }
    .nav-links .nav-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 0.95rem;
        min-height: 48px;
    }
    .nav-links .nav-divider {
        height: 1px;
        width: 100%;
        margin: 8px 0;
    }
    .nav-links .btn {
        width: 100%;
        margin-top: 8px;
        min-height: 48px;
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
    }
    .mobile-menu-btn span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--yt-text-primary);
        transition: all 0.3s;
        border-radius: 2px;
    }
    .mobile-menu-btn.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-menu-btn.open span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .brand-text {
        font-size: 1.1rem;
    }

    /* --- Screens --- */
    .screen {
        padding: 72px 16px 32px;
    }
    .container {
        padding: 0;
    }
    .screen-header h2 {
        font-size: 1.6rem;
    }
    .screen-header p {
        font-size: 0.88rem;
    }

    /* --- Landing --- */
    .landing-hero {
        padding-top: 16px;
        align-items: center;
        text-align: center;
    }
    .landing-hero h1 {
        font-size: 2rem;
    }
    .hero-sub {
        font-size: 0.92rem;
    }
    .landing-cta {
        flex-direction: column;
        gap: 10px;
    }
    .landing-cta .btn {
        width: 100%;
    }
    .feature-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .feature-card {
        padding: 20px;
    }
    .showcase-section {
        margin-top: 48px !important;
    }

    /* --- Generator --- */
    .generator-workspace {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .prompt-panel {
        padding: 16px;
    }
    .preview-panel {
        min-height: 260px;
        padding: 20px;
    }
    .style-chips {
        flex-wrap: wrap;
    }
    .chip {
        font-size: 0.78rem;
        padding: 6px 12px;
    }

    /* --- Editor --- */
    .ed-toolbar {
        margin-top: 52px;
        height: 44px;
        min-height: 44px;
        padding: 0 8px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .ed-toolbar::-webkit-scrollbar {
        display: none;
    }

    .ed-mobile-panel-toggle {
        display: flex;
        position: absolute;
        bottom: 40px;
        right: 16px;
        z-index: 110;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        background: rgba(62, 166, 255, 0.9);
        color: #fff;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 4px 16px rgba(62, 166, 255, 0.3), 0 2px 8px rgba(0,0,0,0.4);
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .ed-mobile-panel-toggle:active {
        transform: scale(0.92);
    }
    
    .ed-body:has(.ed-panel-right.ed-panel-open) .ed-mobile-panel-toggle {
        bottom: calc(60vh + 16px);
        background: rgba(40, 40, 40, 0.9);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    }

    .ed-panel-right {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        width: 100% !important;
        min-width: 100% !important;
        max-height: 60vh;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.08);
        border-radius: 16px 16px 0 0;
        z-index: 100;
        transform: translateY(110%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
        display: block !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
        padding-bottom: max(32px, env(safe-area-inset-bottom, 32px)) !important;
    }
    .ed-panel-right.ed-panel-open {
        transform: translateY(0);
    }
    .ed-panel-right::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(255,255,255,0.15);
        border-radius: 2px;
        margin: 8px auto 4px;
        flex-shrink: 0;
    }

    .ed-layers-list {
        max-height: 140px;
    }

    .ed-statusbar {
        font-size: 0.6rem;
        padding: 0 8px;
        gap: 10px;
    }

    .ed-viewport {
        touch-action: none;
        transition: margin-bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .ed-body:has(.ed-panel-right.ed-panel-open) .ed-viewport {
        margin-bottom: 60vh;
    }

    /* --- Gallery --- */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 12px;
    }

    /* --- Compressor --- */
    .compressor-workspace {
        max-width: 100%;
    }
    .upload-zone {
        padding: 40px 20px;
    }
    .stats-row {
        flex-direction: column;
        gap: 8px;
    }
    .stat-arrow {
        transform: rotate(90deg);
    }

    /* --- Pricing --- */
    .pricing-hero {
        padding: 40px 16px 24px;
    }
    .pricing-hero h2 {
        font-size: 1.8rem;
    }

    /* --- Auth --- */
    .auth-wrapper {
        margin-top: 20px;
    }
    .auth-card {
        padding: 28px 20px;
    }

    /* --- Modals --- */
    .modal-card {
        max-width: calc(100vw - 32px);
        margin: 0 16px;
    }

    .provider-pills {
        flex-wrap: wrap;
    }
}

/* === Provider Selector === */
.provider-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.provider-pills {
    display: flex;
    gap: 6px;
}

.provider-pills-sm {
    gap: 4px;
}

.provider-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--yt-surface);
    border: 1px solid var(--yt-border);
    color: var(--yt-text-secondary);
    font: 500 0.82rem var(--font);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.provider-pill:hover:not(.disabled) {
    background: var(--yt-surface-hover);
    color: var(--yt-text-primary);
    border-color: var(--yt-text-secondary);
}

.provider-pill.active {
    background: var(--yt-text-primary);
    color: var(--yt-bg);
    border-color: transparent;
}

.provider-pill.active svg {
    opacity: 1;
}

.provider-pill.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.provider-pills-sm .provider-pill {
    padding: 4px 10px;
    font-size: 0.78rem;
    gap: 4px;
}

/* Generation meta tag */
.generation-meta {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.generation-meta .tag {
    background: rgba(62, 166, 255, 0.1);
    color: var(--yt-blue);
    border: 1px solid rgba(62, 166, 255, 0.2);
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: var(--radius-pill);
}

/* === Auth Form === */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
    text-align: left;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--yt-text-secondary);
}

.auth-form .input-control {
    padding: 10px 14px;
    font-size: 0.95rem;
}

.auth-toggle {
    font-size: 0.88rem;
    color: var(--yt-text-secondary);
    margin-bottom: 16px;
    text-align: center;
}

.auth-toggle-link {
    background: none;
    border: none;
    color: var(--yt-blue);
    cursor: pointer;
    font: 500 0.88rem var(--font);
    padding: 0;
    margin-left: 4px;
    transition: color 0.2s;
}

.auth-toggle-link:hover {
    color: var(--yt-blue-hover);
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--yt-border);
}

.auth-divider span {
    font-size: 0.8rem;
    color: var(--yt-text-disabled);
    text-transform: uppercase;
    font-weight: 500;
}

.auth-message {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    margin-bottom: 16px;
    text-align: center;
}

.auth-message.error {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.auth-message.success {
    background: rgba(43, 166, 64, 0.1);
    color: #2ba640;
    border: 1px solid rgba(43, 166, 64, 0.2);
}

.auth-logged-in {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.auth-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--yt-bg);
    border: 1px solid var(--yt-border);
    border-radius: var(--radius-md);
    text-align: left;
}

/* === Layer Management === */
.layers-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: var(--yt-bg);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    min-height: 38px;
}

.layer-item:hover {
    background: var(--yt-surface-hover);
    border-color: var(--yt-border);
}

.layer-item.selected {
    background: rgba(62, 166, 255, 0.08);
    border-color: rgba(62, 166, 255, 0.3);
}

.layer-order {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--yt-text-disabled);
    min-width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.layer-item img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.layer-type-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    font: 700 0.8rem var(--font);
    color: var(--yt-text-secondary);
    flex-shrink: 0;
}

.layer-name {
    flex: 1;
    font-size: 0.82rem;
    color: var(--yt-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layer-controls {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.layer-item:hover .layer-controls,
.layer-item.selected .layer-controls {
    opacity: 1;
}

.layer-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--yt-text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

.layer-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    color: var(--yt-text-primary);
}

.layer-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.layer-btn.layer-del:hover:not(:disabled) {
    background: rgba(255, 60, 60, 0.15);
    color: #ff4444;
}

/* === Transform Controls === */
.transform-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transform-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.transform-label {
    font-size: 0.75rem;
    color: var(--yt-text-secondary);
    min-width: 52px;
    flex-shrink: 0;
}

.transform-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.transform-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--yt-blue);
    border: 2px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.1s;
}

.transform-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.transform-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--yt-blue);
    border: 2px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.transform-value {
    font-size: 0.75rem;
    color: var(--yt-text-primary);
    min-width: 38px;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* =========================================
   PRICING SCREEN — Premium Redesign
   ========================================= */

#pricing-screen {
    padding: 0;
    overflow-y: auto;
}

.pricing-page-wrap {
    min-height: 100vh;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}

/* --- Ambient Glow Orbs --- */
.pricing-glow-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.pricing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    animation: pricingOrbFloat 20s ease-in-out infinite;
}

.pricing-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
    top: -8%;
    left: 10%;
    animation-delay: 0s;
}

.pricing-orb-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    top: 30%;
    right: -5%;
    animation-delay: -7s;
    animation-duration: 24s;
}

.pricing-orb-3 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, var(--accent-coral) 0%, transparent 70%);
    bottom: 5%;
    left: 25%;
    animation-delay: -14s;
    animation-duration: 22s;
}

@keyframes pricingOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -25px) scale(1.08); }
    50% { transform: translate(-15px, 15px) scale(0.96); }
    75% { transform: translate(25px, 30px) scale(1.04); }
}

/* --- Hero --- */
.pricing-hero {
    text-align: center;
    padding: 80px 24px 40px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Top badge pill */
.pricing-top-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 22px;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(167, 139, 250, 0.08));
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.pricing-top-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(34, 211, 238, 0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: tokenShimmer 2.5s linear infinite;
}

.pricing-top-badge-dot {
    width: 8px;
    height: 8px;
    background: #facc15;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(250, 204, 21, 0.6); }
    50% { box-shadow: 0 0 16px rgba(250, 204, 21, 0.9); }
}

.pricing-hero h2 {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--yt-text-primary);
}

.pricing-gradient-word {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 40%, #f97316 80%, #facc15 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.pricing-subtitle {
    color: var(--yt-text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* --- Trust Pillars --- */
.pricing-trust-pillars {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.pricing-pillar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.pricing-pillar:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.pricing-pillar-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(var(--pillar-color-rgb, 168, 85, 247), 0.12);
    border: 1px solid rgba(var(--pillar-color-rgb, 168, 85, 247), 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pillar-color, #a855f7);
    flex-shrink: 0;
}

.pricing-pillar-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.pricing-pillar-text strong {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--yt-text-primary);
}

.pricing-pillar-text span {
    font-size: 0.75rem;
    color: var(--yt-text-secondary);
    margin-top: 1px;
}

/* --- Tab Switcher --- */
.pricing-tabs {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 4px;
    gap: 2px;
}

.ptab {
    position: relative;
    padding: 10px 28px;
    border: none;
    background: transparent;
    color: var(--yt-text-secondary);
    font: 600 0.9rem var(--font);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.ptab.active {
    background: linear-gradient(135deg, var(--yt-blue) 0%, #8a5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(62, 166, 255, 0.35);
}

.ptab:not(.active):hover {
    color: var(--yt-text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.ptab-badge {
    display: inline-block;
    margin-left: 8px;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #000;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 100px;
    vertical-align: middle;
    letter-spacing: 0.03em;
}

/* --- Card Row --- */
.pricing-section {
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.pricing-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 1220px;
    margin: 36px auto 0;
    align-items: stretch;
}

.pricing-cards-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 980px;
}

/* --- Individual Card --- */
.pc-card {
    background: rgba(18, 18, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 28px 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    height: 100%;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(138, 92, 246, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

/* --- Card Header with Icon --- */
.pc-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.pc-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--card-accent, #a855f7) 15%, transparent),
        color-mix(in srgb, var(--card-accent, #a855f7) 5%, transparent)
    );
    border: 1px solid color-mix(in srgb, var(--card-accent, #a855f7) 30%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--card-accent, #a855f7);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.pc-card:hover .pc-icon-badge {
    transform: scale(1.08);
    box-shadow: 0 0 20px color-mix(in srgb, var(--card-accent, #a855f7) 25%, transparent);
}

.pc-tier-sub {
    font-size: 0.75rem;
    color: var(--yt-text-disabled);
    font-weight: 400;
    margin-top: 1px;
}

/* --- Featured card with animated border --- */
.pc-featured {
    background: rgba(62, 166, 255, 0.04);
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(62, 166, 255, 0.4), 0 0 40px rgba(62, 166, 255, 0.08);
}

.pc-featured::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 23px;
    background: linear-gradient(135deg, rgba(62, 166, 255, 0.7), rgba(138, 92, 246, 0.5), rgba(62, 166, 255, 0.7));
    background-size: 200% 200%;
    z-index: -1;
    animation: borderShimmer 4s linear infinite;
}

@keyframes borderShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Popular badge --- */
.pc-popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--yt-blue), #8a5cf6);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 100px;
    white-space: nowrap;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(62, 166, 255, 0.4);
}

/* --- Card content --- */
.pc-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    line-height: 1;
}

.pc-tier {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--yt-text-primary);
    margin-bottom: 0;
    line-height: 1.2;
}

.pc-price {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--yt-text-primary);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 10px;
}

.pc-period {
    font-size: 1rem;
    font-weight: 500;
    color: var(--yt-text-disabled);
}

/* Token badge pill */
.pc-tokens-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--yt-blue);
    margin-bottom: 20px;
    width: fit-content;
}

.pc-tokens-dot {
    font-size: 0.7rem;
    line-height: 1;
}

.pc-tokens {
    font-size: 1rem;
    font-weight: 700;
    color: var(--yt-blue);
    margin-bottom: 4px;
}

.pc-gen {
    font-size: 0.8rem;
    color: var(--yt-text-disabled);
    margin-bottom: 20px;
}

/* --- Features list --- */
.pc-features {
    list-style: none;
    padding: 0;
    margin: 0 0 26px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    flex: 1;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pc-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: var(--yt-text-secondary);
    line-height: 1.3;
}

.pc-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #22c55e;
}

.pc-check-gold {
    color: #facc15;
}

/* --- CTA Buttons --- */
.pc-btn {
    width: 100%;
    padding: 13px 0;
    border-radius: 14px;
    font: 700 0.92rem var(--font);
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.pc-btn-gradient {
    background: linear-gradient(135deg, var(--btn-grad-from, #a855f7), var(--btn-grad-to, #7c3aed));
    color: #fff;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

.pc-btn-gradient::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(25deg);
    transition: left 0.5s ease;
    pointer-events: none;
}

.pc-btn-gradient:hover::after {
    left: 120%;
}

.pc-btn-gradient:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(168, 85, 247, 0.45);
    filter: brightness(1.1);
}

.pc-btn-primary {
    background: linear-gradient(135deg, var(--yt-blue) 0%, #8a5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 18px rgba(62, 166, 255, 0.3);
}

.pc-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(62, 166, 255, 0.45);
    filter: brightness(1.1);
}

.pc-btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--yt-text-primary);
}

.pc-btn-outline:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* --- Guarantee Bar --- */
.pricing-guarantee-bar {
    max-width: 1220px;
    margin: 56px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.pricing-guarantee-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-wrap: wrap;
}

.pricing-guarantee-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pricing-guarantee-shield {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}

.pricing-guarantee-left strong {
    font-size: 0.92rem;
    color: var(--yt-text-primary);
}

.pricing-guarantee-sub {
    color: var(--yt-text-disabled);
    font-size: 0.82rem;
    margin-left: 4px;
}

.pricing-guarantee-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pricing-social-proof {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-star-row {
    color: #facc15;
    font-size: 0.92rem;
    letter-spacing: 1px;
}

.pricing-social-proof span {
    font-size: 0.82rem;
    color: var(--yt-text-disabled);
    font-weight: 500;
}

/* --- Best Value Card --- */

.pc-best-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fde047, #eab308);
    color: #000;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 6px 18px;
    border-radius: 100px;
    white-space: nowrap;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.4);
    animation: bestBadgePulse 2s ease-in-out infinite;
}

@keyframes bestBadgePulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(234, 179, 8, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(234, 179, 8, 0.6); }
}

.pc-savings {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(249, 115, 22, 0.1));
    border: 1px solid rgba(250, 204, 21, 0.3);
    color: #facc15;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    letter-spacing: 0.03em;
}

.pc-per-token {
    font-size: 0.75rem;
    color: var(--yt-text-disabled);
    margin-bottom: 4px;
    font-weight: 500;
}

/* Dynamic grid columns based on tier count */
.pricing-cards-dynamic-2 { grid-template-columns: repeat(2, 1fr) !important; max-width: 680px; }
.pricing-cards-dynamic-3 { grid-template-columns: repeat(3, 1fr) !important; max-width: 980px; }
.pricing-cards-dynamic-4 { grid-template-columns: repeat(4, 1fr) !important; max-width: 1220px; }
.pricing-cards-dynamic-5 { grid-template-columns: repeat(5, 1fr) !important; max-width: 1440px; }

/* Card entrance animation */
@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.pc-card-animated {
    animation: cardSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .pricing-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .pricing-cards-dynamic-3,
    .pricing-cards-dynamic-4,
    .pricing-cards-dynamic-5 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .pricing-trust-pillars {
        gap: 8px;
    }
    .pricing-pillar {
        padding: 10px 16px;
    }
}

@media (max-width: 640px) {

    .pricing-hero {
        padding: 60px 16px 28px;
    }
    .pricing-hero h2 {
        font-size: 1.8rem;
    }

    .pricing-cards-row,
    .pricing-cards-3 {
        grid-template-columns: 1fr;
    }

    .pricing-cards-dynamic-2,
    .pricing-cards-dynamic-3,
    .pricing-cards-dynamic-4,
    .pricing-cards-dynamic-5 {
        grid-template-columns: 1fr !important;
    }

    .pricing-guarantee-inner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .pricing-guarantee-left {
        flex-direction: column;
        align-items: center;
    }

    .pricing-section {
        padding: 0 12px;
    }

    .pricing-trust-pillars {
        flex-direction: column;
        align-items: center;
    }

    .pc-best-value {
        transform: scale(1);
    }
    .pc-best-value:hover {
        transform: translateY(-4px);
    }
}

/* =============================================
   GENERAL UI POLISH
   ============================================= */

/* Screen transition animation */
.screen {
    animation: screenFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes screenFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Button Shine Effect === */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: rotate(25deg);
    transition: left 0.6s ease;
    pointer-events: none;
}
.btn-primary:hover::after {
    left: 120%;
}

/* === Floating Animation for Hero Elements === */
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.landing-hero .feature-icon svg {
    animation: floatY 4s ease-in-out infinite;
}

.landing-hero .feature-card:nth-child(2) .feature-icon svg {
    animation-delay: -1.3s;
}
.landing-hero .feature-card:nth-child(3) .feature-icon svg {
    animation-delay: -2.6s;
}

/* === Glass Panel Enhanced === */
.glass-panel {
    background: rgba(33, 33, 33, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* === Auth Card Glassmorphism === */
.auth-card {
    background: linear-gradient(145deg, rgba(33, 33, 33, 0.9), rgba(24, 24, 24, 0.95)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Auth screen overlay enhancement */
#auth-screen.modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

/* === Upload Zone Pulse === */
.upload-zone {
    position: relative;
}
.upload-zone::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-lg) + 2px);
    background: linear-gradient(135deg, rgba(62, 166, 255, 0.2), rgba(138, 92, 246, 0.15), rgba(62, 166, 255, 0.2));
    background-size: 200% 200%;
    animation: uploadPulse 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: -1;
}
.upload-zone:hover::before {
    opacity: 1;
}
@keyframes uploadPulse {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === Stat Card Hover Glow === */
.stat-card {
    transition: all 0.3s ease;
}
.stat-card:hover {
    border-color: rgba(62, 166, 255, 0.15) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 20px rgba(62, 166, 255, 0.05) !important;
    transform: translateY(-2px);
}




/* === Gradient Text Shimmer (for hero) === */
.landing-hero .gradient-text {
    background: linear-gradient(135deg, #ff4444 0%, #ff6b6b 40%, #ff8a8a 60%, #ff4444 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 4s linear infinite;
}

@keyframes textShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* === Chip Hover Ripple === */
.chip {
    position: relative;
    overflow: hidden;
}
.chip::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.chip:hover::after {
    opacity: 1;
}

/* === Input Focus Glow Enhanced === */
.input-control:focus {
    border-color: var(--yt-blue);
    box-shadow: 0 0 0 3px rgba(62, 166, 255, 0.12), 0 0 20px rgba(62, 166, 255, 0.06);
}


/* === Showcase Gallery Image Hover === */
.showcase-section .gallery-item:hover img {
    transform: scale(1.03);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* Focus ring for accessibility */
.btn:focus-visible,
.nav-btn:focus-visible,
.ed-tool-btn:focus-visible,
.ed-icon-btn:focus-visible,
.chip:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--yt-blue);
    outline-offset: 2px;
}

/* Improved range slider track (applies everywhere) */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--yt-blue);
    border: 2px solid rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--yt-blue);
    border: 2px solid rgba(0,0,0,0.3);
    cursor: pointer;
}

/* Card hover micro-animations */
.feature-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.glass-panel {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Improved button active states */
.btn:active:not(:disabled) {
    transform: scale(0.97);
}
.btn-primary:active:not(:disabled) {
    filter: brightness(0.9);
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

/* Selection highlight color */
::selection {
    background: rgba(62, 166, 255, 0.3);
    color: var(--yt-text-primary);
}

/* Scrollbar styling for all panels */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.15);
}

/* === Canvas Resolution Selector === */
.ed-res-select {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--yt-text-secondary);
    font: 600 0.7rem var(--font);
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    transition: all 0.15s;
}
.ed-res-select:hover {
    background: rgba(255,255,255,0.1);
    color: var(--yt-text-primary);
    border-color: rgba(255,255,255,0.2);
}
.ed-res-select option {
    background: var(--yt-bg);
    color: var(--yt-text-primary);
}

/* === Site Footer (compact strip) === */
.site-footer {
    position: relative;
    margin-top: 60px;
    background: linear-gradient(0deg, rgba(8, 11, 18, 0.95) 0%, rgba(8, 11, 18, 0.7) 70%, transparent 100%);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    padding: 0;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(34,211,238,0.35) 40%, rgba(167,139,250,0.35) 60%, transparent 100%);
}

.footer-strip {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-strip-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.footer-strip-logo {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--yt-text-primary);
    letter-spacing: -0.3px;
}

.footer-strip-divider {
    color: rgba(255,255,255,0.18);
    font-size: 1.1rem;
    line-height: 1;
    margin: 0 2px;
}

.footer-strip-tagline {
    font-size: 0.77rem;
    color: var(--yt-text-disabled);
    white-space: nowrap;
}

.footer-strip-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.footer-strip-link {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-family: var(--font);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    padding: 5px 11px;
    border-radius: 100px;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.footer-strip-link:hover {
    color: var(--yt-text-primary);
    background: rgba(255,255,255,0.06);
}

.footer-strip-copy {
    font-size: 0.73rem;
    color: rgba(255,255,255,0.25);
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-strip {
        flex-wrap: wrap;
        height: auto;
        padding: 14px 20px;
        gap: 10px;
        justify-content: center;
    }
    .footer-strip-brand {
        width: 100%;
        justify-content: center;
    }
    .footer-strip-tagline,
    .footer-strip-divider {
        display: none;
    }
    .footer-strip-nav {
        justify-content: center;
    }
    .footer-strip-copy {
        width: 100%;
        text-align: center;
    }
}

/* === Legal Modal === */
.legal-modal {
    max-width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.legal-content {
    overflow-y: auto;
    flex: 1;
    padding-right: 8px;
}

.legal-content::-webkit-scrollbar {
    width: 4px;
}
.legal-content::-webkit-scrollbar-track {
    background: transparent;
}
.legal-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.legal-updated {
    color: var(--yt-text-disabled);
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.legal-content h4 {
    color: var(--yt-text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 24px 0 8px;
}

.legal-content h4:first-of-type {
    margin-top: 0;
}

.legal-content p {
    color: var(--yt-text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 10px;
}

.legal-content ul {
    color: var(--yt-text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
    padding-left: 20px;
    margin-bottom: 10px;
}

.legal-content li {
    margin-bottom: 6px;
}

.legal-content a {
    color: var(--yt-blue);
    text-decoration: none;
}
.legal-content a:hover {
    text-decoration: underline;
}

/* === Feedback Type Chips === */
.feedback-type-chip {
    cursor: pointer;
}
.feedback-type-chip .chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 8px;
    font-size: 0.82rem;
    transition: all 0.2s;
    cursor: pointer;
}
.feedback-type-chip input:checked + .chip {
    background: rgba(62, 166, 255, 0.12);
    color: var(--yt-blue);
    border-color: rgba(62, 166, 255, 0.3);
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        gap: 32px;
        padding: 32px 20px 24px;
    }
    .footer-brand {
        max-width: 100%;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
        gap: 40px;
    }
    .footer-bottom {
        padding: 16px 20px;
    }
}

/* ================================================
   NOTIFICATION TOAST + CONFIRM/PROMPT MODAL SYSTEM
   ================================================ */

/* --- Toast Container --- */
.tpro-toast-container {
    position: fixed;
    top: 72px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 40px);
}

/* --- Individual Toast --- */
.tpro-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: rgba(33, 33, 33, 0.97);
    border: 1px solid var(--yt-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    animation: tproToastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.tpro-toast:hover {
    transform: translateX(-4px);
}

.tpro-toast.toast-out {
    animation: tproToastOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Toast icon */
.tpro-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-top: 1px;
}

/* Toast body */
.tpro-toast-body {
    flex: 1;
    min-width: 0;
}

.tpro-toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--yt-text-primary);
    margin-bottom: 2px;
    line-height: 1.3;
}

.tpro-toast-message {
    font-size: 0.84rem;
    color: var(--yt-text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

/* Toast close button */
.tpro-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--yt-text-disabled);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
    margin-top: 1px;
    transition: color 0.15s;
}
.tpro-toast-close:hover {
    color: var(--yt-text-primary);
}

/* Progress bar at bottom of toast */
.tpro-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    animation: tproToastProgress linear forwards;
}

/* --- Toast Types --- */
.tpro-toast.toast-error {
    border-color: rgba(239, 68, 68, 0.3);
}
.tpro-toast.toast-error .tpro-toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.tpro-toast.toast-error .tpro-toast-title { color: #fca5a5; }
.tpro-toast.toast-error .tpro-toast-progress { background: #ef4444; }

.tpro-toast.toast-success {
    border-color: rgba(34, 197, 94, 0.3);
}
.tpro-toast.toast-success .tpro-toast-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}
.tpro-toast.toast-success .tpro-toast-title { color: #86efac; }
.tpro-toast.toast-success .tpro-toast-progress { background: #22c55e; }

.tpro-toast.toast-warning {
    border-color: rgba(250, 204, 21, 0.3);
}
.tpro-toast.toast-warning .tpro-toast-icon {
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
}
.tpro-toast.toast-warning .tpro-toast-title { color: #fde68a; }
.tpro-toast.toast-warning .tpro-toast-progress { background: #facc15; }

.tpro-toast.toast-info {
    border-color: rgba(167, 139, 250, 0.3);
}
.tpro-toast.toast-info .tpro-toast-icon {
    background: rgba(167, 139, 250, 0.15);
    color: var(--yt-blue);
}
.tpro-toast.toast-info .tpro-toast-title { color: #c4b5fd; }
.tpro-toast.toast-info .tpro-toast-progress { background: var(--yt-blue); }

/* --- Toast Animations --- */
@keyframes tproToastIn {
    from { opacity: 0; transform: translateX(60px) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes tproToastOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to   { opacity: 0; transform: translateX(60px) scale(0.95); }
}
@keyframes tproToastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* --- Confirm / Prompt Modal --- */
.tpro-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: tproOverlayIn 0.25s ease-out;
    padding: 20px;
}

.tpro-modal-overlay.modal-out {
    animation: tproOverlayOut 0.2s ease-in forwards;
}

.tpro-modal-card {
    background: var(--yt-surface);
    border: 1px solid var(--yt-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.04);
    animation: tproModalCardIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.tpro-modal-overlay.modal-out .tpro-modal-card {
    animation: tproModalCardOut 0.2s ease-in forwards;
}

.tpro-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.tpro-modal-icon.icon-warning {
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.2);
}

.tpro-modal-icon.icon-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.tpro-modal-icon.icon-info {
    background: rgba(62, 166, 255, 0.12);
    border: 1px solid rgba(62, 166, 255, 0.2);
}

.tpro-modal-icon.icon-input {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.tpro-modal-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--yt-text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.tpro-modal-message {
    font-size: 0.92rem;
    color: var(--yt-text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.tpro-modal-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--yt-bg);
    border: 1px solid var(--yt-border);
    border-radius: var(--radius-md);
    color: var(--yt-text-primary);
    font: 1rem var(--font);
    margin-bottom: 20px;
    transition: var(--transition);
}
.tpro-modal-input:focus {
    outline: none;
    border-color: var(--yt-blue);
    box-shadow: var(--glow-blue);
}
.tpro-modal-input::placeholder {
    color: var(--yt-text-disabled);
}

.tpro-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.tpro-modal-btn {
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font: 500 0.92rem var(--font);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.tpro-modal-btn.btn-cancel {
    background: var(--yt-surface-hover);
    color: var(--yt-text-primary);
}
.tpro-modal-btn.btn-cancel:hover {
    background: var(--yt-border);
}

.tpro-modal-btn.btn-confirm {
    background: var(--yt-text-primary);
    color: var(--yt-bg);
}
.tpro-modal-btn.btn-confirm:hover {
    background: #d9d9d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.08);
}

.tpro-modal-btn.btn-danger {
    background: #ef4444;
    color: white;
}
.tpro-modal-btn.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* --- Modal Animations --- */
@keyframes tproOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes tproOverlayOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes tproModalCardIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes tproModalCardOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.92) translateY(12px); }
}

/* --- Toast/modal mobile adjustments --- */
@media (max-width: 480px) {
    .tpro-toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }
    .tpro-modal-card {
        max-width: 100%;
        padding: 22px;
    }
}

/* =============================================
   EXPANSION PANELS — Gen from Video & Gen from Prompt
   ============================================= */

@keyframes panelSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.expansion-panel {
    position: relative;
    border-radius: 14px;
    padding: 18px 18px 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: panelSlideDown 0.22s cubic-bezier(0.4,0,0.2,1);
    transition: box-shadow 0.3s;
}

/* YouTube / Video panel — purple accent */
.expansion-panel-video {
    background: linear-gradient(145deg, rgba(168,85,247,0.07) 0%, rgba(0,0,0,0.3) 100%);
    border: 1px solid rgba(168,85,247,0.22);
    box-shadow: 0 4px 24px rgba(168,85,247,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
    margin-bottom: 12px;
}

.expansion-panel-video:hover {
    box-shadow: 0 6px 32px rgba(168,85,247,0.14), inset 0 1px 0 rgba(255,255,255,0.07);
}

/* Panel header row */
.expansion-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-right: 32px; /* space for close btn */
}

.expansion-panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
}

.expansion-panel-icon-video {
    background: rgba(168,85,247,0.18);
    color: #c084fc;
}

.expansion-panel-icon-prompt {
    background: rgba(59,130,246,0.18);
    color: #60a5fa;
}

.expansion-panel-title {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.expansion-panel-title-video { color: #c084fc; }
.expansion-panel-title-prompt { color: #60a5fa; }

/* Prompt panel — blue accent */
.expansion-panel-prompt {
    background: linear-gradient(145deg, rgba(59,130,246,0.07) 0%, rgba(0,0,0,0.3) 100%);
    border: 1px solid rgba(59,130,246,0.22);
    box-shadow: 0 4px 24px rgba(59,130,246,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
    margin-top: 12px;
}

.expansion-panel-prompt:hover {
    box-shadow: 0 6px 32px rgba(59,130,246,0.14), inset 0 1px 0 rgba(255,255,255,0.07);
}

/* Shared close button for panels */
.expansion-panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--yt-text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: color 0.2s, background 0.2s;
}

.expansion-panel-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Panel hint text */
.expansion-panel-hint {
    font-size: 0.73rem;
    color: var(--yt-text-disabled);
    margin-top: 8px;
    line-height: 1.4;
}

/* =============================================
   RESPONSIVE — iPhone & iPad Optimisations
   Breakpoints:
     1024px  iPad landscape / small desktop
      768px  iPad portrait
      600px  large phones (already handled above)
      430px  iPhone 14 Pro Max / Plus
      390px  iPhone 14 / 15 Pro
   ============================================= */

/* ---- Tablet (≤1024px) ---- */
@media (max-width: 1024px) {
    /* Shrink navbar nav-links gap */
    .nav-links {
        gap: 4px;
    }
    .nav-btn {
        padding: 8px 12px;
        font-size: 0.88rem;
    }
    .nav-btn-tokens,
    .nav-btn-create-account {
        padding: 7px 12px;
        font-size: 0.80rem;
    }
    /* Hero headline slightly smaller on 1024 */
    .hero-line-plain,
    .hero-line-highlight {
        font-size: clamp(2.4rem, 5vw, 4rem);
    }
    /* LP feature grid 2 cols for tablets with 4 items */
    .lp-feature-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---- iPad portrait & large phones (≤768px) ---- */
@media (max-width: 768px) {
    /* Show hamburger, hide horizontal nav */
    .mobile-menu-btn {
        display: flex;
    }

    /* Nav links become a slide-down drawer */
    .nav-links {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        z-index: 999;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 16px 20px;
        background: rgba(13, 13, 13, 0.97);
        backdrop-filter: blur(24px) saturate(1.4);
        -webkit-backdrop-filter: blur(24px) saturate(1.4);
        border-bottom: 1px solid rgba(255,255,255,0.07);
        box-shadow: 0 16px 48px rgba(0,0,0,0.5);
        animation: mobileNavIn 0.25s cubic-bezier(0.4,0,0.2,1);
    }

    .nav-links.open {
        display: flex;
    }

    @keyframes mobileNavIn {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* Nav items inside drawer */
    .nav-links .nav-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 16px;
        border-radius: var(--radius-md);
        font-size: 1rem;
        font-weight: 500;
        min-height: 48px;   /* touch-target */
    }
    .nav-links .nav-btn.active {
        background: var(--yt-text-primary);
        color: var(--yt-bg);
    }
    .nav-links .nav-divider {
        display: none;
    }
    .nav-btn-tokens {
        padding: 12px 16px;
        font-size: 0.9rem;
        margin-top: 4px;
    }
    .nav-btn-create-account {
        padding: 12px 16px;
        font-size: 0.95rem;
        height: auto;
        white-space: normal;
    }
    .nav-create-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0px;
        line-height: 1.2;
    }
    .nav-create-dash {
        display: none;
    }
    .nav-create-subtext {
        font-size: 0.78rem;
        opacity: 0.85;
        font-weight: 500;
    }
    .btn.btn-sm#loginBtn {
        width: 100%;
        margin-top: 4px;
        padding: 12px 16px;
        font-size: 0.95rem;
        min-height: 48px;
        border-radius: var(--radius-md);
    }

    /* Hero */
    .landing-hero {
        padding-top: 28px;
    }
    .hero-badge-row {
        margin-bottom: 20px;
    }
    .hero-headline {
        letter-spacing: -1px;
        margin-bottom: 18px;
    }
    .hero-line-plain,
    .hero-line-highlight {
        font-size: clamp(2.2rem, 7vw, 3.2rem);
    }
    .hero-sub {
        font-size: 1rem;
    }

    /* Container padding */
    .container {
        padding: 0 16px;
    }

    /* Screen top padding (navbar = 56px) */
    .screen {
        padding-top: 68px;
        padding-bottom: 48px;
    }

    /* Feature grid 2-col at 768 */
    .lp-feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .lp-card {
        padding: 22px 18px;
    }

    /* CTA block */
    .lp-cta-inner {
        padding: 28px 20px;
    }
    .lp-cta-heading {
        font-size: clamp(1.3rem, 4vw, 1.8rem);
    }
    .lp-cta-btn {
        width: 100%;
        max-width: 360px;
        padding: 13px 24px;
        font-size: 1rem;
    }
    .lp-cta-wrap {
        margin-bottom: 48px;
    }

    /* Dashboard grid 1-col earlier */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dash-card {
        padding: 20px;
        min-height: 72px;
    }

    /* Ensure all galleries stack vertically on tablet/mobile */
    .gallery-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px;
        overflow: hidden !important;
    }
    .gallery-grid .gallery-item {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Guest section spacing */
    #landingGuestSection {
        margin-top: 32px;
    }
}

/* ---- Large phones (≤430px — iPhone Pro Max, etc.) ---- */
@media (max-width: 430px) {
    /* Hero text */
    .hero-line-plain,
    .hero-line-highlight {
        font-size: clamp(1.9rem, 9vw, 2.6rem);
        letter-spacing: -0.5px;
    }
    .hero-sub {
        font-size: 0.93rem;
    }
    .badge-pill {
        font-size: 0.72rem;
        padding: 5px 12px;
    }

    /* Feature grid: 1-col on phones */
    .lp-feature-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* CTA */
    .lp-cta-inner {
        padding: 22px 16px;
    }
    .lp-cta-eyebrow {
        font-size: 0.72rem;
    }
    .lp-cta-btn {
        font-size: 0.95rem;
        padding: 13px 20px;
    }

    /* Gallery item strictly follows vertical grid on phones */
    .gallery-item {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Dashboard greeting / title */
    .dashboard-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    /* Container edge-to-edge feel */
    .container {
        padding: 0 14px;
    }

    /* Paywall toast */
    #paywallToast {
        top: 62px !important;
        padding: 12px 16px !important;
    }

    /* Ensure all interactive elements ≥44px tap target */
    .btn, .nav-btn, .chip, .lp-cta-btn {
        min-height: 44px;
    }
}

/* ===== Create Prompt Modal ===== */
.cp-field-group {
    margin-bottom: 20px;
}

.cp-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--yt-text-primary);
    margin-bottom: 8px;
}

.cp-label-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0;
}

.cp-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cp-chip {
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--yt-text-secondary);
    font: 500 0.82rem var(--font);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.cp-chip:hover {
    background: rgba(168,85,247,0.12);
    border-color: rgba(168,85,247,0.35);
    color: #c084fc;
}

.cp-chip.active {
    background: rgba(168,85,247,0.2);
    border-color: #a855f7;
    color: #c084fc;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(168,85,247,0.15);
}



/* Create Prompt button purple hover glow */
#createPromptBtn:hover {
    background: rgba(168,85,247,0.1);
    border-color: rgba(168,85,247,0.6) !important;
    box-shadow: 0 0 12px rgba(168,85,247,0.15);
}

/* =============================================
   CREATOR HOOK SECTION
   ============================================= */

.creator-hook-section {
    margin-top: 96px;
    padding: 0 0 16px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* ── Header ── */
.creator-hook-header {
    text-align: center;
    margin-bottom: 52px;
}

.creator-hook-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.25);
    color: var(--accent-cyan);
    font: 700 0.75rem var(--font);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 40px;
    margin-bottom: 22px;
}

.creator-hook-pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5);
    animation: hookPulse 2s ease-out infinite;
}

@keyframes hookPulse {
    0%   { box-shadow: 0 0 0 0 rgba(34,211,238,0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(34,211,238,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
}

.creator-hook-headline {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--yt-text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.creator-hook-highlight {
    background: linear-gradient(120deg, var(--accent-cyan) 0%, var(--accent-violet) 50%, var(--accent-coral) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.creator-hook-sub {
    font-size: 1rem;
    color: var(--yt-text-secondary);
    line-height: 1.65;
    max-width: 580px;
    margin: 0 auto;
}

/* ── Consolidated Impact Panel ── */
.creator-hook-impact {
    position: relative;
    border-radius: 20px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(34,211,238,0.15);
    padding: 44px 40px;
    margin-bottom: 44px;
    overflow: hidden;
}

.hook-impact-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,211,238,0.10) 0%, rgba(167,139,250,0.05) 40%, transparent 70%);
    pointer-events: none;
    animation: impactGlowPulse 4s ease-in-out infinite alternate;
}

@keyframes impactGlowPulse {
    0%   { opacity: 0.6; transform: translateX(-50%) scale(0.95); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.hook-impact-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Big stat centered */
.hook-impact-big-stat {
    flex-shrink: 0;
    text-align: center;
    width: 100%;
}

.hook-impact-value {
    font-size: clamp(3.2rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 32px rgba(34,211,238,0.25);
}

.hook-impact-suffix {
    font-size: 0.5em;
    font-weight: 800;
}

.hook-impact-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--yt-text-primary);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.hook-impact-tagline {
    font-size: 0.85rem;
    color: var(--yt-text-secondary);
    line-height: 1.5;
}

.hook-money-highlight {
    color: var(--accent-emerald);
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 768px) {
    .creator-hook-impact {
        padding: 32px 24px;
    }
}

/* ── Gallery ── */
.hook-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 48px;
    overflow: hidden;
}

.hook-gallery .gallery-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    position: relative;
    transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}

.hook-gallery .gallery-item:hover {
    transform: translateY(-5px) scale(1.012);
    border-color: rgba(250,204,21,0.35);
    box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(250,204,21,0.12);
}

.hook-gallery .gallery-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.hook-gallery-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: rgba(10,10,10,0.92);
    backdrop-filter: blur(6px);
}

.hook-gallery-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--yt-text-secondary);
}

.hook-gallery-ctr {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
}

/* ── Bottom CTA bar ── */
.creator-hook-cta {
    background: linear-gradient(135deg, rgba(34,211,238,0.07) 0%, rgba(167,139,250,0.07) 100%);
    border: 1px solid rgba(34,211,238,0.18);
    border-radius: 18px;
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
}

.creator-hook-cta::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,211,238,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.creator-hook-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.creator-hook-cta-heading {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--yt-text-primary);
    margin-bottom: 4px;
}

.creator-hook-cta-body {
    font-size: 0.85rem;
    color: var(--yt-text-secondary);
}

.creator-hook-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: linear-gradient(135deg, var(--accent-cyan), #0891b2);
    color: #080b12;
    font: 700 0.9rem var(--font);
    padding: 13px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 4px 20px rgba(34,211,238,0.3);
    flex-shrink: 0;
}

.creator-hook-cta-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 32px rgba(34,211,238,0.45);
}

.creator-hook-cta-btn:active {
    transform: scale(0.97);
}

/* ── Responsive: Creator Hook Section ── */
@media (max-width: 768px) {
    .creator-hook-section {
        margin-top: 56px;
        padding: 0 0 12px;
    }
    .creator-hook-header {
        margin-bottom: 32px;
    }
    .creator-hook-headline {
        font-size: 1.55rem;
        margin-bottom: 12px;
    }
    .creator-hook-sub {
        font-size: 0.88rem;
        max-width: 100%;
        padding: 0 8px;
    }
    .creator-hook-impact {
        padding: 28px 20px;
        margin-bottom: 28px;
        border-radius: 14px;
    }
    .hook-impact-value {
        font-size: 2.8rem;
    }
    .hook-impact-label {
        font-size: 0.9rem;
    }
    .hook-impact-tagline {
        font-size: 0.8rem;
    }
    .hook-gallery {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px;
        margin-bottom: 28px;
        overflow: hidden !important;
        flex: unset !important;
    }
    .hook-gallery .gallery-item {
        flex: unset !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .hook-gallery-footer {
        padding: 8px 12px;
    }
    .hook-gallery-label {
        font-size: 0.75rem;
    }
    .hook-gallery-ctr {
        font-size: 0.7rem;
    }
    .creator-hook-cta {
        padding: 22px 18px;
        border-radius: 14px;
    }
    .creator-hook-cta-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .creator-hook-cta-heading {
        font-size: 1.05rem;
    }
    .creator-hook-cta-body {
        font-size: 0.8rem;
    }
    .creator-hook-cta-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .creator-hook-section {
        margin-top: 40px;
    }
    .creator-hook-headline {
        font-size: 1.35rem;
    }
    .creator-hook-impact {
        padding: 24px 16px;
    }
    .hook-impact-value {
        font-size: 2.4rem;
    }
    .hook-impact-label {
        font-size: 0.85rem;
    }
    .hook-impact-tagline {
        font-size: 0.76rem;
    }
    .creator-hook-cta {
        padding: 18px 14px;
    }
}

/* === Notification Modal Specifics === */
#notificationModal .modal-card {
    background: #12141c;
    border: 1px solid rgba(168, 85, 247, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 20px rgba(168, 85, 247, 0.05);
}

#notificationModal .modal-header {
    background: rgba(168, 85, 247, 0.03);
    padding: 20px 24px;
}

#notificationList::-webkit-scrollbar {
    width: 6px;
}

#notificationList::-webkit-scrollbar-track {
    background: transparent;
}

#notificationList::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#notificationList::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.3);
}

.notification-item {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(168, 85, 247, 0.04) !important;
}

.notif-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--yt-text-secondary);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.notif-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--yt-text-primary);
}

.notif-filter-btn.active {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.4);
    color: #a855f7;
}