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

body {
    font-family: 'IBM Plex Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

.gradient-mesh {
    position: absolute;
    inset: 0;
    opacity: 0.6;
    background: 
        radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.2) 0%, transparent 50%);
    filter: blur(60px);
    animation: float 20s ease-in-out infinite;
}

.noise-texture {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' /%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    pointer-events: none;
}

.main-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(-30px);
    animation: fadeInDown 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.header h1 {
    font-size: 64px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 16px 0;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: -0.02em;
}

.header p {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-weight: 400;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 48px;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

/* Upload Zone */
.upload-zone {
    background: rgba(255, 255, 255, 0.08);
    border: 2px dashed rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.upload-zone:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(14, 165, 233, 0.4);
    transform: scale(0.99);
}

.upload-zone.drag-active {
    background: rgba(14, 165, 233, 0.15);
    border: 2px dashed rgba(14, 165, 233, 0.6);
    transform: scale(0.98);
}

.upload-icon {
    animation: float-icon 2s ease-in-out infinite;
    margin: 0 auto 24px;
}

.upload-zone h2 {
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 12px 0;
}

.upload-zone p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.upload-zone input[type="file"] {
    display: none;
}

/* File Info */
.file-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.file-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0EA5E9, #06B6D4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.remove-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 8px 12px;
    color: #FCA5A5;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Compression Tiers */
.tiers-section {
    margin-bottom: 32px;
}

.tiers-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.tier-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    font-family: inherit;
}

.tier-btn:hover {
    transform: scale(1.02);
}

.tier-btn:active {
    transform: scale(0.98);
}

.tier-btn.active {
    background: rgba(14, 165, 233, 0.2);
    border-color: #0EA5E9;
}

.tier-label {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.tier-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
}

.compress-btn {
    flex: 1;
    background: linear-gradient(135deg, #0EA5E9, #06B6D4);
    border: none;
    border-radius: 16px;
    padding: 18px 32px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.compress-btn:hover {
    transform: scale(1.02);
}

.compress-btn:active {
    transform: scale(0.98);
}

.compress-btn:disabled {
    background: rgba(100, 100, 100, 0.3);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Results */
.results-card {
    margin-top: 32px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 28px;
}

.results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.success-icon {
    width: 40px;
    height: 40px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-title {
    font-size: 18px;
    font-weight: 700;
    color: #10B981;
    margin: 0 0 4px 0;
}

.results-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.stat-value.success {
    color: #10B981;
}

.download-btn {
    width: 100%;
    background: linear-gradient(135deg, #10B981, #059669);
    border: none;
    border-radius: 14px;
    padding: 16px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.download-btn:active {
    transform: scale(0.98);
}

/* Features Grid */
.features-grid {
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 28px;
    text-align: center;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.feature-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.6;
}

/* Footer */
.footer {
    margin-top: 80px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    opacity: 0;
    animation: fadeIn 0.8s ease 1s forwards;
}

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

/* SVG Styles */
svg {
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -50px) rotate(3deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(-2deg);
    }
}

@keyframes float-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 42px;
    }
    
    .header p {
        font-size: 16px;
    }
    
    .glass-card {
        padding: 32px 24px;
    }
    
    .upload-zone {
        padding: 60px 24px;
    }
    
    .tiers-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 40px 16px;
    }
    
    .header h1 {
        font-size: 36px;
    }
    
    .tiers-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
