/* =========================================
   AudioMeta Pro - Modern Audio Editor UI
   Aesthetic: Refined Dark with Gradient Accents
   ========================================= */

/* Font Import - Distinctive Typography */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Outfit:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    /* Colors - Deep Purple/Blue Dark Theme */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --bg-card: #15151f;
    --bg-input: #1e1e2a;
    
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    --accent-primary: #8b5cf6;
    --accent-secondary: #6366f1;
    --accent-tertiary: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.3);
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(139, 92, 246, 0.4);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.2);
    
    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        var(--gradient-glow),
        radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--accent-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm {
    max-width: 800px;
}

.container-xs {
    max-width: 600px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-glow);
}

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
main {
    padding-top: 100px;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0 60px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Upload Section */
.upload-section {
    padding: 40px 0 80px;
}

.upload-zone {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 80px 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-subtle);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.upload-zone:hover::before,
.upload-zone.dragover::before {
    opacity: 1;
}

.upload-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--shadow-glow);
    position: relative;
    z-index: 1;
}

.upload-zone h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.upload-zone p {
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.supported-formats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.format-badge {
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-input);
    border-color: var(--border-hover);
}

.btn-outline {
    background: transparent;
    color: var(--accent-tertiary);
    border: 2px solid var(--accent-primary);
}

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

.btn-lg {
    padding: 18px 36px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

/* Editor Section */
.editor-section {
    padding: 40px 0 80px;
}

.editor-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    align-items: start;
}

/* Artwork Panel */
.artwork-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    position: sticky;
    top: 100px;
}

.artwork-preview {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.artwork-preview:hover {
    border-color: var(--accent-primary);
}

.artwork-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artwork-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.artwork-placeholder svg {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
    opacity: 0.5;
}

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

.artwork-actions .btn {
    flex: 1;
}

/* Metadata Form */
.metadata-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.metadata-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.file-details h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.file-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.audio-stats {
    display: flex;
    gap: 24px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-tertiary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Elements */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Download Section */
.download-section {
    padding: 80px 0;
    text-align: center;
}

.download-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 60px 40px;
    max-width: 500px;
    margin: 0 auto;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 24px;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

.download-card h2 {
    margin-bottom: 12px;
}

.download-card p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Features Grid */
.features-section {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.feature-card h4 {
    margin-bottom: 12px;
}

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

/* Content Pages */
.content-page {
    padding: 60px 0 100px;
}

.content-page h1 {
    margin-bottom: 16px;
}

.content-page .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 48px;
}

.content-section {
    margin-bottom: 48px;
}

.content-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.content-section h3 {
    font-size: 1.2rem;
    margin: 24px 0 12px;
}

.content-section p,
.content-section li {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.content-section ul,
.content-section ol {
    padding-left: 24px;
}

.content-section ul li {
    list-style-type: disc;
}

.content-section ol li {
    list-style-type: decimal;
}

/* How-To Steps */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.step-number {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 8px;
}

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

/* Android Landing Page */
.android-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 80px 0;
}

.android-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.android-hero-content p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 32px;
}

.app-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.app-badge {
    height: 56px;
    border-radius: var(--radius-sm);
    transition: transform var(--transition-fast);
}

.app-badge:hover {
    transform: scale(1.05);
}

.phone-mockup {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone-frame {
    width: 280px;
    height: 560px;
    background: var(--bg-tertiary);
    border-radius: 40px;
    padding: 12px;
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.phone-screen-content {
    text-align: center;
    padding: 24px;
}

.app-features-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 48px;
}

.app-feature {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.app-feature-text h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

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

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 40px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    font-size: 0.95rem;
}

.footer-column h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--accent-primary);
    color: white;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 100px;
    right: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flash-message {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.flash-message.success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.flash-message.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.flash-message.info {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
    
    .artwork-panel {
        position: static;
    }
    
    .android-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .phone-mockup {
        order: -1;
    }
    
    .app-badges {
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .audio-stats {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .upload-zone {
        padding: 48px 24px;
    }
    
    .step-card {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 48px 0 32px;
    }
    
    .btn-lg {
        padding: 16px 28px;
        font-size: 1rem;
    }
    
    .action-bar {
        flex-direction: column;
        gap: 16px;
    }
    
    .action-bar .btn {
        width: 100%;
    }
}

/* Dark mode scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Selection */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
}
