/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff4444, #cc0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    color: #666;
    font-size: 1.1rem;
    font-weight: 300;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Upload Section */
.upload-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.05);
    transform: translateY(-2px);
}

.upload-content {
    position: relative;
    z-index: 2;
}

.upload-icon {
    font-size: 4rem;
    color: #ff4444;
    margin-bottom: 20px;
    display: block;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-area p {
    color: #666;
    margin-bottom: 30px;
}

.browse-btn {
    background: linear-gradient(45deg, #ff4444, #cc0000);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 68, 68, 0.3);
}

/* Progress Section */
.progress-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.progress-container h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #ff4444, #cc0000);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

/* Files Section */
.files-section,
.compressed-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h3 {
    color: #333;
    font-size: 1.3rem;
}

.section-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.action-btn.primary {
    background: linear-gradient(45deg, #ff4444, #cc0000);
    color: white;
    border-color: #ff4444;
}

.action-btn.primary:hover {
    background: linear-gradient(45deg, #cc0000, #aa0000);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.3);
}

/* File Items */
.file-item,
.compressed-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.file-item:hover,
.compressed-item:hover {
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #ff4444, #cc0000);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.file-details h4 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1rem;
}

.file-meta {
    color: #666;
    font-size: 0.85rem;
    display: flex;
    gap: 15px;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.file-btn {
    background: none;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.file-btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

.file-btn.compress {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border-color: #28a745;
}

.file-btn.download {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border-color: #007bff;
}

.file-btn.delete {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    border-color: #dc3545;
}

/* Compression Status */
.compression-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #28a745;
}

.status-indicator.processing {
    background: #ffc107;
    animation: pulse 1.5s infinite;
}

.status-indicator.error {
    background: #dc3545;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    animation: slideIn 0.3s ease forwards;
    max-width: 300px;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #333;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        padding: 15px;
    }

    .header {
        padding: 20px;
    }

    .app-title {
        font-size: 2rem;
    }

    .logo-container {
        flex-direction: column;
        gap: 10px;
    }

    .upload-area {
        padding: 40px 15px;
    }

    .upload-icon {
        font-size: 3rem;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .section-actions {
        justify-content: center;
    }

    .file-item,
    .compressed-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .file-info {
        justify-content: center;
        text-align: center;
    }

    .file-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .file-meta {
        justify-content: center;
    }

    .toast-container {
        left: 20px;
        right: 20px;
    }

    .toast {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 1.5rem;
    }

    .upload-area {
        padding: 30px 10px;
    }

    .browse-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .file-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ddd;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #999;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-20 {
    margin-top: 20px;
}