:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-color: #22c55e;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: var(--card-bg);
    width: 100%;
    max-width: 500px;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 40px 20px;
    transition: all 0.2s ease;
    background: #fdfdfd;
    cursor: pointer;
}

.dropzone:hover, .dropzone.drag-over {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.dropzone svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.dropzone p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    text-decoration: none;
    font-size: 0.9rem;
}

.button:hover {
    background: var(--primary-hover);
}

.button.primary {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
}

.button.outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 100%;
    margin-top: 12px;
}

.button.outline:hover {
    background: #f1f5f9;
}

.hidden {
    display: none !important;
}

.preview-container {
    margin-top: 24px;
}

.preview-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

.preview-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: #f1f5f9;
}

.file-info {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.status-container {
    margin-top: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

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

.result-container {
    margin-top: 24px;
    animation: fadeIn 0.3s ease-out;
}

.success-icon {
    color: var(--success-color);
    margin-bottom: 8px;
}

.download-info {
    margin: 12px 0 20px;
    font-size: 0.9rem;
}

.savings {
    color: var(--success-color);
    font-weight: 600;
    margin-left: 8px;
}

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