/* CSS Variables & Theming */
:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-muted: #555555;

    --accent-primary: #ffffff;
    --accent-secondary: #cccccc;
    --accent-glow: rgba(255, 255, 255, 0.15);

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

    --card-bg: rgba(255, 255, 255, 0.04);
    --card-hover: rgba(255, 255, 255, 0.08);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s ease-in-out infinite alternate;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    top: 30%;
    right: -200px;
    animation-delay: -5s;
}

.orb-3 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    bottom: -300px;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(50px, 50px) scale(1.1);
    }

    100% {
        transform: translate(-50px, 100px) scale(0.9);
    }
}

/* Typography & Utility Classes */
h1,
h2,
h3,
h4 {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-md);
}

.text-muted {
    color: var(--text-muted);
}

.text-right {
    text-align: right;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    outline: none;
}

.btn i {
    font-size: 1.1em;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.25);
    filter: brightness(0.95);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
}

.full-width {
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-normal);
    padding: 20px 0;
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.logo-img {
    height: 26px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: white;
}

.nav-actions {
    display: flex;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 60px;
    position: relative;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    background: rgba(255, 255, 255, 0.08);
    color: #cccccc;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.9em;
    color: white;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

/* Hero Demo Box */
.hero-demo-box {
    width: 100%;
    max-width: 700px;
    text-align: left;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.demo-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.mac-dots {
    display: flex;
    gap: 8px;
}

.mac-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.mac-dots span:nth-child(1) {
    background: #666;
}

.mac-dots span:nth-child(2) {
    background: #888;
}

.mac-dots span:nth-child(3) {
    background: #aaa;
}

.demo-tone-badge {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.demo-tone-badge span {
    color: #ffffff;
    font-weight: 600;
}

.demo-body {
    padding: 24px;
}

.demo-text {
    padding: 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.15);
    position: relative;
    border: 1px solid transparent;
}

.demo-text.after {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.demo-text.after p {
    color: #ffffff;
}

.label {
    position: absolute;
    top: -10px;
    left: 16px;
    background: var(--bg-color);
    padding: 0 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.demo-text p {
    font-size: 1rem;
    line-height: 1.5;
    min-height: 24px;
    /* Prevent collapse */
}

.rewrite-divider {
    text-align: center;
    color: var(--accent-primary);
    padding: 12px 0;
    font-size: 1.2rem;
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
    color: white;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Sections Global */
section {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--card-bg);
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff, #aaaaaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

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

/* How It Works */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
}

.step.text-right {
    flex-direction: row-reverse;
}

.step-number {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: #ffffff;
    border-radius: 50%;
    color: #000000;
    box-shadow: 0 0 20px var(--accent-glow);
}

.step-content h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
}

.step-connector {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    margin: 0 auto;
    opacity: 0.5;
}

/* Live Demo Interactive Area */
.demo-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) 1fr;
    gap: 0;
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.demo-controls {
    padding: 40px 32px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--glass-border);
}

.demo-controls h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    white-space: nowrap;
}

.demo-controls>p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.control-group {
    margin-bottom: 24px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-select {
    position: relative;
}

.custom-select select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    appearance: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.custom-select select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.1);
}

.custom-select select option {
    background: var(--bg-color);
    color: white;
}

.custom-select i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.demo-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 16px;
    text-align: center;
}

.demo-workarea {
    display: flex;
    flex-direction: column;
}

.text-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: relative;
}

.text-pane:first-child {
    border-bottom: 1px solid var(--glass-border);
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-fast);
    padding: 4px;
}

.icon-btn:hover {
    color: white;
}

#demo-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    min-height: 120px;
}

#demo-input::placeholder {
    color: var(--text-muted);
}

.output-content {
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #ffffff;
    min-height: 120px;
    white-space: pre-wrap;
}

.output-content.empty {
    color: var(--text-muted);
    font-style: italic;
}

/* Loader */
.loader.hidden {
    display: none;
}

.dot-typing {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    margin: 20px auto 0;
    animation: dot-pulse 1s infinite ease-in-out;
}

@keyframes dot-pulse {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }

    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

/* Pricing Grid */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    padding: 40px 32px;
    text-align: center;
    position: relative;
}

.pricing-card.premium {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #000000;
}

.price {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 16px 0 4px;
}

.period {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.billing {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 40px;
}

.plan-features li {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.plan-features i.fa-check {
    color: #ffffff;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 60px 24px 24px;
    margin-top: 60px;
    background: rgba(0, 0, 0, 0.3);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 250px;
}

.footer-links {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
}

.link-column h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.link-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: var(--transition-fast);
}

.link-column a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
}

/* Animations (Intersection Observer) */
.fade-in {
    opacity: 0;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.slide-up {
    transform: translateY(40px);
}

.slide-left {
    transform: translateX(40px);
}

.slide-right {
    transform: translateX(-40px);
}

.fade-in.visible {
    opacity: 1;
    transform: translate(0, 0);
}

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

    .demo-controls {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-actions {
        display: none;
        /* In a real app, implement mobile menu toggle here */
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .steps-container {
        padding-left: 16px;
    }

    .step.text-right {
        flex-direction: row;
        text-align: left;
    }

    .step-connector {
        margin: 0 0 0 29px;
    }
}
