:root {
    --bg-main: #050505;
    --bg-card: rgba(20, 20, 25, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --accent: #ec4899;
    --accent-blue: #3b82f6;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center { text-align: center; }
.hidden { display: none !important; }

/* Gradients & Text */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1, h2, h3 {
    font-family: var(--font-heading);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 1rem;
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-large { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-full { width: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    background: rgba(5, 5, 5, 0.8);
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
}

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

.nav-links a:not(.btn) {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:not(.btn):hover {
    color: white;
}

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

.hero-content {
    max-width: 800px;
    z-index: 10;
    padding: 0 2rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    animation: pulse-glow 2s infinite;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.5;
}

.orb-1 {
    width: 400px; height: 400px;
    background: var(--primary);
    top: 20%; left: 10%;
    animation: drift 10s infinite alternate linear;
}

.orb-2 {
    width: 350px; height: 350px;
    background: var(--accent);
    bottom: 20%; right: 10%;
    animation: drift 12s infinite alternate-reverse linear;
}

/* API Cards / Features */
.features-section {
    padding: 6rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Glassmorphism Card System */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3);
}

.feature-icon {
    color: var(--primary);
    width: 32px;
    height: 32px;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* TTS Demo Section */
.demo-section {
    padding: 6rem 0;
}

.tts-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 3rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

textarea {
    width: 100%;
    min-height: 150px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    font-family: var(--font-body);
    font-size: 1.1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.char-count {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.voice-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--border-color);
}

.voice-selector i { color: var(--text-secondary); }

.voice-selector select {
    background: transparent;
    border: none;
    color: white;
    font-family: inherit;
    outline: none;
    cursor: not-allowed;
    appearance: none;
}

/* Pricing */
.pricing-section {
    padding: 6rem 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    text-align: left;
    position: relative;
    padding: 3rem;
}

.pricing-card.premium {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.1) 0%, rgba(20, 20, 25, 0.7) 100%);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
}

.plan-header { margin-bottom: 2rem; }
.plan-header h3 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.plan-header p { color: var(--text-secondary); font-size: 0.875rem; }

.price {
    font-size: 3rem;
    font-family: var(--font-heading);
    font-weight: 800;
    margin-bottom: 2rem;
}

.price .currency { font-size: 1.5rem; vertical-align: top; margin-right: 0.25rem; }
.price .duration { font-size: 1rem; color: var(--text-secondary); font-weight: normal; }

.plan-features {
    list-style: none;
    margin-bottom: 2.5rem;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.plan-features li i {
    color: var(--primary);
    width: 18px; height: 18px;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
}

.footer-content .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
}

/* Animations State */
.synthesizing-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    height: 60px;
    margin: 2rem 0;
}

.synthesizing-animation .bar {
    width: 6px;
    background: var(--primary);
    border-radius: 3px;
    animation: equalize 1s infinite;
}

.synthesizing-animation .bar:nth-child(1) { height: 20px; animation-delay: 0.1s; }
.synthesizing-animation .bar:nth-child(2) { height: 40px; animation-delay: 0.2s; }
.synthesizing-animation .bar:nth-child(3) { height: 60px; animation-delay: 0.3s; }
.synthesizing-animation .bar:nth-child(4) { height: 40px; animation-delay: 0.4s; }
.synthesizing-animation .bar:nth-child(5) { height: 20px; animation-delay: 0.5s; }

.result-box {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    text-align: center;
}

audio {
    width: 100%;
    margin-bottom: 1.5rem;
}

.error-text {
    color: var(--accent);
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Keyframes */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, -50px) scale(1.1); }
}

@keyframes equalize {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 3rem; }
    .nav-links { display: none; } /* Add hamburger menu in real app */
    .hero-actions { flex-direction: column; }
    .tts-card { padding: 1.5rem; }
    .controls { flex-direction: column; align-items: stretch; }
    .footer-content { flex-direction: column; gap: 1rem; }
}
