/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #4361ee;
    --secondary-blue: #3a0ca3;
    --accent-blue: #4cc9f0;
    --dark-bg: #0a0e17;
    --light-bg: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-light: #ffffff;
    --text-dark: #212529;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1f35 100%);
    color: var(--text-light);
    overflow-x: hidden;
}

body.light-mode {
    background: linear-gradient(135deg, #e0e5ec 0%, #f0f2f5 100%);
    color: var(--text-dark);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

/* Glass Effect Base */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 20px;
    padding: 15px 30px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(45deg, var(--accent-blue), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.beta-tag {
    background: var(--primary-blue);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 12px;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--glass-bg);
    color: var(--accent-blue);
}

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    width: 50px;
    height: 26px;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}

.theme-toggle .moon-icon {
    display: none;
}

.light-mode .theme-toggle .sun-icon {
    display: none;
}

.light-mode .theme-toggle .moon-icon {
    display: inline;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: var(--transition);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.step.active {
    opacity: 1;
}

.step-number {
     width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid var(--glass-border);
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--primary-blue);
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(67, 97, 238, 0.5);
}
.step.completed .step-number {
    background: var(--accent-blue);
    border-color: var(--primary-blue);
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 5px;
}
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 70px;
    right: -30px;
    height: 2px;
    background: var(--glass-border);
    z-index: 1;
}

.step.completed:not(:last-child)::after {
    background: var(--accent-blue);
}

/* Cards */
.glass-card {
    padding: 40px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.upload-card {
    text-align: center;
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--accent-blue), white);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.light-mode .section-subtitle {
    color: rgba(0, 0, 0, 0.6);
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed var(--glass-border);
    border-radius: 20px;
    padding: 60px 40px;
    margin: 30px 0;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-blue);
    background: rgba(76, 201, 240, 0.1);
    transform: translateY(-2px);
}

.upload-cloud {
    width: 80px;
    height: 80px;
    fill: var(--accent-blue);
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.upload-subtext {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.upload-formats,
.upload-max {
    color: var(--accent-blue);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-light);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-glow {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(67, 97, 238, 0.5); }
    50% { box-shadow: 0 0 30px rgba(67, 97, 238, 0.8); }
}

.upload-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.batch-info {
    margin-top: 20px;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Preset Buttons */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.preset-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.preset-btn:hover,
.preset-btn.active {
    border-color: var(--accent-blue);
    background: rgba(76, 201, 240, 0.1);
    transform: translateY(-3px);
}

.preset-btn.active {
    box-shadow: 0 10px 25px rgba(76, 201, 240, 0.3);
}

.preset-icon {
    font-size: 2rem;
}

.preset-name {
    font-size: 1.3rem;
    font-weight: 600;
}

.preset-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

.preset-size {
    font-size: 0.8rem;
    color: var(--accent-blue);
}

/* Slider */
.slider-container {
    margin: 30px 0;
}

.slider-container label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.file-size {
    color: var(--accent-blue);
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: var(--glass-bg);
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-blue);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Format Selector */
.format-selector {
    margin: 30px 0;
}

.format-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--glass-bg);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.format-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.format-option input[type="radio"] {
    display: none;
}

.format-option input[type="radio"]:checked + span {
    color: var(--accent-blue);
    font-weight: 600;
}

/* Progress Bar */
.progress-container {
    margin: 40px 0;
    position: relative;
}

.progress-bar {
    height: 20px;
    background: var(--glass-bg);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue) , var(--accent-blue));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 1.2rem;
}

.progress-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.progress-item {
    background: var(--glass-bg);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.progress-item span:first-child {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

/* Results */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.success-badge {
    background: linear-gradient(45deg, #4ade80, #22c55e);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: var(--glass-bg);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card.highlight {
    background: linear-gradient(45deg, var(--primary-blue), var(--secondary-blue));
}

.stat-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
}

.preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
}

.preview-box {
    flex: 1;
    text-align: center;
}

.preview-box h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.preview-image {
    width: 100%;
    height: 300px;
    background: var(--glass-bg);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-arrow {
    font-size: 3rem;
    color: var(--accent-blue);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.preview-size {
    color: var(--accent-blue);
    font-weight: 600;
}

.results-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
}

.file-list {
    margin-top: 30px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--glass-bg);
    border-radius: 10px;
    margin-bottom: 10px;
}

/* FAQ */
.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.faq-question {
    width: 100%;
    padding: 20px 0;
    text-align: left;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 0 20px;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Footer */
.footer {
    margin: 60px 20px 20px;
    padding: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    opacity: 0.7;
}

/* Utility Classes */
.center {
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        margin: 10px;
        padding: 15px;
    }
    
    .nav-links {
        position: fixed;
        top: 90px;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 0 0 20px 20px;
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        z-index: 999;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }
    .nav-links.mobile-active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(76, 201, 240, 0.2);
    }
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: none;
        border: 1px solid var(--glass-border);
        padding: 10px;
        border-radius: 10px;
        cursor: pointer;
        z-index: 1000;
    }
    .mobile-menu-btn span {
        width: 25px;
        height: 3px;
        background: var(--text-light);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .light-mode .mobile-menu-btn span {
        background: var(--text-dark);
    }
    
    .light-mode .nav-links {
        background: var(--light-glass);
    }
    
    .light-mode .nav-links a {
        background: rgba(0, 0, 0, 0.05);
    }
    
    .light-mode .nav-links a:hover,
    .light-mode .nav-links a.active {
        background: rgba(67, 97, 238, 0.1);
    }

    .container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .step-indicator {
        gap: 20px;
    }
    
    .step-label {
        display: none;
    }
    
    .glass-card {
        padding: 25px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .stats-container,
    .progress-details,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .preview-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .preview-arrow {
        transform: rotate(90deg);
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    .nav-links::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: -1;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .nav-links.mobile-active::before {
        opacity: 1;
        visibility: visible;
    }
    
    body.light-mode .nav-links::before {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}
/* Add to main.css */
.compression-tips {
    background: rgba(76, 201, 240, 0.1);
    border: 1px solid var(--accent-blue);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    font-size: 0.9rem;
}

.compression-tips ul {
    list-style: none;
    padding-left: 0;
}

.compression-tips li {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compression-tips li::before {
    content: "💡";
}
/* Add to main.css */
.upload-success-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
}

.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid var(--accent-blue);
}

.check-icon::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 20px;
    border-left: 4px solid white;
    border-bottom: 4px solid white;
    transform: rotate(-45deg);
    left: 16px;
    top: 22px;
}

.success-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-blue);
    margin: 20px 0 10px;
}

.success-subtext {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}
/* Add to main.css */
html {
    scroll-behavior: smooth;
}

/* Ensure sections have proper spacing */
[class$="-section"] {
    scroll-margin-top: 100px; /* Adjust based on your header height */
}

/* Add transition for section changes */
[class$="-section"] {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

[class$="-section"].hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}
/* Add to main.css or update existing slider CSS */
input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, #37ed80, #f73b3b); /* Default gradient */
    border-radius: 4px;
    outline: none;
    position: relative;
}

/* Create a track with gradient that will be updated by JavaScript */
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: inherit;
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: inherit;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--primary-blue);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    margin-top: -8px;
    position: relative;
    z-index: 2;
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--primary-blue);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
/* Add or update these CSS rules */

/* Section Visibility */
[class$="-section"] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    max-height: 0;
    overflow: hidden;
}

[class$="-section"].active {
    opacity: 1;
    transform: translateY(0);
    max-height: none;
    overflow: visible;
}

[class$="-section"].hidden {
    display: none !important;
}

/* FAQ and Features sections should always be visible */
.faq-section,
.features-section {
    opacity: 1 !important;
    transform: translateY(0) !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
}

/* Upload section specific */
.upload-section.active {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure only one section is visible at a time */
section:not(.active):not(.faq-section):not(.features-section) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Step indicator active state */
.step.active .step-number {
    background: var(--primary-blue);
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(67, 97, 238, 0.5);
}

.step:not(.active) {
    opacity: 0.5;
}
