:root {
    --primary-color: #007AFF;
    --background-color: #F5F5F7;
    --card-background: #FFFFFF;
    --text-color: #1D1D1F;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

header p {
    color: #86868B;
}

.upload-section {
    margin-bottom: 2rem;
}

.upload-area {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    border: 2px dashed #E5E5E5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    width: 48px;
    height: 48px;
    fill: var(--primary-color);
}

.upload-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #0056b3;
}

.preview-section {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.preview-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.preview-box {
    flex: 1;
}

.image-container {
    margin: 1rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.controls {
    padding-top: 1rem;
    border-top: 1px solid #E5E5E5;
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

input[type="range"] {
    flex: 1;
}

.download-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #0056b3;
}

@media (max-width: 768px) {
    .preview-container {
        flex-direction: column;
    }
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading-indicator p {
    margin: 10px 0;
    color: var(--text-color);
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.image-container {
    position: relative;
    min-height: 200px;
    background: #f5f5f7;
}

.progress-container {
    width: 200px;
    height: 4px;
    background: #f3f3f3;
    border-radius: 2px;
    margin: 10px auto;
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: var(--text-color);
    margin-top: 5px;
}

.compression-info {
    font-size: 14px;
    color: var(--primary-color);
    margin-top: 5px;
    font-weight: 500;
}

.file-info {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-color);
} 