/* ============================================
   PowerX Keys — Premium Website Redesign v2
   ============================================ */

:root {
    --bg: #06060a;
    --surface: rgba(255, 255, 255, 0.025);
    --surface-hover: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(157, 0, 255, 0.3);
    --purple: #9D00FF;
    --purple-light: #B44DFF;
    --purple-glow: rgba(157, 0, 255, 0.15);
    --purple-glow-strong: rgba(157, 0, 255, 0.35);
    --accent: #9D00FF;
    --text: #ffffff;
    --text-secondary: #a0a0a0;
    --text-dim: #a0a0a0;
    --radius: 20px;
    --radius-sm: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== Background Ambient Glow ========== */
.ambient-glow {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.glow-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(157, 0, 255, 0.15), transparent 70%);
    top: -15%;
    left: -10%;
    animation: orbit1 20s ease-in-out infinite;
}

.glow-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(100, 0, 200, 0.1), transparent 70%);
    bottom: 10%;
    right: -10%;
    animation: orbit2 25s ease-in-out infinite;
}

.glow-orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(157, 0, 255, 0.08), transparent 70%);
    top: 50%;
    left: 40%;
    animation: orbit3 30s ease-in-out infinite;
}

@keyframes orbit1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(80px, 60px); }
}

@keyframes orbit2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-60px, -80px); }
}

@keyframes orbit3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(40px, -30px); }
    66% { transform: translate(-30px, 40px); }
}

/* ========== Navigation ========== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3rem;
    background: rgba(6, 6, 10, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.nav-brand span {
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    color: #fff;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--purple);
    border-radius: 1px;
}

/* ========== Hero Section ========== */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 7rem 2rem 3rem;
    max-width: 850px;
    margin: 0 auto;
}

.hero-logo {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    box-shadow: 0 16px 50px var(--purple-glow-strong);
    margin-bottom: 2rem;
    animation: heroFloat 5s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.08);
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.hero h1 {
    font-size: 4.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    background: linear-gradient(to bottom right, #ffffff, #c0c0c0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--purple);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px var(--purple-glow);
    margin-bottom: 1rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: var(--purple-light);
    box-shadow: 0 8px 30px var(--purple-glow-strong);
}

.hero-version {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
}

/* ========== Download Dropdown ========== */
.download-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.download-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 280px;
    background: rgba(15, 15, 20, 0.95);
    border: 1px solid rgba(157, 0, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    z-index: 100;
}

.download-dropdown.open {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(157, 0, 255, 0.1);
}

.dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(157, 0, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple-light);
    flex-shrink: 0;
}

.dropdown-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.dropdown-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}

/* ========== App Preview ========== */
.app-preview {
    max-width: 950px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.preview-frame {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(157, 0, 255, 0.12);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(157, 0, 255, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: all 0.4s ease;
}

.preview-frame:hover {
    transform: translateY(-6px);
    box-shadow:
        0 40px 90px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(157, 0, 255, 0.12),
        0 0 0 1px rgba(157, 0, 255, 0.2);
}

.preview-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.placeholder-box {
    min-height: 350px;
    background: linear-gradient(135deg, rgba(157, 0, 255, 0.04), rgba(6, 6, 10, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========== Stats Bar ========== */
.stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 3rem 2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 500;
    margin-top: 0.25rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ========== Section Layout ========== */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--purple-light);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
}

/* ========== Features Grid ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    background: var(--surface-hover);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 30px rgba(157, 0, 255, 0.06);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(157, 0, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple);
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    background: rgba(157, 0, 255, 0.15);
    box-shadow: 0 0 20px rgba(157, 0, 255, 0.15);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========== Showcase ========== */
.showcase {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.showcase-row {
    display: flex;
    align-items: center;
    gap: 3.5rem;
}

.showcase-row.reverse {
    flex-direction: row-reverse;
}

.showcase-text {
    flex: 0.6;
}

.showcase-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--purple-light);
    margin-bottom: 0.75rem;
    padding: 0.3rem 0.75rem;
    background: rgba(157, 0, 255, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(157, 0, 255, 0.15);
}

.showcase-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.showcase-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.showcase-image {
    flex: 1.4;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
}

.showcase-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(157, 0, 255, 0.2);
}

.showcase-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* ========== Use Cases ========== */
.usecase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.usecase-card {
    padding: 2rem;
    border-left: 3px solid rgba(157, 0, 255, 0.15);
    background: linear-gradient(to right, rgba(157, 0, 255, 0.03), transparent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all 0.3s ease;
}

.usecase-card:hover {
    border-left-color: var(--purple);
    background: linear-gradient(to right, rgba(157, 0, 255, 0.08), transparent);
    transform: translateX(6px);
}

.usecase-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.usecase-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.usecase-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========== Creator Card ========== */
.creator-card {
    display: flex;
    align-items: center;
    gap: 3rem;
    background: linear-gradient(145deg, rgba(15, 15, 20, 0.9), rgba(10, 10, 12, 0.9));
    border: 1px solid rgba(157, 0, 255, 0.15);
    border-radius: var(--radius);
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

.creator-avatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid var(--purple);
    padding: 3px;
    box-shadow: 0 0 30px var(--purple-glow);
    transition: transform 0.3s ease;
}

.creator-avatar img:hover {
    transform: scale(1.05);
}

.creator-info {
    flex: 1;
    text-align: left;
}

.creator-name {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
}

.creator-role {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--purple-light);
    margin-bottom: 1rem;
    display: block;
}

.creator-story {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.creator-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(157, 0, 255, 0.4);
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.creator-btn:hover {
    background: rgba(157, 0, 255, 0.1);
    border-color: var(--purple);
    box-shadow: 0 0 20px var(--purple-glow);
    transform: translateY(-2px);
}

/* ========== Footer ========== */
.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 2rem;
    border-top: 1px solid var(--border);
    background: linear-gradient(to top, rgba(6, 6, 10, 1), transparent);
    gap: 1rem;
    margin-top: 4rem;
}

.footer-brand {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.footer-brand span {
    color: var(--purple-light);
}

.footer-version {
    font-size: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    color: var(--text-dim);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--purple-light);
}

.footer-copy {
    font-size: 0.8rem;
    color: #7a7a7a;
}

/* ========== Lightbox ========== */
.zoomable {
    cursor: zoom-in;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.open img {
    transform: scale(1);
}

/* ========== Scroll Animations ========== */
.anim {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--delay, 0s);
}

.anim.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3.2rem; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .showcase-row,
    .showcase-row.reverse {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    .showcase-text { flex: 1; }
    .showcase-image { flex: 1; }
    .creator-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        gap: 1.5rem;
    }
    .creator-info { text-align: center; }
}

@media (max-width: 768px) {
    .top-nav { padding: 1rem 1.5rem; }
    .hero { padding: 4rem 1.5rem 2rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero-tagline { font-size: 1.05rem; }
    .section { padding: 3.5rem 1.5rem; }
    .section-title { font-size: 2rem; }
    .features-grid { grid-template-columns: 1fr; }
    .usecase-grid { grid-template-columns: 1fr; }
    .stats-bar { flex-direction: column; gap: 1.5rem; }
    .stat-divider { width: 40px; height: 1px; }
    .app-preview { padding: 0 1rem 3rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .btn-primary { width: 100%; justify-content: center; }
}

/* ========== Mobile Hamburger Menu ========== */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
}
.hamburger-btn svg { display: block; }

@media (max-width: 768px) {
    .hamburger-btn { display: block; }
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100vh;
        background: rgba(6, 6, 10, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0.5rem;
        border-left: 1px solid var(--border);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    .nav-links.open { display: flex; }
    .nav-links .nav-item {
        font-size: 1rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }
    .nav-links .nav-item.active::after { display: none; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }
}

/* ========== Cookie Consent Banner ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(12, 12, 18, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(157, 0, 255, 0.15);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.cookie-banner a {
    color: var(--purple-light);
    text-decoration: none;
}

.cookie-banner a:hover {
    text-decoration: underline;
}

.cookie-btn {
    background: rgba(157, 0, 255, 0.15);
    border: 1px solid rgba(157, 0, 255, 0.3);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cookie-btn:hover {
    background: rgba(157, 0, 255, 0.25);
    border-color: var(--purple);
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
    }
}

/* ========== Form Styling ========== */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-label {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: left;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    outline: none;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    padding-right: 2.5rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    outline: none;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba%28255%2C%20255%2C%20255%2C%200.4%29' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1rem;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 10px rgba(157, 0, 255, 0.15);
    background: rgba(157, 0, 255, 0.03);
}

.form-textarea {
    resize: vertical;
}

.form-select option {
    background: #0f0f14;
    color: #fff;
}

.form-status {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 1rem;
    display: none;
    font-weight: 600;
}

/* ========== Floating Back to Top Button ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(12, 12, 18, 0.85);
    border: 1px solid rgba(157, 0, 255, 0.3);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease, background 0.2s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--purple-light);
    background: rgba(157, 0, 255, 0.1);
    box-shadow: 0 0 15px var(--purple-glow);
}

/* ========== Redesigned Premium No-Code Macro Playground Styles ========== */
.playground-section {
    max-width: 1200px !important;
    padding-bottom: 2rem !important;
    position: relative;
}

.playground-container {
    display: grid;
    grid-template-columns: 300px 1fr 360px;
    gap: 1.75rem;
    margin-top: 2rem;
}

.playground-panel {
    background: rgba(15, 12, 30, 0.35);
    border: 1px solid rgba(157, 0, 255, 0.12);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.playground-panel:hover {
    border-color: rgba(157, 0, 255, 0.28);
    box-shadow: 0 20px 50px rgba(157, 0, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.playground-panel h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.85rem;
    letter-spacing: -0.01em;
}

/* Toolbox Action Blocks */
.toolbox-grid {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.tool-btn {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 0.95rem 1.25rem;
    color: #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    transition: background 0.3s ease;
}

/* Color Coding for Action Types */
.tool-btn.click-btn::before { background: #22c55e; }
.tool-btn.type-btn::before { background: #a855f7; }
.tool-btn.delay-btn::before { background: #f97316; }
.tool-btn.loop-btn::before { background: #3b82f6; }

.tool-btn.click-btn:hover {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.35);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.12);
    color: #fff;
    transform: translateX(4px);
}

.tool-btn.type-btn:hover {
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.35);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.12);
    color: #fff;
    transform: translateX(4px);
}

.tool-btn.delay-btn:hover {
    background: rgba(249, 115, 22, 0.08);
    border-color: rgba(249, 115, 22, 0.35);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.12);
    color: #fff;
    transform: translateX(4px);
}

.tool-btn.loop-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.12);
    color: #fff;
    transform: translateX(4px);
}

.tool-icon {
    font-size: 1.35rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    transition: transform 0.2s ease;
}

.tool-btn:hover .tool-icon {
    transform: scale(1.1);
}

/* Timeline */
.timeline-panel {
    min-height: 420px;
}

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

.panel-header h3 {
    border-bottom: none;
    padding-bottom: 0;
}

.clear-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.playground-timeline {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.35rem;
}

/* Custom scrollbar for timeline */
.playground-timeline::-webkit-scrollbar {
    width: 6px;
}
.playground-timeline::-webkit-scrollbar-track {
    background: transparent;
}
.playground-timeline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.playground-timeline::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 0, 255, 0.35);
}

.timeline-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.88rem;
    padding: 2.5rem;
    border: 2px dashed rgba(157, 0, 255, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.005);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-step {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-left: 3px solid transparent;
}

/* Accent Indicators for Timeline Items */
.timeline-step.step-click { border-left-color: #22c55e; }
.timeline-step.step-type { border-left-color: #a855f7; }
.timeline-step.step-delay { border-left-color: #f97316; }
.timeline-step.step-loop { border-left-color: #3b82f6; }

.timeline-step.active {
    background: rgba(157, 0, 255, 0.16) !important;
    border-color: var(--purple-light) !important;
    box-shadow: 0 0 15px rgba(157, 0, 255, 0.25);
    transform: scale(1.02);
}

.step-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.step-num-badge {
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 500;
}

.step-delete {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.step-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.timeline-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.timeline-controls .btn-primary {
    margin-bottom: 0;
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    width: 100%;
    justify-content: center;
}

.timeline-controls .btn-primary:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Simulator Window */
.sim-window {
    flex: 1;
    background: rgba(8, 7, 12, 0.8);
    border: 1px solid rgba(157, 0, 255, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.sim-titlebar {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.sim-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.sim-dot.red { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.4); }
.sim-dot.yellow { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.4); }
.sim-dot.green { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.4); }

.doc-entry p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.doc-entry strong,
.doc-entry p strong {
    color: #ffffff;
    font-weight: 600;
}

.sim-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 0.5rem;
    letter-spacing: 0.5px;
}

.sim-body {
    flex: 1;
    padding: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #a78bfa;
    position: relative;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: radial-gradient(circle at top right, rgba(157,0,255,0.03), transparent 60%);
}

.sim-cursor {
    position: absolute;
    width: 14px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='white' stroke='black' stroke-width='1.5'%3E%3Cpolygon points='3,2 3,22 9,16 21,16'/%3E%3C/svg%3E") no-repeat;
    z-index: 10;
    top: 40px;
    left: 40px;
    transition: top 0.7s cubic-bezier(0.25, 1, 0.5, 1), left 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
    transform: translate(-1px, -1px);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.sim-text {
    flex: 1;
    white-space: pre-wrap;
    line-height: 1.5;
    color: #c78eff;
}

.sim-text.typing-active::after {
    content: '_';
    font-weight: bold;
    color: #c78eff;
    animation: blinkCursor 0.6s infinite;
}

@keyframes blinkCursor {
    50% { opacity: 0; }
}

.sim-button {
    margin-top: auto;
    align-self: center;
    background: rgba(157, 0, 255, 0.1);
    border: 1px solid rgba(157, 0, 255, 0.3);
    border-radius: 8px;
    padding: 0.7rem 1.5rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(157, 0, 255, 0.3);
        border-color: rgba(157, 0, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 12px 2px rgba(157, 0, 255, 0.15);
        border-color: rgba(157, 0, 255, 0.6);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(157, 0, 255, 0.3);
        border-color: rgba(157, 0, 255, 0.3);
    }
}

.sim-button:hover {
    background: rgba(157, 0, 255, 0.25);
    border-color: var(--purple-light);
    transform: translateY(-1px);
}

.sim-button.active {
    background: #10b981 !important;
    border-color: #34d399 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5) !important;
    transform: scale(0.96) translateY(0);
    animation: none;
}

/* Responsive adjustment */
@media (max-width: 1024px) {
    .playground-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ========== Interactive Timeline Inputs & Code Preview ========== */
.step-input,
.step-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    padding: 0.25rem 0.5rem;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.step-input:focus,
.step-select:focus {
    border-color: var(--purple-light);
    background: rgba(157, 0, 255, 0.05);
    box-shadow: 0 0 8px rgba(157, 0, 255, 0.2);
}

.step-input {
    width: 140px;
}

.step-select {
    cursor: pointer;
}

.code-preview-container {
    margin-top: 1rem;
    background: rgba(8, 6, 15, 0.6);
    border: 1px solid rgba(157, 0, 255, 0.15);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.code-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.code-tabs {
    display: flex;
    gap: 0.5rem;
}

.code-tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.code-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.code-tab.active {
    background: rgba(157, 0, 255, 0.15);
    color: var(--purple-light);
    border: 1px solid rgba(157, 0, 255, 0.3);
}

.code-preview-body {
    margin: 0;
    padding: 0.85rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #c78eff;
    white-space: pre-wrap;
    text-align: left;
    max-height: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(157, 0, 255, 0.2) transparent;
}

.code-preview-body::-webkit-scrollbar {
    width: 4px;
}

.code-preview-body::-webkit-scrollbar-track {
    background: transparent;
}

.code-preview-body::-webkit-scrollbar-thumb {
    background: rgba(157, 0, 255, 0.2);
    border-radius: 4px;
}

.code-line {
    display: block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.code-line.active-line {
    background: rgba(157, 0, 255, 0.2);
    color: #fff !important;
    font-weight: 600;
    border-left: 2px solid var(--purple-light);
    box-shadow: 0 0 10px rgba(157, 0, 255, 0.1);
}

.copy-code-btn {
    transition: all 0.2s ease;
}

.copy-code-btn:hover {
    color: #fff !important;
    border-color: var(--purple-light) !important;
    background: rgba(157, 0, 255, 0.1) !important;
}

/* ========== Sticky CTA Bar ========== */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9997;
    background: rgba(10, 8, 16, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(157, 0, 255, 0.2);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5), 0 -2px 15px rgba(157, 0, 255, 0.06);
}

.sticky-cta.visible {
    transform: translateY(0);
}

.sticky-cta-text {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
}

.sticky-cta-text .cta-highlight {
    color: #fff;
    font-weight: 700;
}

.sticky-cta-text .cta-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 8px rgba(157, 0, 255, 0.5);
    animation: ctaPulse 2s ease-in-out infinite;
}

@keyframes ctaPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.sticky-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--purple);
    color: #fff;
    border: none;
    padding: 0.55rem 1.4rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(157, 0, 255, 0.25);
    white-space: nowrap;
}

.sticky-cta-btn:hover {
    background: var(--purple-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(157, 0, 255, 0.4);
}

.sticky-cta-dismiss {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sticky-cta-dismiss:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Shift back-to-top button up when sticky CTA is visible */
.sticky-cta.visible ~ .back-to-top.visible {
    bottom: 5rem;
}

@media (max-width: 768px) {
    .sticky-cta {
        padding: 0.65rem 1rem;
        gap: 0.75rem;
    }

    .sticky-cta-text {
        font-size: 0.78rem;
    }

    .sticky-cta-text .cta-separator {
        display: none;
    }

    .sticky-cta-btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .sticky-cta-text span:not(.cta-highlight):not(.cta-dot) {
        display: none;
    }
}

/* Sandbox Nav Badge */
.sandbox-badge {
    font-size: 0.62rem;
    background: rgba(157, 0, 255, 0.15);
    border: 1px solid rgba(157, 0, 255, 0.35);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    vertical-align: middle;
    margin-left: 0.6rem;
    color: var(--purple-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* Accessibility: Skip to content link */
.skip-to-content {
    position: absolute;
    top: -60px;
    left: 0;
    background: #9D00FF;
    color: #ffffff;
    padding: 10px 20px;
    z-index: 10000;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

/* Accessibility: Support prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-delay: 0s !important;
        transition-duration: 0s !important;
    }
}

