:root {
    /* Palette: Red, White, Black */
    --bg-void: #050505;
    --bg-card: rgba(255, 255, 255, 0.02);
    --border-glass: rgba(255, 255, 255, 0.06);
    
    --primary: #ff4d4d; /* Bright Red */
    --primary-glow: rgba(255, 77, 77, 0.4);
    
    --success: #ff4d4d; /* Same red for consistency in this theme */
    --success-text: #ffffff;
    
    --text-main: #ffffff;
    --text-muted: #888888;
    
    /* Decoration */
    --orb-1: #450a0a; /* Dark Red */
    --orb-2: #171717; /* Off Black */
    
    /* Config */
    --ease-squish: cubic-bezier(0.5, -0.1, 0.1, 1.5);
    --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
}


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

body {
    background-color: var(--bg-void);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Background */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--orb-1);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--orb-2);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.noise-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 50px); }
}

/* Navigation */
.glass-nav {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.nav-logo i { background: linear-gradient(135deg, #fff, #a3a3a3); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: var(--ease-smooth);
}

.nav-link:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--border-glass);
    color: var(--text-main);
}

/* Main Container */
.container {
    width: 100%;
    max-width: 480px;
    padding: 1rem;
    margin-top: 4rem; /* offset for nav */
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 30%, #ff4d4d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(255, 77, 77, 0.3);
}


.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease-smooth);
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0 10px;
}

.step {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.step span {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
}

.tabs-container {
    position: relative;
    display: flex;
    background: rgba(0,0,0,0.3);
    padding: 4px;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.tabs-glider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    transition: 0.3s var(--ease-squish);
    z-index: 0;
    opacity: 0; /* JS will handle position/opacity usually, but simplified here */
    display: none; /* Removed JS glider logic dependency for simplicity, using active class mostly */
}

.tab {
    flex: 1;
    position: relative;
    z-index: 1;
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.tab.active {
    background: rgba(255,255,255,0.08); /* Fallback for glider */
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.tab:hover:not(.active) {
    color: var(--text-main);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-glass);
    border-radius: 18px;
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: 0.3s, border-color 0.3s;
    background: radial-gradient(circle at center, rgba(255,255,255,0.02), transparent 70%);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.05), transparent 70%);
}

.icon-wrapper {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    transition: 0.3s;
}

.upload-zone:hover .icon-wrapper {
    color: var(--primary);
    transform: translateY(-5px);
}

.upload-zone h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.file-name {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1rem;
    word-break: break-all;
    min-height: 1.2em;
}

/* Buttons */
.action-area {
    margin-top: 1.5rem;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.3s var(--ease-squish);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

.btn-primary:hover:not(:disabled)::after {
    transform: translateX(100%);
}

.btn-primary:disabled {
    background: #2a2a2a;
    color: #555;
    cursor: not-allowed;
    box-shadow: none;
}

/* Status Panel */
.status-panel {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
}

/* Loader */
.loader-wrapper {
    text-align: center;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
}

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

/* Professional Dashboard */
.stats-dashboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
}

.stat-arrow {
    color: var(--border-glass);
    font-size: 0.8rem;
}

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

.stat-card.highlighted .stat-value {
    color: var(--primary);
}

.stat-card.saving .stat-value {
    color: #4ade80; /* Green for success metric */
}

/* Success Header */
.success-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.success-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px var(--primary-glow);
}

.success-info h4 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.success-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}


.btn-download {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: var(--text-main);
    color: #000;
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-download:hover {
    transform: scale(1.02);
    background: #e5e5e5;
}

/* Error */
.error-box {
    color: #ef4444;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
}

.tech-stack {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tech-stack .divider { margin: 0 8px; color: #444; }

/* Responsive */
@media (max-width: 480px) {
    .container { padding: 10px; margin-top: 3rem; }
    .hero-title { font-size: 2.2rem; }
}
