:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn.primary {
    background: var(--primary);
    color: white;
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn.secondary:hover {
    background: var(--light);
}

.btn.large {
    padding: 15px 30px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* Landing Page */
.landing-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0 80px;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
}

.hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero .highlight {
    color: #fbbf24;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 50px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 50px;
}

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

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
}

.stat-label {
    opacity: 0.8;
}

/* Demo Section */
.demo-section {
    padding: 80px 0;
    background: white;
}

.demo-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
}

.demo-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.comparison-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    flex: 1;
    min-width: 300px;
}

.image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 8px;
    margin: 20px 0;
}

.image-placeholder.original::after {
    content: "🌅 Original Image";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray);
}

.image-placeholder.compressed::after {
    content: "✨ Compressed Image";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray);
}

.comparison-arrow {
    font-size: 36px;
    color: var(--primary);
}

.savings {
    color: var(--success);
    font-size: 14px;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--light);
}

.features h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
}

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

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
}

/* How It Works */
.how-it-works {
    padding: 80px 0;
    background: white;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 20px;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Footer */
.landing-footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
}

.footer-links {
    margin-bottom: 30px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-copyright {
    opacity: 0.6;
    font-size: 14px;
}

/* App Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--light);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
    margin-right: 12px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-email {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* App Content */
.app-content {
    flex: 1;
    margin-left: 250px;
}

.app-header {
    background: white;
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 24px;
}

.storage-info {
    color: var(--gray);
    font-size: 14px;
}

/* Upload Zone */
.upload-section {
    padding: 30px;
}

.upload-zone {
    background: white;
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: var(--gray);
}

.upload-content h3 {
    margin-bottom: 10px;
}

.upload-hint {
    margin-top: 15px;
    color: var(--gray);
    font-size: 13px;
}

/* Settings Section */
.compression-settings {
    background: white;
    margin: 0 30px 30px;
    border-radius: 16px;
    padding: 30px;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.setting-card {
    padding: 20px;
    background: var(--light);
    border-radius: 12px;
}

.setting-card label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-value {
    min-width: 60px;
    text-align: center;
    font-weight: bold;
}

.setting-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--gray);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    margin: 10px 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-switch label::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

.toggle-switch input:checked + label {
    background: var(--primary);
}

.toggle-switch input:checked + label::after {
    left: 32px;
}

/* File List */
.file-list-section {
    background: white;
    margin: 0 30px 30px;
    border-radius: 16px;
    padding: 30px;
}

.file-list {
    border: 1px solid var(--border);
    border-radius: 12px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

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

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

.file-preview {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: var(--gray);
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

/* Results Section */
.results-section {
    background: white;
    margin: 0 30px 30px;
    border-radius: 16px;
    padding: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--light);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.summary-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.summary-label {
    color: var(--gray);
    font-size: 14px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.result-item {
    background: var(--light);
    border-radius: 12px;
    overflow: hidden;
}

.result-images {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.result-before,
.result-after {
    flex: 1;
    padding: 15px;
    text-align: center;
}

.result-before {
    border-right: 1px solid var(--border);
}

.result-before h4,
.result-after h4 {
    font-size: 14px;
    margin-bottom: 10px;
}

.result-image {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
}

.result-meta {
    padding: 15px;
}

.result-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 48px;
}

.stat-details {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    font-size: 14px;
}

.dashboard-section {
    background: white;
    margin: 30px;
    border-radius: 16px;
    padding: 30px;
}

.dashboard-section h2 {
    margin-bottom: 20px;
}

.activity-list {
    border: 1px solid var(--border);
    border-radius: 12px;
    min-height: 200px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

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

.activity-icon {
    font-size: 24px;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.activity-meta {
    font-size: 13px;
    color: var(--gray);
}

/* Settings Form */
.settings-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-header h2,
    .sidebar-nav a span:last-child,
    .user-email {
        display: none;
    }
    
    .app-content {
        margin-left: 70px;
    }
    
    .nav-icon {
        margin-right: 0;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .demo-comparison {
        flex-direction: column;
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
    }
}