
        :root {
            --bg: #08080e;
            --bg2: #10101a;
            --panel: rgba(255, 255, 255, 0.03);
            --accent: #00ffcc;
            --accent2: #7c3aed;
            --ai: #f59e0b;
            --text: #e2e2f0;
            --muted: #5a5a7a;
            --muted2: #8888aa;
            --border: rgba(255, 255, 255, 0.08);
            --border2: rgba(255, 255, 255, 0.15);
            --red: #ff4757;
            --green: #2ed573;
            --gold: #ffd700;
            --yellow: #ffd32a;
            --font-display: 'Epilogue', sans-serif;
            --font-body: 'Plus Jakarta Sans', sans-serif;
            --font-mono: 'JetBrains Mono', monospace;
            --font-alt: 'Lexend Deca', sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html,
        body {
            height: 100%;
            scroll-behavior: smooth;
        }

        /* ── Kill double-tap zoom everywhere ── */
        html {
            touch-action: manipulation;
        }

        * {
            touch-action: manipulation;
        }

        body {
            background: var(--bg);
            color: var(--text);
            font-family: var(--font-body);
            line-height: 1.6;
            overflow-x: hidden;
        }

        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background-image: linear-gradient(rgba(0, 255, 204, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 204, .025) 1px, transparent 1px);
            background-size: 48px 48px;
            pointer-events: none;
            z-index: 0;
        }

        #mainPage {
            position: relative;
            z-index: 1;
        }

        /* ── GLASSMORPHISM NAVBAR ── */
        nav {
            position: fixed;
            left: 0;
            right: 0;
            z-index: 1000;
            padding: 16px 20px;
            top: 0;
        }

        .nav-container {
            max-width: 1400px;
            margin: 0 auto;
        }

        nav .nav-inner {
            background: linear-gradient(135deg, rgba(18, 25, 45, 0.7), rgba(10, 15, 30, 0.8));
            backdrop-filter: blur(16px) saturate(180%);
            -webkit-backdrop-filter: blur(16px) saturate(180%);
            border: 1px solid rgba(100, 140, 255, 0.15);
            border-radius: 60px;
            padding: 8px 24px 8px 28px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(100, 150, 255, 0.1) inset;
        }

        .logo {
            font-family: var(--font-alt);
            font-size: 1.3rem;
            font-weight: 600;
            background: linear-gradient(135deg, #fff 30%, #0fc 70%, #7c3aed 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-decoration: none;
            letter-spacing: -0.5px;
        }

        .logo span {
            /* color handled by parent gradient */
        }
        
        

        .nav-links {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .nav-links a {
            padding: 10px 18px;
            font-size: .95rem;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            border-radius: 40px;
            transition: all 0.2s;
            letter-spacing: -0.01em;
        }

        .nav-links a:hover {
            color: white;
            background: rgba(255, 255, 255, 0.05);
        }

        .nav-links a.nav-cta {
            background: linear-gradient(135deg, var(--accent), #00ccaa);
            color: #000;
            font-weight: 700;
            margin-left: 8px;
            box-shadow: 0 8px 20px rgba(0, 255, 204, 0.2);
        }

        .nav-links a.nav-cta:hover {
            background: linear-gradient(135deg, #00ffcc, #00b397);
            transform: translateY(-2px);
        }

        .ham-btn {
            display: none;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(100, 140, 255, 0.2);
            border-radius: 40px;
            color: white;
            width: 46px;
            height: 46px;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 5px;
            cursor: pointer;
            transition: all .2s;
        }

        .ham-btn:hover {
            border-color: var(--accent);
            background: rgba(0, 255, 204, 0.1);
        }

        .ham-line {
            width: 20px;
            height: 2px;
            background: currentColor;
            border-radius: 2px;
            transition: transform .3s, opacity .3s;
        }

        .ham-btn.open .ham-line:nth-child(1) {
            transform: translateY(7px) rotate(45deg);
        }

        .ham-btn.open .ham-line:nth-child(2) {
            opacity: 0;
        }

        .ham-btn.open .ham-line:nth-child(3) {
            transform: translateY(-7px) rotate(-45deg);
        }

        .nav-dropdown {
            display: none;
            position: fixed;
            top: 88px;
            left: 20px;
            right: 20px;
            background: linear-gradient(135deg, rgba(18, 25, 45, 0.95), rgba(10, 15, 30, 0.98));
            backdrop-filter: blur(20px);
            border: 1px solid rgba(100, 140, 255, 0.2);
            border-radius: 24px;
            padding: 16px;
            z-index: 999;
            opacity: 0;
            transform: translateY(-10px);
            transition: all 0.3s ease;
            pointer-events: none;
        }

        .nav-dropdown.open {
            opacity: 1;
            transform: translateY(0);
            pointer-events: all;
            display: block;
        }

        .nav-dropdown-inner {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .nav-dropdown a {
            display: flex;
            align-items: center;
            gap: 12px;
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            font-size: .95rem;
            font-weight: 500;
            padding: 12px 16px;
            border-radius: 16px;
            transition: all .15s;
        }

        .nav-dropdown a:hover {
            color: white;
            background: rgba(0, 255, 204, 0.1);
        }

        .nav-dropdown a .nav-link-icon {
            width: 24px;
            text-align: center;
            color: var(--accent);
        }

        .nav-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.1);
            margin: 10px 0;
        }

        /* User button in navbar with crown */
        .nav-user-btn {
            display: none;
            align-items: center;
            gap: 8px;
            padding: 5px 14px 5px 5px;
            background: rgba(0, 255, 204, 0.07);
            border: 1px solid rgba(0, 255, 204, 0.2);
            border-radius: 40px;
            cursor: pointer;
            transition: all .2s;
            font-family: var(--font-body);
            color: white;
            text-decoration: none;
            position: relative;
        }

        .nav-user-btn:hover {
            background: rgba(0, 255, 204, 0.12);
            border-color: rgba(0, 255, 204, 0.35);
        }

        .nav-user-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid rgba(0, 255, 204, 0.3);
        }

        .nav-user-name {
            font-size: .8rem;
            font-weight: 600;
            color: white;
            max-width: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .nav-user-arrow {
            font-size: .6rem;
            opacity: .6;
            color: white;
        }

        .crown-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: var(--accent);
            color: #000;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: .7rem;
            box-shadow: 0 0 10px var(--accent);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {

            0%,
            100% {
                transform: scale(1)
            }

            50% {
                transform: scale(1.1)
            }
        }

        #userDropdown {
            position: fixed;
            top: 80px;
            right: 24px;
            background: linear-gradient(145deg, rgba(18, 18, 32, 0.99), rgba(10, 10, 24, 0.99));
            border: 1px solid rgba(0, 255, 204, 0.15);
            border-radius: 18px;
            padding: 8px;
            width: 260px;
            z-index: 1500;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
            opacity: 0;
            transform: translateY(-8px) scale(0.97);
            transition: all .2s cubic-bezier(.34, 1.56, .64, 1);
            pointer-events: none;
            display: none;
        }

        #userDropdown.open {
            opacity: 1;
            transform: translateY(0) scale(1);
            pointer-events: all;
            display: block;
        }

        .udrop-user {
            padding: 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.07);
            margin-bottom: 6px;
            position: relative;
        }

        .udrop-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid rgba(0, 255, 204, 0.25);
        }

        .udrop-crown-badge {
            position: absolute;
            top: 8px;
            left: 30px;
            background: var(--accent);
            color: #000;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: .6rem;
            box-shadow: 0 0 8px var(--accent);
        }

        .udrop-name {
            font-weight: 700;
            font-size: .84rem;
            color: white;
        }

        .udrop-email {
            font-size: .64rem;
            color: var(--muted2);
            font-family: var(--font-mono);
        }

        .udrop-plan {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: .7rem;
            font-weight: 700;
            text-transform: uppercase;
            margin-top: 4px;
        }

        .udrop-plan.free {
            background: rgba(136, 136, 170, 0.2);
            color: var(--muted);
        }

        .udrop-plan.pro {
            background: rgba(0, 255, 204, 0.2);
            color: var(--accent);
        }

        .udrop-plan.proplus {
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 170, 0, 0.2));
            color: var(--gold);
        }

        .udrop-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
            padding: 6px 8px 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.07);
            margin-bottom: 6px;
        }

        .udrop-stat {
            text-align: center;
            padding: 8px 4px;
            background: rgba(0, 255, 204, 0.04);
            border: 1px solid rgba(0, 255, 204, 0.08);
            border-radius: 10px;
        }

        .udrop-stat-num {
            display: block;
            font-family: var(--font-display);
            font-size: 1.1rem;
            font-weight: 900;
            color: var(--accent);
        }

        .udrop-stat-label {
            font-size: .5rem;
            color: var(--muted2);
            text-transform: uppercase;
        }

        .usage-bar {
            padding: 12px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 12px;
            margin-bottom: 16px;
        }

        .usage-row {
            display: flex;
            justify-content: space-between;
            font-size: .8rem;
            color: var(--muted);
            margin-bottom: 6px;
        }

        .usage-track {
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
        }

        .usage-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent), var(--accent2));
            border-radius: 2px;
            transition: width 0.3s;
        }

        .usage-fill.warning {
            background: linear-gradient(90deg, #f59e0b, #ef4444);
        }

        .udrop-actions {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .udrop-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            color: var(--text);
            text-decoration: none;
            border-radius: 10px;
            transition: all 0.2s;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 0.9rem;
            text-align: left;
            width: 100%;
        }

        .udrop-item:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .udrop-item i {
            color: var(--accent);
            width: 20px;
        }

        .udrop-logout {
            color: var(--red);
        }

        .udrop-logout i {
            color: var(--red);
        }

        /* Hero Section */
        .page-inner {
            max-width: 1200px;
            margin: 0 auto;
            padding: 140px 24px 60px;
        }

        .hero {
            text-align: center;
            max-width: 900px;
            margin: 0 auto;
        }

        .hero-tag {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: rgba(0, 255, 204, 0.1);
            border: 1px solid rgba(0, 255, 204, 0.2);
            border-radius: 50px;
            padding: 8px 16px;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--accent);
            margin-bottom: 32px;
            font-family: var(--font-mono);
        }

        .dot-pulse {
            width: 8px;
            height: 8px;
            background: var(--accent);
            border-radius: 50%;
            animation: dotPulse 2s infinite;
        }

        @keyframes dotPulse {

            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: 0.5;
                transform: scale(0.8);
            }
        }

        h1 {
            font-family: var(--font-display);
            font-size: clamp(2.5rem, 6vw, 4.5rem);
            font-weight: 800;
            line-height: 1.0;
            margin-bottom: 20px;
            letter-spacing: -3px;
        }

        h1 em {
            color: var(--accent);
            font-style: normal;
            position: relative;
        }

        h1 em::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--accent), transparent);
            border-radius: 2px;
        }

        .h1-sub {
            color: var(--muted2);
            font-size: clamp(1.4rem, 3vw, 2.4rem);
            display: block;
            margin-top: 8px;
            letter-spacing: -1.5px;
            font-weight: 700;
        }

        .hero-desc {
            color: var(--muted2);
            font-size: 1.1rem;
            max-width: 600px;
            margin: 0 auto 40px;
            line-height: 1.7;
        }

        /* AI Input Section */
        .ai-input-section {
            max-width: 800px;
            margin: 0 auto 60px;
        }

        .ai-input-wrap {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            border-radius: 24px;
            padding: 8px;
            position: relative;
            transition: all 0.3s;
        }

        .ai-input-wrap:focus-within {
            border-color: var(--accent);
            box-shadow: 0 0 0 4px rgba(0, 255, 204, 0.1), 0 20px 60px rgba(0, 0, 0, 0.5);
            transform: translateY(-2px);
        }

        .ai-textarea {
            width: 100%;
            background: transparent;
            border: none;
            color: var(--text);
            font-family: var(--font-body);
            font-size: 1.1rem;
            padding: 20px;
            resize: none;
            outline: none;
            min-height: 140px;
        }

        .ai-textarea::placeholder {
            color: var(--muted2);
        }

        .ai-input-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 12px 12px;
            flex-wrap: wrap;
            gap: 10px;
        }

        .ai-hint {
            color: var(--muted2);
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* CHANGE 03: Modify prompt icon button - no label, auto-rewrites on click */
        .ai-modify-icon-btn {
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.25);
            color: var(--ai);
            width: 42px;
            height: 42px;
            border-radius: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            transition: all 0.2s;
            flex-shrink: 0;
            position: relative;
        }

        .ai-modify-icon-btn:hover:not(:disabled) {
            background: rgba(245, 158, 11, 0.2);
            border-color: rgba(245, 158, 11, 0.5);
            transform: scale(1.05);
        }

        .ai-modify-icon-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .ai-modify-icon-btn .modify-spinner {
            display: none;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(245, 158, 11, 0.3);
            border-top-color: var(--ai);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .ai-modify-icon-btn.loading i {
            display: none;
        }

        .ai-modify-icon-btn.loading .modify-spinner {
            display: block;
        }

        /* Tooltip for modify btn */
        .ai-modify-icon-btn::after {
            content: 'Enhance Prompt with AI';
            position: absolute;
            bottom: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%);
            background: rgba(16, 16, 28, 0.96);
            border: 1px solid var(--border2);
            color: var(--text);
            font-size: 0.72rem;
            font-weight: 600;
            white-space: nowrap;
            padding: 5px 10px;
            border-radius: 8px;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.15s;
        }

        .ai-modify-icon-btn:hover::after {
            opacity: 1;
        }

        .ai-btn-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .ai-create-btn {
            background: #0fc;
            color: #000;
            border: none;
            padding: 14px 32px;
            border-radius: 16px;
            font-weight: 700;
            font-size: 1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.3s;
        }

        .ai-create-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
        }

        .ai-create-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Suggestions row with clone link */
        .ai-suggestions-row {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .ai-suggestions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            margin-top: 24px;
        }

        .ai-suggestion {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            color: var(--muted2);
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .clone-link-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 14px;
            background: rgba(0, 255, 204, 0.08);
            border: 1px solid rgba(0, 255, 204, 0.3);
            border-radius: 20px;
            color: #0fc;
            font-size: 0.78rem;
            font-weight: 600;
            text-decoration: none;
            white-space: nowrap;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .clone-link-btn:hover {
            background: rgba(0, 255, 204, 0.15);
            border-color: rgba(0, 255, 204, 0.6);
            transform: translateY(-1px);
        }

        .ai-gen-counter {
            font-size: 0.72rem;
            color: var(--muted2);
            font-family: var(--font-mono);
            margin-top: 6px;
            min-height: 18px;
        }

        .ai-gen-counter .cnt-num {
            font-weight: 700;
        }

        .ai-gen-counter .cnt-num.ok {
            color: var(--accent);
        }

        .ai-gen-counter .cnt-num.warn {
            color: #f59e0b;
        }

        .ai-gen-counter .cnt-num.none {
            color: #ef4444;
        }

        /* Sparkle animation on enhance icon */
        @keyframes sparkle {

            0%,
            100% {
                transform: scale(1) rotate(0deg);
                filter: brightness(1);
            }

            30% {
                transform: scale(1.2) rotate(-15deg);
                filter: brightness(1.4);
            }

            60% {
                transform: scale(0.9) rotate(10deg);
                filter: brightness(1.2);
            }
        }

        .ai-modify-icon-btn:not(.loading):hover .ai-sparkle-icon {
            animation: sparkle 0.5s ease;
        }

        .ai-modify-icon-btn.loading .ai-sparkle-icon {
            display: none;
        }

        .ai-suggestion:hover {
            border-color: var(--accent);
            color: var(--accent);
            background: rgba(0, 255, 204, 0.05);
        }

        /* Details Modal */
        #detailsModal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(8px);
            z-index: 1000;
            align-items: flex-end;
            justify-content: center;
            padding: 0;
        }

        #detailsModal.open {
            display: flex;
            animation: modalFadeIn 0.18s ease;
        }

        @keyframes modalFadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .details-box {
            background: linear-gradient(160deg, #111122 0%, #0c0c1c 100%);
            border: 1px solid rgba(0, 255, 204, 0.18);
            border-bottom: none;
            border-radius: 24px 24px 0 0;
            width: 100%;
            max-width: 100%;
            max-height: 92dvh;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            animation: slideUp 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
            box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.7);
        }

        @keyframes slideUp {
            from {
                transform: translateY(60px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        /* Handle bar */
        .details-box::before {
            content: '';
            display: block;
            width: 36px;
            height: 4px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 99px;
            margin: 12px auto 0;
        }

        /* Desktop: centered card */
        @media (min-width: 600px) {
            #detailsModal {
                align-items: center;
                padding: 20px;
            }

            .details-box {
                max-width: 560px;
                border-radius: 24px;
                border-bottom: 1px solid rgba(0, 255, 204, 0.18);
                max-height: 90vh;
            }

            .details-box::before {
                display: none;
            }
        }

        @keyframes popIn {
            from {
                opacity: 0;
                transform: scale(0.95) translateY(20px);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .details-header {
            padding: 24px;
            border-bottom: 1px solid var(--border);
        }

        .details-header h3 {
            font-family: var(--font-display);
            font-size: 1.4rem;
            display: flex;
            align-items: center;
            gap: 12px;
            color: white;
        }

        .details-body {
            padding: 24px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            color: var(--muted);
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .form-input,
        .form-textarea,
        .form-select {
            width: 100%;
            background: rgba(255, 255, 255, 0.05);
            border: 1.5px solid var(--border);
            border-radius: 12px;
            padding: 14px 16px;
            color: var(--text);
            font-family: var(--font-body);
            font-size: 0.95rem;
            outline: none;
            transition: all 0.2s;
        }

        .form-input:focus,
        .form-textarea:focus,
        .form-select:focus {
            border-color: var(--accent);
            background: rgba(255, 255, 255, 0.08);
        }

        .form-textarea {
            resize: vertical;
            min-height: 80px;
        }

        .form-select {
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888aa' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 16px center;
            padding-right: 40px;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }

        .optional-tag {
            color: var(--muted2);
            font-size: 0.8rem;
            font-weight: 400;
            text-transform: none;
            margin-left: 4px;
        }

        /* CHANGE 02: Visual color picker - swatches, pick 2 main colors */
        .color-picker-section {
            margin-bottom: 20px;
        }

        .color-label {
            display: block;
            color: var(--muted);
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .color-sublabel {
            font-size: 0.78rem;
            color: var(--muted2);
            margin-bottom: 12px;
        }

        .color-swatches {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
        }

        .color-swatch {
            position: relative;
            cursor: pointer;
            border-radius: 12px;
            transition: transform 0.15s;
        }

        .color-swatch:hover {
            transform: scale(1.08);
        }

        .color-swatch-inner {
            width: 100%;
            aspect-ratio: 1;
            border-radius: 10px;
            border: 2.5px solid transparent;
            transition: all 0.2s;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .color-swatch.selected-1 .color-swatch-inner {
            border-color: white;
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 0 14px rgba(255, 255, 255, 0.15);
        }

        .color-swatch.selected-2 .color-swatch-inner {
            border-color: rgba(255, 255, 255, 0.7);
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 0 10px rgba(255, 255, 255, 0.1);
        }

        .swatch-badge {
            display: none;
            position: absolute;
            top: -7px;
            right: -7px;
            width: 19px;
            height: 19px;
            background: white;
            color: #000;
            border-radius: 50%;
            font-size: 0.6rem;
            font-weight: 900;
            align-items: center;
            justify-content: center;
            z-index: 2;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
        }

        .color-swatch.selected-1 .swatch-badge-1 {
            display: flex;
        }

        .color-swatch.selected-2 .swatch-badge-2 {
            display: flex;
        }

        .color-swatch-name {
            font-size: 0.63rem;
            text-align: center;
            color: var(--muted2);
            margin-top: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .color-selected-preview {
            display: flex;
            gap: 14px;
            align-items: center;
            margin-top: 14px;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            border-radius: 12px;
            flex-wrap: wrap;
        }

        .color-preview-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.82rem;
        }

        .color-preview-dot {
            width: 22px;
            height: 22px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            flex-shrink: 0;
        }

        .color-preview-label {
            font-size: 0.72rem;
            color: var(--muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-right: 2px;
        }

        .color-preview-sep {
            color: var(--muted);
            margin: 0 4px;
        }

        .details-footer {
            padding: 24px;
            border-top: 1px solid var(--border);
            display: flex;
            gap: 12px;
        }

        .btn-secondary {
            flex: 1;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            color: var(--text);
            padding: 14px;
            border-radius: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .btn-primary {
            flex: 2;
            background: #00ffcc;
            color: #000;
            border: none;
            padding: 14px 20px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 0.95rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: all 0.2s;
        }

        .btn-primary:hover:not(:disabled) {
            background: #00e6b8;
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(0, 255, 204, 0.35);
        }

        .btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Workspace */
      #wsOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 2000;
    flex-direction: column;
    overflow: hidden;
}

        #wsOverlay.open {
            display: flex;
            animation: wsIn .22s ease;
        }

        @keyframes wsIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .ws-topbar {
            height: 60px;
            background: rgba(255, 255, 255, 0.02);
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            padding: 0 20px;
            gap: 16px;
            flex-shrink: 0;
            overflow: hidden;
        }

        .ws-back {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            color: var(--text);
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.85rem;
            transition: all 0.2s;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .ws-back:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .ws-favicon {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            display: none;
        }

        .ws-title {
            font-weight: 600;
            font-size: 0.9rem;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .ws-url {
            color: var(--muted);
            font-size: 0.8rem;
            margin-left: auto;
            max-width: 300px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .ws-actions {
            display: flex;
            gap: 8px;
            flex-shrink: 0;
        }

        .btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            color: var(--text);
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .btn-green {
            background: rgba(46, 213, 115, 0.1);
            border-color: rgba(46, 213, 115, 0.3);
            color: var(--green);
        }

        .btn-green:hover {
            background: rgba(46, 213, 115, 0.2);
        }

        .btn-deploy {
            background: rgba(0, 255, 204, 0.1);
            border-color: rgba(0, 255, 204, 0.3);
            color: var(--accent);
        }

        .btn-deploy:hover {
            background: rgba(0, 255, 204, 0.2);
        }

        .limit-banner {
            display: none;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px;
            background: rgba(245, 158, 11, 0.1);
            border-bottom: 1px solid rgba(245, 158, 11, 0.2);
            color: var(--ai);
            font-size: 0.85rem;
            flex-shrink: 0;
        }

        .limit-banner.show {
            display: flex;
        }

        .limit-banner.exhausted {
            background: rgba(255, 71, 87, 0.1);
            border-bottom-color: rgba(255, 71, 87, 0.2);
            color: var(--red);
        }

        .ws-tabs {
            display: flex;
            gap: 0;
            padding: 0 12px;
            border-bottom: 1px solid var(--border);
            background: var(--panel);
            flex-shrink: 0;
            overflow-x: auto;
            overflow-y: visible;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            min-height: 46px;
            align-items: flex-end;
            position: relative;
            z-index: 2;
        }

        .ws-tabs::-webkit-scrollbar {
            display: none;
        }

        .ws-tab {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.55);
            padding: 10px 18px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 7px;
            border-bottom: 2px solid transparent;
            margin-bottom: -1px;
            transition: all 0.2s;
            white-space: nowrap;
            position: relative;
            z-index: 1;
            flex-shrink: 0;
        }

        .ws-tab.active {
            color: var(--text);
            border-bottom-color: var(--accent);
            background: rgba(255, 255, 255, 0.03);
        }

        .ws-tab:hover:not(.active) {
            color: var(--text);
        }

        .ws-panel {
            display: none;
            flex: 1;
            position: relative;
        }

        .ws-panel.active {
            display: flex;
            flex-direction: column;
        }

        /* Only clip overflow on panels that need it - NOT aiPanel */
        #previewPanel,
        #livePanel,
        #codePanel {
            overflow: hidden;
        }

        #previewPanel {
            background: #1a1a2e;
        }

        .dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }

        .dot-r {
            background: #ff5f57;
        }

        .dot-y {
            background: #febc2e;
        }

        .dot-g {
            background: #28c840;
        }

        #previewFrame,
        #editFrame,
        #aiPreviewFrame {
            flex: 1;
            width: 100%;
            max-width: 100%;
            border: none;
            background: white;
            overflow: hidden;
        }



        .code-bar {
            height: 44px;
            background: rgba(255, 255, 255, 0.03);
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            padding: 0 8px;
            gap: 4px;
            flex-shrink: 0;
            overflow-x: auto;
            overflow-y: hidden;
            scrollbar-width: none;
        }

        .code-bar::-webkit-scrollbar {
            display: none;
        }


        #livePanel {
            position: relative;
        }



        /* Gate Overlay */
        .gate-overlay {
            position: absolute;
            inset: 0;
            background: rgba(8, 8, 14, 0.95);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 16px;
            z-index: 100;
            backdrop-filter: blur(4px);
        }

        .gate-icon {
            width: 80px;
            height: 80px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            color: var(--accent);
        }

        .gate-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: white;
        }

        .gate-desc {
            color: var(--muted2);
            max-width: 300px;
            text-align: center;
            font-size: 0.9rem;
        }

        .gate-btn {
            background: linear-gradient(135deg, var(--accent), var(--accent2));
            color: #000;
            border: none;
            padding: 14px 32px;
            border-radius: 12px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 8px;
            transition: all 0.2s;
        }

        .gate-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
        }

.ai-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    height: 100%;
}


#aiPanel {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
#aiPanel.active {
    display: flex;
}

.ai-chat-col {
    width: 380px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

        .ai-chat-col.collapsed {
            width: 0;
            overflow: hidden;
            border-right: none;
        }

        .ai-chat-toggle {
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 24px;
            height: 56px;
            background: var(--accent);
            border: 2px solid var(--border);
            border-left: none;
            border-radius: 0 12px 12px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #000;
            z-index: 20;
            font-size: 0.9rem;
            transition: all 0.2s;
        }

        .ai-chat-toggle:hover {
            width: 28px;
            background: #00e6b8;
        }

        .ai-preview-col {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #1a1a2e;
            min-width: 0;
            margin-left: 24px;
        }

        .ai-chat-header {
            padding: 16px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
        }

        .ai-chat-header h3 {
            font-size: 1rem;
            font-weight: 700;
            color: white;
        }

.ai-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overscroll-behavior: contain;
}

/* Custom Scrollbar for a cleaner look */
.ai-messages::-webkit-scrollbar {
    width: 5px;
}
.ai-messages::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 10px;
}

        .ai-msg {
            display: flex;
            gap: 12px;
            max-width: 90%;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .ai-msg.user {
            align-self: flex-end;
            flex-direction: row-reverse;
        }

        .ai-msg-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--accent);
            color: #000;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 700;
            flex-shrink: 0;
        }

        .ai-msg.user .ai-msg-avatar {
            background: var(--accent2);
            color: white;
        }

        .ai-msg-bubble {
            background: rgba(255, 255, 255, 0.05);
            padding: 12px 16px;
            border-radius: 16px;
            border: 1px solid var(--border);
            flex: 1;
        }

        .ai-msg.user .ai-msg-bubble {
            background: rgba(124, 58, 237, 0.1);
            border-color: rgba(124, 58, 237, 0.3);
        }

        .ai-msg-name {
            font-size: 0.75rem;
            color: var(--muted);
            margin-bottom: 4px;
            font-weight: 600;
        }

        .ai-msg-text {
            font-size: 0.9rem;
            line-height: 1.5;
            color: var(--text);
        }

        .ai-applied {
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid var(--border);
            color: var(--green);
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .ai-applied:hover {
            color: var(--accent);
        }
        
.ai-input-row {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: rgba(10, 10, 20, 0.98);
    flex-shrink: 0;     /* Prevent it from being squeezed */
    z-index: 10;
}

        .ai-textarea-wrap {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 4px;
            display: flex;
            gap: 8px;
        }

        #aiPrompt {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text);
            padding: 12px;
            resize: none;
            outline: none;
            font-family: var(--font-body);
            font-size: 0.9rem;
            min-height: 24px;
            max-height: 120px;
        }

        @media (max-width: 768px) {

            /* 16px stops iOS Safari from zooming on focus */
            #aiPrompt {
                font-size: 16px !important;
            }

            /* Also stop zoom on the main hero textarea */
            #aiPromptInput {
                font-size: 16px !important;
            }

            /* Chat col: fill available height, flex handles the rest */
            .ai-chat-col {
                height: 100% !important;
                max-height: 100% !important;
                overflow: hidden !important;
            }

            /* Messages scrollable, flex fills remaining space */
            .ai-messages {
                flex: 1 !important;
                min-height: 0 !important;
                overflow-y: auto !important;
                -webkit-overflow-scrolling: touch !important;
            }

            /* Input row pinned at bottom, never pushed off screen */
            .ai-input-row {
                flex-shrink: 0 !important;
                position: relative !important;
                background: var(--bg2) !important;
                z-index: 10 !important;
                padding: 10px 12px 14px !important;
            }

            /* Send button: always fixed size, never shrinks */
            #aiSendBtn {
                flex-shrink: 0 !important;
                width: 44px !important;
                height: 44px !important;
                min-width: 44px !important;
            }

            /* Textarea wrap: flex row, no overflow */
            .ai-textarea-wrap {
                display: flex !important;
                align-items: flex-end !important;
                overflow: visible !important;
            }

            /* Hide hint - saves vertical space */
            .ai-input-hint {
                display: none !important;
            }
        }

        #aiSendBtn {
            background: var(--accent);
            color: #000;
            border: none;
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            border-radius: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            transition: all 0.2s;
            align-self: flex-end;
            flex-shrink: 0;
        }

        #aiSendBtn:hover:not(:disabled) {
            transform: scale(1.05);
        }

        #aiSendBtn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .ai-input-hint {
            text-align: center;
            color: var(--muted2);
            font-size: 0.75rem;
            margin-top: 8px;
        }

        .ai-quick {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 0 16px 16px;
            flex-shrink: 0;
        }

        .ai-quick-btn {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            color: var(--muted);
            padding: 8px 14px;
            border-radius: 20px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .ai-quick-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
            background: rgba(0, 255, 204, 0.05);
        }

        .ai-preview-header {
            height: 50px;
            background: rgba(0, 0, 0, 0.3);
            display: flex;
            align-items: center;
            padding: 0 16px;
            gap: 16px;
            flex-shrink: 0;
        }

        .ai-preview-header h4 {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text);
        }

        .ai-preview-actions {
            margin-left: auto;
            display: flex;
            gap: 8px;
        }

        .ai-device-switcher {
            display: flex;
            gap: 4px;
            background: rgba(255, 255, 255, 0.05);
            padding: 4px;
            border-radius: 8px;
        }

        .ai-device-btn {
            background: transparent;
            border: none;
            color: var(--muted);
            width: 32px;
            height: 32px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .ai-device-btn.active {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text);
        }

        .ai-device-btn:hover:not(.active) {
            color: var(--text);
        }

        #aiPreviewFrame.desktop {
            width: 100%;
        }

        #aiPreviewFrame.tablet {
            width: 768px;
            margin: 0 auto;
        }

        #aiPreviewFrame.mobile {
            width: 375px;
            margin: 0 auto;
        }

        .ai-typing-indicator {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .ai-typing-dots {
            display: flex;
            gap: 4px;
        }

        .ai-typing-dots span {
            width: 8px;
            height: 8px;
            background: var(--accent);
            border-radius: 50%;
            animation: bounce 1.4s infinite ease-in-out both;
        }

        .ai-typing-dots span:nth-child(1) {
            animation-delay: -0.32s;
        }

        .ai-typing-dots span:nth-child(2) {
            animation-delay: -0.16s;
        }

        @keyframes bounce {

            0%,
            80%,
            100% {
                transform: scale(0);
            }

            40% {
                transform: scale(1);
            }
        }

        .ai-progress-bar {
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
            margin-top: 8px;
        }

        .ai-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent), var(--accent2));
            width: 0%;
            transition: width 0.3s;
        }

        #statusBar {
            display: none;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-top: 16px;
            color: var(--muted);
            font-size: 0.9rem;
        }

        #statusBar.error {
            color: var(--red);
        }

        #statusBar.success {
            color: var(--green);
        }

        .spinner {
            width: 20px;
            height: 20px;
            border: 2px solid var(--border);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        #toastNotification {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: var(--bg2);
            border: 1px solid var(--border);
            color: var(--text);
            padding: 16px 24px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            gap: 12px;
            z-index: 10000;
            opacity: 0;
            transition: all 0.3s;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            max-width: 90vw;
        }

        #toastNotification.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        #toastNotification i {
            color: var(--accent);
        }

        /* Templates Section */
        #templatesSection {
            padding: 80px 24px;
            background: rgba(255, 255, 255, 0.02);
        }

        .section-head {
            text-align: center;
            max-width: 600px;
            margin: 0 auto 48px;
        }

        .section-eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--accent);
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 16px;
            font-family: var(--font-mono);
        }

        .section-title {
            font-family: var(--font-display);
            font-size: clamp(1.8rem, 4vw, 2.5rem);
            font-weight: 800;
            margin-bottom: 12px;
            letter-spacing: -2px;
        }

        .section-title em {
            color: var(--accent);
            font-style: normal;
        }

        .section-sub {
            color: var(--muted2);
            font-size: 0.95rem;
        }

        .templates-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 24px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .template-card {
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s;
        }

        .template-card:hover {
            transform: translateY(-4px);
            border-color: var(--accent);
            box-shadow: 0 20px 40px rgba(0, 255, 204, 0.1);
        }

        .template-thumb {
            height: 180px;
            background: linear-gradient(135deg, #1a1a2e, #16213e);
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
            overflow: hidden;
        }

        .template-thumb img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0.45;
            transition: opacity 0.3s;
        }

        .template-card:hover .template-thumb img {
            opacity: 0.65;
        }

        .template-thumb i {
            position: relative;
            z-index: 1;
        }

        .template-info {
            padding: 20px;
        }

        .template-name {
            font-weight: 700;
            margin-bottom: 4px;
            color: white;
        }

        .template-desc {
            color: var(--muted2);
            font-size: 0.9rem;
        }

     
        .flow-steps {
            display: flex;
            align-items: center;
            justify-content: center;
            max-width: 900px;
            margin: 48px auto 0;
        }

        .flow-step {
            flex: 1;
        }

        .flow-step-inner {
            background: rgba(255, 255, 255, 0.025);
            border: 1px solid rgba(0, 255, 204, 0.12);
            border-radius: 20px;
            padding: 28px 20px;
            text-align: center;
            transition: all 0.25s;
        }

        .flow-step-inner:hover {
            border-color: rgba(0, 255, 204, 0.35);
            transform: translateY(-4px);
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 204, 0.06);
            background: rgba(0, 255, 204, 0.03);
        }

        .flow-num {
            font-family: var(--font-mono);
            font-size: 0.65rem;
            font-weight: 700;
            color: var(--accent);
            opacity: 0.5;
            letter-spacing: 0.12em;
            margin-bottom: 14px;
        }

        .flow-icon {
            width: 54px;
            height: 54px;
            background: rgba(0, 255, 204, 0.08);
            border: 1px solid rgba(0, 255, 204, 0.2);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 14px;
            font-size: 1.3rem;
            color: var(--accent);
            transition: all 0.25s;
        }

        .flow-step-inner:hover .flow-icon {
            background: rgba(0, 255, 204, 0.14);
            border-color: rgba(0, 255, 204, 0.4);
            transform: scale(1.08);
        }

        .flow-title {
            font-size: 0.95rem;
            font-weight: 700;
            color: white;
            margin-bottom: 7px;
        }

        .flow-desc {
            color: var(--muted2);
            font-size: 0.8rem;
            line-height: 1.55;
        }

        .flow-arrow {
            flex-shrink: 0;
            width: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .flow-arrow i {
            color: var(--accent);
            opacity: 0.5;
            font-size: 0.85rem;
            z-index: 1;
        }

        .flow-arrow::before,
        .flow-arrow::after {
            content: '';
            position: absolute;
            top: 50%;
            height: 1px;
            width: 12px;
            background: rgba(0, 255, 204, 0.18);
        }

        .flow-arrow::before {
            right: calc(50% + 9px);
        }

        .flow-arrow::after {
            left: calc(50% + 9px);
        }

        @media (max-width: 680px) {
             .flow-steps {
        display: none !important;
    }

            .flow-arrow {
                height: 36px;
                width: 100%;
                transform: rotate(90deg);
            }

            .flow-arrow::before,
            .flow-arrow::after {
                display: none;
            }

            .flow-step {
                width: 100%;
            }

            .flow-step-inner {
                padding: 18px 14px;
            }

            .flow-desc {
                font-size: 0.75rem;
            }
        }

        /* Footer */
        .main-footer {
            background: rgba(255, 255, 255, 0.02);
            border-top: 1px solid var(--border);
            padding: 60px 24px 24px;
            margin-top: 80px;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr;
            gap: 40px;
        }

        .footer-brand {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .footer-logo {
            font-family: var(--font-alt);
            font-size: 1.3rem;
            font-weight: 600;
            background: linear-gradient(135deg, #fff 30%, #0fc 70%, #7c3aed 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-decoration: none;
            letter-spacing: -0.5px;
        }

        .footer-logo span {
            /* color handled by parent gradient */
        }

        .footer-desc {
            color: var(--muted2);
            font-size: 0.9rem;
            line-height: 1.6;
            max-width: 300px;
        }

        .footer-links h4 {
            font-size: 0.9rem;
            font-weight: 700;
            margin-bottom: 16px;
            color: var(--text);
            font-family: var(--font-mono);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .footer-links a {
            display: block;
            color: var(--muted2);
            text-decoration: none;
            padding: 6px 0;
            font-size: 0.9rem;
            transition: color 0.2s;
        }

        .footer-links a:hover {
            color: var(--accent);
        }

        .footer-bottom {
            max-width: 1200px;
            margin: 40px auto 0;
            padding-top: 24px;
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: var(--muted2);
            font-size: 0.85rem;
            flex-wrap: wrap;
            gap: 10px;
        }

        /* Edit Modal */
        #editModal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .82);
            backdrop-filter: blur(8px);
            z-index: 3000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        #editModal.open {
            display: flex;
            animation: fadeIn .16s ease;
        }

        .modal-box {
            background: var(--bg2);
            border: 1px solid var(--border);
            border-radius: 20px;
            width: 100%;
            max-width: 520px;
            max-height: 90vh;
            overflow-y: auto;
            animation: popIn .2s cubic-bezier(.34, 1.56, .64, 1);
        }

        .modal-header {
            padding: 20px 24px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .modal-type {
            background: rgba(0, 255, 204, 0.1);
            color: var(--accent);
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            margin-left: 12px;
        }

        .modal-close {
            background: none;
            border: none;
            color: var(--muted);
            font-size: 1.5rem;
            cursor: pointer;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            transition: all 0.2s;
        }

        .modal-close:hover {
            background: rgba(255, 255, 255, 0.05);
            color: var(--text);
        }

        .modal-body {
            padding: 24px;
        }

        .modal-footer {
            padding: 20px 24px;
            border-top: 1px solid var(--border);
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }

        .btn-ghost {
            background: transparent;
            border: 1px solid var(--border);
            color: var(--text);
            padding: 10px 20px;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.2s;
        }

        .btn-ghost:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .btn-accent {
            background: linear-gradient(135deg, var(--accent), var(--accent2));
            color: #000;
            border: none;
            padding: 10px 24px;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* CHANGE 01: Inline Live-Edit Popup */
        .live-edit-popup {
            position: fixed;
            z-index: 99999;
            background: linear-gradient(145deg, #12121e, #0e0e1a);
            border: 1px solid rgba(0, 255, 204, 0.3);
            border-radius: 16px;
            padding: 16px;
            width: 300px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 255, 204, 0.08) inset;
            animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
            display: none;
        }

        .live-edit-popup.open {
            display: block;
        }

        .lep-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
        }

        .lep-title {
            font-size: 0.85rem;
            font-weight: 700;
            color: white;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .lep-type {
            background: rgba(0, 255, 204, 0.1);
            color: var(--accent);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.68rem;
            font-weight: 600;
        }

        .lep-close {
            background: none;
            border: none;
            color: var(--muted);
            cursor: pointer;
            font-size: 1.2rem;
            line-height: 1;
            padding: 2px 4px;
            transition: color 0.2s;
        }

        .lep-close:hover {
            color: var(--red);
        }

        .lep-field {
            margin-bottom: 10px;
        }

        .lep-label {
            display: block;
            font-size: 0.72rem;
            color: var(--muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 5px;
        }

        .lep-input,
        .lep-textarea {
            width: 100%;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text);
            font-family: var(--font-body);
            font-size: 0.88rem;
            padding: 8px 10px;
            outline: none;
            transition: border-color 0.2s;
        }

        .lep-input:focus,
        .lep-textarea:focus {
            border-color: var(--accent);
        }

        .lep-textarea {
            resize: vertical;
            min-height: 64px;
        }

        .lep-actions {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }

        .lep-cancel {
            flex: 1;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            color: var(--muted2);
            padding: 9px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.82rem;
            transition: all 0.2s;
        }

        .lep-cancel:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .lep-apply {
            flex: 2;
            background: linear-gradient(135deg, var(--accent), var(--accent2));
            color: #000;
            border: none;
            padding: 9px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 700;
            font-size: 0.82rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.2s;
        }

        .lep-apply:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(0, 255, 204, 0.25);
        }

        /* Login & Upgrade Modals */
        #loginModal,
        #upgradeModal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(12px);
            z-index: 8000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        #loginModal.open,
        #upgradeModal.open {
            display: flex;
        }

        .login-box {
            background: linear-gradient(145deg, rgba(20, 20, 36, 0.99), rgba(10, 10, 22, 0.99));
            border: 1px solid rgba(100, 140, 255, 0.18);
            border-radius: 24px;
            width: min(420px, 94vw);
            padding: 0;
            overflow: hidden;
            box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
        }

        .login-header {
            padding: 32px;
            text-align: center;
            position: relative;
        }

        .login-close {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--muted2);
            cursor: pointer;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .login-close:hover {
            background: rgba(255, 71, 87, 0.15);
            color: var(--red);
        }

        .login-logo {
            font-size: 3rem;
            color: var(--accent);
            margin-bottom: 16px;
        }

        .login-header h3 {
            font-family: var(--font-display);
            font-size: 1.5rem;
            margin-bottom: 8px;
            color: white;
        }

        .login-header p {
            color: var(--muted2);
            font-size: 0.9rem;
        }

        .login-body {
            padding: 0 32px 32px;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .google-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            background: white;
            color: #333;
            padding: 14px;
            border-radius: 12px;
            text-decoration: none;
            font-weight: 600;
            transition: transform 0.2s;
        }

        .google-btn:hover {
            transform: translateY(-2px);
        }

        .login-perks {
            display: grid;
            gap: 12px;
            margin-top: 8px;
            font-size: 0.85rem;
            color: var(--muted2);
        }

        .login-perk {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .login-perk i {
            color: var(--accent);
        }

        #zipProgress {
            display: none;
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--bg2);
            border: 1px solid var(--border);
            border-radius: 40px;
            padding: 16px 24px;
            align-items: center;
            gap: 12px;
            z-index: 10000;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

        #zipProgress.show {
            display: flex;
        }

        .zip-bar-wrap {
            width: 200px;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
        }

        .zip-bar {
            height: 100%;
            background: var(--accent);
            width: 0%;
            transition: width 0.3s;
        }

        /* Responsive */
        @media (max-width: 900px) {
            .nav-links {
                display: none;
            }

            .ham-btn {
                display: flex;
            }

            .footer-content {
                grid-template-columns: 1fr 1fr;
                gap: 30px;
            }
        }

        /* AI mobile handled by FIX05 block below */
        @media (max-width: 768px) {
            
              .flow-steps {
        display: none !important;
    }

            .templates-grid {
                grid-template-columns: 1fr;
            }

            .ws-tabs {
                overflow-x: auto;
                overflow-y: hidden;
                padding: 8px 10px 0;
                gap: 2px;
            }

            .ws-tab {
                padding: 12px 16px;
                white-space: nowrap;
            }

            #userDropdown {
                right: 32px;
                left: 115px;
                min-width: auto;
            }

            .ws-url {
                display: none;
            }

            .footer-content {
                grid-template-columns: 1fr;
                gap: 32px;
            }

            .form-row {
                grid-template-columns: 1fr;
            }

            .details-footer {
                flex-direction: column;
            }

            .btn-secondary,
            .btn-primary {
                width: 100%;
            }

            .color-swatches {
                grid-template-columns: repeat(5, 1fr);
            }

            .ai-input-footer {
                flex-direction: column;
                align-items: stretch;
            }

            .ai-btn-group {
                justify-content: stretch;
            }

            .ai-create-btn {
                flex: 1;
                justify-content: center;
            }
        }

        @media (max-width: 480px) {
            h1 {
                font-size: clamp(2rem, 8vw, 3rem);
                letter-spacing: -1.5px;
            }

            .page-inner {
                padding: 120px 16px 40px;
            }

            .ai-input-footer {
                flex-direction: column;
                align-items: stretch;
            }

            .ai-create-btn {
                justify-content: center;
            }

            .live-edit-popup {
                width: 260px;
            }
        }

        /* modal-label used in handleClick legacy */
        .modal-label {
            display: block;
            color: var(--muted);
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Generation Progress Overlay */
        #genProgressOverlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(8, 8, 14, 0.92);
            backdrop-filter: blur(10px);
            z-index: 9000;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 24px;
        }

        #genProgressOverlay.open {
            display: flex;
        }

        .gen-progress-box {
            background: linear-gradient(145deg, rgba(18, 18, 32, 0.99), rgba(10, 10, 22, 0.99));
            border: 1px solid rgba(0, 255, 204, 0.2);
            border-radius: 24px;
            padding: 40px 48px;
            width: min(480px, 90vw);
            text-align: center;
            box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
            animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .gen-progress-icon {
            font-size: 2.5rem;
            margin-bottom: 16px;
            animation: genIconSpin 2s linear infinite;
        }

        @keyframes genIconSpin {
            0% {
                transform: rotate(0deg) scale(1);
            }

            50% {
                transform: rotate(180deg) scale(1.1);
            }

            100% {
                transform: rotate(360deg) scale(1);
            }
        }

        .gen-progress-title {
            font-family: var(--font-display);
            font-size: 1.3rem;
            font-weight: 800;
            color: white;
            margin-bottom: 8px;
        }

        .gen-progress-msg {
            color: var(--muted2);
            font-size: 0.9rem;
            margin-bottom: 28px;
            min-height: 20px;
            transition: all 0.3s;
        }

        .gen-progress-track {
            width: 100%;
            height: 8px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 100px;
            overflow: hidden;
            margin-bottom: 12px;
            position: relative;
        }

        .gen-progress-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, var(--accent), var(--accent2));
            border-radius: 100px;
            transition: width 0.4s ease;
            position: relative;
        }

        .gen-progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 60px;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
            animation: shimmer 1.5s infinite;
        }

        @keyframes shimmer {
            0% {
                opacity: 0;
            }

            50% {
                opacity: 1;
            }

            100% {
                opacity: 0;
            }
        }

        .gen-progress-pct {
            font-family: var(--font-mono);
            font-size: 0.85rem;
            color: var(--accent);
            font-weight: 600;
        }

        .gen-steps {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 24px;
            text-align: left;
        }

        .gen-step {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.82rem;
            color: var(--muted);
            transition: color 0.3s;
        }

        .gen-step.active {
            color: var(--text);
        }

        .gen-step.done {
            color: var(--green);
        }

        .gen-step-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--muted);
            flex-shrink: 0;
            transition: background 0.3s;
        }

        .gen-step.active .gen-step-dot {
            background: var(--accent);
            animation: dotPulse 1s infinite;
        }

        .gen-step.done .gen-step-dot {
            background: var(--green);
        }


        /* Image edit popup enhancements */
        .lep-img-preview {
            width: 100%;
            height: 90px;
            border-radius: 8px;
            object-fit: cover;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            margin-bottom: 8px;
            display: block;
        }

        .lep-img-tabs {
            display: flex;
            gap: 4px;
            margin-bottom: 12px;
        }

        .lep-img-tab {
            flex: 1;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid var(--border);
            color: var(--muted2);
            padding: 7px 6px;
            border-radius: 8px;
            font-size: 0.72rem;
            font-weight: 600;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s;
        }

        .lep-img-tab.active {
            background: rgba(0, 255, 204, 0.12);
            border-color: rgba(0, 255, 204, 0.35);
            color: var(--accent);
        }

        .lep-img-tab:hover:not(.active) {
            background: rgba(255, 255, 255, 0.08);
            color: var(--text);
        }

        .lep-img-pane {
            display: none;
        }

        .lep-img-pane.active {
            display: block;
        }

        .lep-file-drop {
            border: 2px dashed rgba(0, 255, 204, 0.25);
            border-radius: 10px;
            padding: 18px 12px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            background: rgba(0, 255, 204, 0.03);
            color: var(--muted2);
            font-size: 0.8rem;
        }

        .lep-file-drop:hover {
            border-color: rgba(0, 255, 204, 0.5);
            background: rgba(0, 255, 204, 0.07);
            color: var(--accent);
        }

        .lep-file-drop i {
            display: block;
            font-size: 1.5rem;
            margin-bottom: 6px;
            color: var(--accent);
        }

        .lep-picsum-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 4px;
            max-height: 130px;
            overflow-y: auto;
        }

        .lep-picsum-thumb {
            aspect-ratio: 1;
            border-radius: 6px;
            object-fit: cover;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.15s;
            width: 100%;
        }

        .lep-picsum-thumb:hover,
        .lep-picsum-thumb.selected {
            border-color: var(--accent);
            transform: scale(0.97);
        }

        .lep-search-row {
            display: flex;
            gap: 6px;
            margin-bottom: 8px;
        }

        .lep-search-row input {
            flex: 1;
        }

        .lep-search-btn {
            background: rgba(0, 255, 204, 0.1);
            border: 1px solid rgba(0, 255, 204, 0.3);
            color: var(--accent);
            padding: 0 12px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.8rem;
            white-space: nowrap;
            transition: all 0.2s;
        }

        .lep-search-btn:hover {
            background: rgba(0, 255, 204, 0.2);
        }


        /* ── Hero Stats Row ── */
        .hero-stats-row {
            display: flex;
            align-items: stretch;
            justify-content: center;
            gap: 0;
            margin-top: 40px;
            background: rgba(0, 255, 204, 0.03);
            border: 1px solid rgba(0, 255, 204, 0.15);
            border-radius: 20px;
            overflow: hidden;
            flex-wrap: nowrap;
        }

        .hero-stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 22px 0;
            flex: 1;
            gap: 5px;
            position: relative;
            transition: background 0.2s;
        }

        .hero-stat-item:hover {
            background: rgba(0, 255, 204, 0.04);
        }

        .hero-stat-num {
            font-family: var(--font-display);
            font-size: 1.9rem;
            font-weight: 900;
            color: #0fc;

            line-height: 1;
            letter-spacing: -1px;
        }

        .hero-stat-lbl {
            font-size: 0.72rem;
            color: var(--muted2);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .hero-stat-sep {
            width: 1px;
            background: rgba(0, 255, 204, 0.1);
            flex-shrink: 0;
            align-self: stretch;
        }

        /* ── Modify prompt button styled ── */
        .ai-modify-icon-btn {
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.25);
            color: var(--ai);
            height: 44px;
            padding: 0 14px;
            border-radius: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            font-size: 0.85rem;
            font-weight: 600;
            font-family: var(--font-body);
            transition: all 0.2s;
            flex-shrink: 0;
            position: relative;
        }

        .ai-modify-icon-btn .modify-label {
            font-size: 0.82rem;
            font-weight: 600;
        }

        .ai-modify-icon-btn:hover:not(:disabled) {
            background: rgba(245, 158, 11, 0.2);
            border-color: rgba(245, 158, 11, 0.5);
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
        }

        .ai-modify-icon-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .ai-modify-icon-btn .modify-spinner {
            display: none;
            width: 14px;
            height: 14px;
            border: 2px solid rgba(245, 158, 11, 0.3);
            border-top-color: var(--ai);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .ai-modify-icon-btn.loading .fa-wand-sparkles {
            display: none;
        }

        .ai-modify-icon-btn.loading .modify-label {
            display: none;
        }

        .ai-modify-icon-btn.loading .modify-spinner {
            display: block;
        }

    

        .ai-modify-icon-btn:hover::after {
            opacity: 1;
        }

        /* ── Templates: 4-col on desktop, 2-col tablet, 1-col mobile ── */
        .templates-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 24px;
        }

        /* ── How It Works Section ── */
        #howItWorksSection {
            padding: 80px 24px;
        }

        .video-section-inner {
            max-width: 1100px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1fr 380px;
            gap: 48px;
            align-items: center;
        }

        .video-wrapper-outer {
            position: relative;
        }

        .video-wrapper-inner {
            border-radius: 16px;
            overflow: hidden;
            border: 1px solid rgba(0, 255, 204, 0.2);
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 255, 204, 0.05);
            background: #0a0a14;
            position: relative;
            animation: videoGlow 3s ease-in-out infinite alternate;
        }

        @keyframes videoGlow {
            0% {
                box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 204, 0.05);
                border-color: rgba(0, 255, 204, 0.15);
            }

            100% {
                box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 255, 204, 0.12);
                border-color: rgba(0, 255, 204, 0.35);
            }
        }

        .video-placeholder {
            position: relative;
            cursor: pointer;
            display: block;
        }

        .video-placeholder img {
            width: 100%;
            height: 320px;
            object-fit: cover;
            object-position: top;
            display: block;
            opacity: 0.85;
        }

        .video-play-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 14px;
            background: rgba(0, 0, 0, 0.25);
            transition: background 0.2s;
        }

        .video-placeholder:hover .video-play-overlay {
            background: rgba(0, 0, 0, 0.45);
        }

        .video-play-btn-large {
            width: 80px;
            height: 80px;
            background: var(--accent);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.6rem;
            color: #000;
            box-shadow: 0 0 0 0 rgba(0, 255, 204, 0.4);
            animation: pulseRing 2s ease-out infinite;
            transition: transform 0.2s;
        }

        @keyframes pulseRing {
            0% {
                box-shadow: 0 0 0 0 rgba(0, 255, 204, 0.5);
            }

            70% {
                box-shadow: 0 0 0 22px rgba(0, 255, 204, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(0, 255, 204, 0);
            }
        }

        .video-placeholder:hover .video-play-btn-large {
            transform: scale(1.1);
        }

        .video-play-label {
            font-size: 0.85rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.9);
            letter-spacing: 0.04em;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
        }

        @media (max-width: 768px) {
            .video-placeholder img {
                height: 240px;
            }

            #demoVideo {
                height: 240px !important;
            }

            .video-wrapper-inner {
                border-radius: 12px;
            }
        }

        .hiw-steps {
            display: flex;
            flex-direction: column;
            gap: 28px;
        }

        .hiw-step {
            display: flex;
            gap: 20px;
            align-items: flex-start;
        }

        .hiw-step-num {
            font-family: var(--font-mono);
            font-size: 1.8rem;
            font-weight: 900;
            color: var(--accent);
            opacity: 0.3;
            line-height: 1;
            flex-shrink: 0;
            min-width: 48px;
        }

        .hiw-step-body h4 {
            font-family: var(--font-display);
            font-size: 1rem;
            font-weight: 700;
            color: white;
            margin-bottom: 6px;
        }

        .hiw-step-body p {
            color: var(--muted2);
            font-size: 0.88rem;
            line-height: 1.6;
        }

        /* ── Testimonials Grid ── */
        #testimonialsSection {
            padding: 80px 24px;
            background: rgba(255, 255, 255, 0.015);
        }

        .testi-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            max-width: 1100px;
            margin: 0 auto;
        }

        .testi-card-new {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 24px;
            transition: all 0.25s;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .testi-card-new:hover {
            border-color: rgba(0, 255, 204, 0.2);
            background: rgba(0, 255, 204, 0.02);
            transform: translateY(-3px);
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
        }

        .testi-stars-row {
            display: flex;
            gap: 3px;
            color: #ffd700;
            font-size: 0.78rem;
        }

        .testi-card-new blockquote {
            color: var(--muted2);
            font-size: 0.88rem;
            line-height: 1.65;
            flex: 1;
            font-style: normal;
            border: none;
            padding: 0;
            margin: 0;
        }

        .testi-author-row {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .testi-av {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 700;
            flex-shrink: 0;
        }

        .testi-author-name {
            font-size: 0.85rem;
            font-weight: 700;
            color: white;
        }

        .testi-author-role {
            font-size: 0.72rem;
            color: var(--muted2);
        }

        /* ── CTA Section ── */
        #ctaSection {
            padding: 80px 24px;
        }

        .cta-box-outer {
            max-width: 900px;
            margin: 0 auto;
        }

        .cta-box-inner {
            position: relative;
            background: linear-gradient(135deg, rgba(0, 255, 204, 0.06), rgba(124, 58, 237, 0.06));
            border: 1px solid rgba(0, 255, 204, 0.2);
            border-radius: 28px;
            padding: 64px 48px;
            text-align: center;
            overflow: hidden;
        }

        .cta-glow {
            position: absolute;
            top: -80px;
            left: 50%;
            transform: translateX(-50%);
            width: 400px;
            height: 200px;
            background: radial-gradient(ellipse, rgba(0, 255, 204, 0.12) 0%, transparent 70%);
            pointer-events: none;
        }

        .cta-heading {
            font-family: var(--font-display);
            font-size: clamp(1.8rem, 4vw, 2.8rem);
            font-weight: 900;
            letter-spacing: -2px;
            color: white;
            margin-bottom: 16px;
            position: relative;
        }

        .cta-heading em {
            color: var(--accent);
            font-style: normal;
        }

        .cta-sub {
            color: var(--muted2);
            font-size: 1rem;
            max-width: 480px;
            margin: 0 auto 36px;
            line-height: 1.6;
        }

        .cta-btns-row {
            display: flex;
            gap: 14px;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 28px;
        }

        .cta-btn-primary {
            background: #0fc;
            color: #000;
            border: none;
            padding: 16px 36px;
            border-radius: 14px;
            font-weight: 700;
            font-size: 1.05rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            font-family: var(--font-body);
            transition: all 0.2s;
        }

        .cta-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 32px rgba(0, 255, 204, 0.3);
        }

        .cta-btn-ghost {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border2);
            color: var(--text);
            padding: 16px 32px;
            border-radius: 14px;
            font-weight: 600;
            font-size: 1.05rem;
            text-decoration: none;
            transition: all 0.2s;
        }

        .cta-btn-ghost:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: var(--accent);
        }

        .cta-trust-row {
            display: flex;
            gap: 24px;
            justify-content: center;
            flex-wrap: wrap;
            font-size: 0.82rem;
            color: var(--muted2);
        }

        /* ── Recent Websites Section ── */
        #recentSection {
            padding: 80px 24px;
        }

        .recent-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .recent-card {
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
            transition: all 0.3s;
            cursor: pointer;
        }

        .recent-card:hover {
            transform: translateY(-4px);
            border-color: rgba(0, 255, 204, 0.25);
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
        }

        .recent-thumb {
            height: 160px;
            overflow: hidden;
            background: #1a1a2e;
        }

        .recent-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s;
        }

        .recent-card:hover .recent-thumb img {
            transform: scale(1.05);
        }

        .recent-info {
            padding: 14px 16px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .recent-type-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: rgba(0, 255, 204, 0.1);
            color: var(--accent);
            font-size: 0.7rem;
            font-weight: 700;
            padding: 3px 10px;
            border-radius: 20px;
            width: fit-content;
        }

        .recent-name {
            font-size: 0.88rem;
            font-weight: 600;
            color: white;
        }

        .recent-time {
            font-size: 0.72rem;
            color: var(--muted2);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        /* ── Footer enhancements ── */
        .footer-tags-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 14px;
        }

        .footer-tag {
            background: rgba(0, 255, 204, 0.07);
            border: 1px solid rgba(0, 255, 204, 0.15);
            color: var(--muted2);
            font-size: 0.72rem;
            padding: 4px 10px;
            border-radius: 20px;
            font-family: var(--font-mono);
        }

        /* ── Responsive for new sections ── */
        @media (max-width: 1024px) {
            .templates-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 14px;
            }

            .testi-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .recent-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .video-section-inner {
                grid-template-columns: 1fr;
                gap: 36px;
            }

            .hiw-steps {
                flex-direction: row;
                gap: 16px;
            }

            .hiw-step {
                flex-direction: column;
                gap: 8px;
                align-items: center;
                text-align: center;
            }
        }

        @media (max-width: 768px) {
            .hero-stats-row {
                gap: 0;
            }

            .hero-stat-item {
                padding: 12px 20px;
            }

            .hero-stat-num {
                font-size: 1.4rem;
            }

            .templates-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }

            .testi-grid {
                grid-template-columns: 1fr;
            }

            .recent-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .cta-box-inner {
                padding: 40px 24px;
            }

            .hiw-steps {
                flex-direction: column;
            }

            .hiw-step {
                flex-direction: row;
                text-align: left;
            }
        }

        @media (max-width: 480px) {
            .hero-stats-row {
                border-radius: 14px;
            }

            .hero-stat-item {
                flex: 1;
                padding: 16px 4px;
            }

            .hero-stat-num {
                font-size: 1.2rem !important;
            }

            .hero-stat-lbl {
                font-size: 0.6rem !important;
            }

            .templates-grid {
                grid-template-columns: 1fr 1fr;
                gap: 10px;
                padding: 0 16px;
            }

            .recent-grid {
                grid-template-columns: 1fr;
            }

            .cta-btns-row {
                flex-direction: column;
                align-items: center;
            }

            .cta-btn-primary,
            .cta-btn-ghost {
                width: 100%;
                justify-content: center;
            }
        }


        /* ══════════════════════════════════════
           TRENDING SITES - iframe preview cards
           ══════════════════════════════════════ */
        #templatesSection {
            padding: 80px 24px;
        }

        .trend-carousel-wrap {
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
            overflow: hidden;
        }

        .trend-track {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
        }

        .trend-card {
            display: block;
            text-decoration: none;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            border-radius: 18px;
            overflow: hidden;
            transition: all 0.3s;
            position: relative;
            cursor: pointer;
        }

        .trend-card:hover {
            border-color: rgba(0, 255, 204, 0.3);
            transform: translateY(-5px);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 255, 204, 0.1);
        }

        .trend-rank-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 10;
            background: var(--red);
            color: white;
            font-family: var(--font-mono);
            font-size: 0.72rem;
            font-weight: 900;
            padding: 4px 9px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(255, 71, 87, 0.5);
            letter-spacing: 0.02em;
        }


.trend-preview-wrap {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #0a0a14;
}

.trend-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform 0.4s ease;
}



.trend-card:hover .trend-preview-wrap img {
    transform: scale(1.05);
}

.trend-frame-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0) 70%,
        rgba(0,0,0,0.55) 100%
    );
    z-index: 2;
    pointer-events: none;
}


        .trend-info {
            padding: 14px 16px 16px;
        }

        .trend-site-name {
            font-size: 0.92rem;
            font-weight: 700;
            color: white;
            margin-bottom: 3px;
        }

        .trend-site-url {
            font-size: 0.7rem;
            color: var(--muted);
            font-family: var(--font-mono);
            margin-bottom: 10px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .trend-meta {
            display: flex;
            gap: 14px;
            font-size: 0.78rem;
        }

        .trend-likes {
            color: var(--red);
            display: flex;
            align-items: center;
            gap: 5px;
            font-weight: 600;
        }

        .trend-views {
            color: var(--muted2);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        /* Mobile carousel controls - hidden on desktop */
        .trend-carousel-controls {
            display: none;
            align-items: center;
            justify-content: center;
            gap: 16px;
            margin-top: 20px;
        }

        .trend-nav-btn {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            color: var(--text);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            transition: all 0.2s;
        }

        .trend-nav-btn:hover {
            background: rgba(0, 255, 204, 0.1);
            border-color: rgba(0, 255, 204, 0.3);
            color: var(--accent);
        }

        .trend-dots {
            display: flex;
            gap: 6px;
        }

        .trend-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            transition: all 0.2s;
            cursor: pointer;
        }

        .trend-dot.active {
            background: var(--accent);
            width: 20px;
            border-radius: 4px;
        }

        /* ══════════════════════════════════════
           TESTIMONIALS CAROUSEL
           ══════════════════════════════════════ */
        #testimonialsSection {
            padding: 80px 24px;
            background: rgba(255, 255, 255, 0.015);
        }

        .testi-carousel-wrap {
            max-width: 1140px;
            margin: 0 auto;
        }

        .testi-track-outer {
            overflow: hidden;
        }

        .testi-track-inner {
            display: flex;
            gap: 20px;
            transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            /* width set by JS */
        }

        .testi-card-new {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 24px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            gap: 16px;
            /* width set by JS: 1/3 on desktop, 1 on mobile */
        }

        .testi-card-new:hover {
            border-color: rgba(0, 255, 204, 0.2);
            background: rgba(0, 255, 204, 0.02);
        }

        .testi-stars-row {
            display: flex;
            gap: 3px;
            color: #ffd700;
            font-size: 0.78rem;
        }

        .testi-card-new blockquote {
            color: var(--muted2);
            font-size: 0.88rem;
            line-height: 1.65;
            flex: 1;
            font-style: normal;
            border: none;
            padding: 0;
            margin: 0;
        }

        .testi-author-row {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .testi-av {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 700;
            flex-shrink: 0;
        }

        .testi-author-name {
            font-size: 0.85rem;
            font-weight: 700;
            color: white;
        }

        .testi-author-role {
            font-size: 0.72rem;
            color: var(--muted2);
        }

        .testi-controls-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 16px;
            margin-top: 28px;
        }

        .testi-nav-btn {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            color: var(--text);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            transition: all 0.2s;
        }

        .testi-nav-btn:hover {
            background: rgba(0, 255, 204, 0.1);
            border-color: rgba(0, 255, 204, 0.3);
            color: var(--accent);
        }

        .testi-dots {
            display: flex;
            gap: 6px;
        }

        .testi-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            transition: all 0.2s;
            cursor: pointer;
        }

        .testi-dot.active {
            background: var(--accent);
            width: 20px;
            border-radius: 4px;
        }

        /* ══════════════════════════════════════
           RECENT BUILDS CAROUSEL - iframe preview
           ══════════════════════════════════════ */
        #recentSection {
            padding: 80px 24px;
        }

        .recent-carousel-wrap {
            max-width: 1200px;
            margin: 0 auto;
        }

        .recent-track-outer {
            overflow: hidden;
        }

        .recent-track-inner {
            display: flex;
            gap: 20px;
            transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .recent-card-new {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
            flex-shrink: 0;
            transition: all 0.3s;
        }

        .recent-card-new:hover {
            border-color: rgba(0, 255, 204, 0.25);
            transform: translateY(-4px);
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
        }

        .recent-preview-wrap {
            position: relative;
            height: 200px;
            overflow: hidden;
            background: #0a0a14;
        }

        .recent-preview-frame {
            width: 200%;
            height: 200%;
            border: none;
            transform: scale(0.5);
            transform-origin: top left;
            pointer-events: none;
            position: absolute;
            top: 0;
            left: 0;
            background: #0a0a14;
        }

        /* Fallback shimmer when iframe hasn't loaded */
        .recent-preview-wrap::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, #0a0a14 0%, #12121e 50%, #0a0a14 100%);
            background-size: 200% 100%;
            animation: shimmerLoad 1.5s infinite;
            z-index: 1;
        }

        @keyframes shimmerLoad {
            0% {
                background-position: -200% 0;
            }

            100% {
                background-position: 200% 0;
            }
        }

        /* Hide shimmer once iframe loads */
        .recent-preview-wrap.loaded::before {
            display: none;
        }

        .recent-frame-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom, transparent 55%, rgba(8, 8, 14, 0.95) 100%);
            z-index: 2;
        }

        .recent-time-badge {
            position: absolute;
            bottom: 10px;
            left: 12px;
            z-index: 3;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(6px);
            color: var(--muted2);
            font-size: 0.68rem;
            padding: 4px 9px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .recent-info-row {
            padding: 12px 14px 14px;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .recent-type-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: rgba(0, 255, 204, 0.1);
            color: var(--accent);
            font-size: 0.68rem;
            font-weight: 700;
            padding: 3px 9px;
            border-radius: 20px;
            width: fit-content;
        }

        .recent-name-txt {
            font-size: 0.86rem;
            font-weight: 600;
            color: white;
        }

        .recent-controls-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 16px;
            margin-top: 24px;
        }

        .recent-dots {
            display: flex;
            gap: 6px;
        }

        .recent-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            transition: all 0.2s;
            cursor: pointer;
        }

        .recent-dot.active {
            background: var(--accent);
            width: 20px;
            border-radius: 4px;
        }

        /* ── Responsive for new sections ── */
        @media (max-width: 1024px) {
            .trend-track {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .trend-carousel-wrap {
                overflow: hidden !important;
                padding: 0 !important;
            }

            .trend-track {
                display: flex !important;
                flex-wrap: nowrap !important;
                gap: 0 !important;
                transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
            }

            .trend-card {
                flex-shrink: 0 !important;
            }

            .trend-carousel-controls {
                display: flex !important;
                margin-top: 16px !important;
            }

            .trend-preview-wrap {
                height: 200px !important;
            }
        }


        /* ── FIX02: video wrapper fills parent ── */
        .video-wrapper-box {
            width: 100%;
            border-radius: 16px;
            overflow: hidden;
            position: relative;
            line-height: 0;
        }

        .video-wrapper-box .video-placeholder {
            display: block;
        }

        .video-wrapper-box img {
            display: block;
        }

        /* ── FIX04: code panel full height, mobile-friendly ── */
        /* ── Code Panel: full height, all code visible ── */
        #codePanel {
            display: none;
            flex-direction: column;
        }

        #codePanel.active {
            display: flex !important;
            flex: 1;
            min-height: 0;
            overflow: hidden;
        }

        #aceEditor {
            flex: 1 !important;
            min-height: 0 !important;
            width: 100% !important;
            overflow: hidden !important;
            position: relative !important;
        }

        /* Ace internal - allow both scroll axes, no blocked touch */
        .ace_editor {
            width: 100% !important;
            height: 100% !important;
            font-size: 13px !important;
            line-height: 1.6 !important;
        }

        .ace_scroller {
            overflow: auto !important;
            -webkit-overflow-scrolling: touch !important;
            touch-action: pan-x pan-y !important;
        }

        .ace_content {
            touch-action: pan-x pan-y !important;
        }

        /* Gutter - flush to left, compact */
        .ace_gutter {
            min-width: 36px !important;
            width: auto !important;
        }

        .ace_gutter-cell {
            padding-left: 4px !important;
            padding-right: 6px !important;
        }

        @media (max-width: 768px) {
            .ace_editor {
                font-size: 11px !important;
                line-height: 1.5 !important;
            }

            .ace_gutter {
                min-width: 28px !important;
            }

            .ace_gutter-cell {
                padding-left: 2px !important;
                padding-right: 4px !important;
                font-size: 10px !important;
            }

            .code-bar .btn {
                padding: 5px 8px !important;
                font-size: 0.7rem !important;
            }
        }

        .ai-back-to-chat-btn {
            display: none;
        }

        .ai-mob-preview-btn {
            display: none;
        }

        /* ── FIX05: AI editor mobile - chat full screen ── */
        @media (max-width: 768px) {
            .ai-layout {
                position: relative;
            }

            .ai-chat-col {
                width: 100% !important;
                position: absolute !important;
                inset: 0 !important;
                z-index: 50 !important;
                background: var(--bg2) !important;
                transition: transform 0.3s ease !important;
            }

            .ai-chat-col.show-preview {
                transform: translateX(-100%) !important;
            }

            .ai-preview-col {
                position: absolute !important;
                inset: 0 !important;
                z-index: 40 !important;
                margin-left: 0 !important;
            }

            .ai-chat-toggle {
                display: none !important;
            }

            .ai-device-switcher-desktop {
                display: none !important;
            }

            .ai-back-to-chat-btn {
                display: inline-flex !important;
                align-items: center;
                justify-content: center;
                padding: 5px 9px;
            }

            .ai-mob-preview-btn {
                display: inline-flex !important;
                align-items: center;
                justify-content: center;
                padding: 5px 9px;
                font-size: 0.75rem;
            }
        }

        /* ── FIX03: recent uses same layout as trending ── */
        #recentSection {
            padding: 80px 24px;
        }

        #recentWrap .trend-track {
            grid-template-columns: repeat(4, 1fr);
        }

        @media (max-width: 768px) {
            #recentWrap .trend-track {
                display: flex !important;
                flex-wrap: nowrap !important;
                transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
            }

            #recentWrap .trend-card {
                min-width: 100% !important;
                flex-shrink: 0 !important;
            }

            #recentWrap .trend-carousel-controls {
                display: flex !important;
            }
        }

        @media (max-width: 1024px) {
            #recentWrap .trend-track {
                grid-template-columns: repeat(2, 1fr);
            }
        }



        /* ── Recent Section v2 ── */
        /* ── Recent builds: EXACT same pattern as trending ── */
        .recent-wrap-new {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 24px;
            position: relative;
            overflow: hidden;
        }

        .recent-track-new {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 18px;
        }

        .recent-card-v2 {
            border-radius: 16px;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            transition: all 0.3s;
            cursor: pointer;
        }

        .recent-card-v2:hover {
            border-color: rgba(0, 255, 204, 0.25);
            transform: translateY(-4px);
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
        }

        .recent-img-wrap {
            position: relative;
            height: 180px;
            overflow: hidden;
            background: #0a0a14;
        }

        .recent-img-wrap img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: top;
            display: block;
            transition: transform 0.4s;
        }

        .recent-card-v2:hover .recent-img-wrap img {
            transform: scale(1.05);
        }

        .recent-overlay {
            position: absolute;
            bottom: 10px;
            left: 10px;
            z-index: 2;
        }

        .recent-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.68rem;
            font-weight: 700;
            backdrop-filter: blur(8px);
        }

        .recent-card-body {
            padding: 12px 14px 14px;
        }

        .recent-card-title {
            font-size: 0.9rem;
            font-weight: 600;
            color: white;
            margin-bottom: 4px;
        }

        .recent-card-time {
            font-size: 0.72rem;
            color: var(--muted2);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .recent-dots-row {
            display: none;
            align-items: center;
            justify-content: center;
            gap: 14px;
            margin-top: 20px;
        }


        @media (max-width: 768px) {
            .recent-wrap-new {
                padding: 0 !important;
            }

            .recent-dots-row {
                display: flex !important;
            }
        }
