/* ========================================
   AutoTrans - Cyberpunk Tech UI
   ======================================== */

/* CSS Variables */
:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --primary-glow: rgba(0, 212, 255, 0.5);
    --secondary: #8b5cf6;
    --secondary-glow: rgba(139, 92, 246, 0.5);
    --accent: #f472b6;
    --accent-glow: rgba(244, 114, 182, 0.5);
    --bg-dark: #0a0a0f;
    --bg-card: #111118;
    --bg-card-hover: #1a1a24;
    --bg-input: #0d0d12;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --border-color: #2a2a3a;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #8b5cf6 0%, #f472b6 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.cyber-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(244, 114, 182, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

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

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

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

.logo-icon {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

.logo-text {
    letter-spacing: 2px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

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

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

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

/* ========================================
   Upload Page
   ======================================== */
.upload-main {
    min-height: calc(100vh - 70px);
    padding: 100px 0 60px;
    display: flex;
    align-items: center;
}

.upload-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 48px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.upload-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.upload-header {
    text-align: center;
    margin-bottom: 40px;
}

.upload-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cyber-bracket {
    color: var(--primary);
    font-weight: 300;
    animation: bracketPulse 2s ease-in-out infinite;
}

@keyframes bracketPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; text-shadow: 0 0 10px var(--primary-glow); }
}

.upload-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

/* Form Styles */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
}

.cyber-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.label-icon {
    font-size: 1.1rem;
}

.cyber-select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    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='%23606070' stroke-width='2' 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 14px center;
    background-size: 18px;
    padding-right: 48px;
}

.cyber-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.cyber-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px;
}

/* File Upload Area */
.file-group {
    flex: 2;
}

.file-upload-area {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-input);
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.05);
}

.file-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.01);
}

.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-placeholder {
    position: relative;
    z-index: 1;
}

.upload-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.upload-icon {
    font-size: 4rem;
    position: relative;
    z-index: 1;
}

.upload-icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--primary-glow);
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-upload-area:hover .upload-icon-glow {
    opacity: 0.5;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

.format-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.format-tag {
    padding: 6px 14px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* File Info */
.file-info {
    padding: 24px;
}

.file-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.file-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    word-break: break-all;
}

.file-size,
.file-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.change-file-btn {
    margin-top: 16px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-file-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
}

/* Cyber Button */
.btn-cyber {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 36px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: var(--bg-dark);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-cyber:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--primary-glow);
}

.btn-cyber:active {
    transform: translateY(0);
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-cyber:hover .btn-glow {
    transform: translateX(100%);
}

.btn-icon {
    font-size: 0.8rem;
}

/* Footer */
.footer {
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   Processing Page
   ======================================== */
.processing-body {
    background: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.processing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.processing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

/* Spinner */
.cyber-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    inset: 8px;
    border-top-color: var(--secondary);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    inset: 16px;
    border-top-color: var(--accent);
    animation-duration: 2s;
}

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

.processing-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.processing-status {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 32px;
    min-height: 24px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 32px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.4s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
}

/* Stages */
.stages-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 12px;
}

.stage {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stage-icon {
    font-size: 0.9rem;
}

.stage.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 15px var(--primary-glow);
    animation: stagePulse 2s ease-in-out infinite;
}

.stage.completed {
    color: var(--success);
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

@keyframes stagePulse {
    0%, 100% { box-shadow: 0 0 10px var(--primary-glow); }
    50% { box-shadow: 0 0 20px var(--primary-glow), 0 0 30px var(--primary-glow); }
}

/* File Info Card */
.file-info-card {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
}

.file-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.file-info-item:last-child {
    border-bottom: none;
}

.file-info-label {
    color: var(--text-secondary);
}

.file-info-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--success);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-download:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
}

/* Status Icons */
.status-success {
    font-size: 4rem;
    margin-bottom: 24px;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.status-error {
    font-size: 4rem;
    margin-bottom: 24px;
    color: var(--error);
}

/* ========================================
   Home Page
   ======================================== */
.hero {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    50% { opacity: 0.7; box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features */
.features {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .upload-card {
        padding: 32px 24px;
    }
    
    .processing-card {
        padding: 32px 24px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stages-container {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

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

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}