/* ImageResize - ZLabs Branding (Orange Theme) */

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

:root {
    --primary-color: #f97316;
    --primary-hover: #ea580c;
    --primary-dark: #c2410c;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 1.25rem 0;
    box-shadow: var(--shadow-lg);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo svg {
    width: 100%;
    height: 100%;
    display: block;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

header .subtitle {
    font-size: 1rem;
    opacity: 0.95;
    text-align: center;
}

/* Main */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Privacy Notice */
.privacy-notice {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.privacy-notice p {
    margin: 0;
    color: #065f46;
    font-weight: 500;
}

/* Upload Section */
.upload-section {
    margin-bottom: 2rem;
}

.upload-box {
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--surface);
    transition: all 0.3s;
    cursor: pointer;
}

.upload-box:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.upload-box.drag-over {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: scale(1.02);
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: #1e293b;
    margin: 0 auto 1rem;
}

/* Blue upload button */
#browseBtn {
    background: #3b82f6;
    color: white;
}

#browseBtn:hover {
    background: #2563eb;
}

.upload-box h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-box p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.supported-formats {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1rem !important;
}

/* Settings Section */
.settings-section {
    margin-bottom: 2rem;
}

.settings-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.settings-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.setting-item input[type="number"],
.setting-item input[type="range"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.setting-item input[type="range"] {
    padding: 0;
}

.setting-item input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
}

#qualityValue {
    display: inline-block;
    margin-left: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.settings-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Images Section */
.images-section {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1rem;
}

.section-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.image-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

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

.image-preview {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--surface);
}

.image-info {
    padding: 1rem;
}

.image-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.image-size-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.size-reduction {
    color: var(--success-color);
    font-weight: 600;
}

.image-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Progress Section */
.progress-section {
    margin-bottom: 2rem;
}

.progress-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.progress-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316 0%, #ea580c 100%);
    transition: width 0.3s;
    width: 0%;
}

#progressText {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(249, 115, 22, 0.3);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--surface);
    border-color: var(--secondary-color);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.info-card h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* How It Works */
.how-it-works {
    background: var(--surface);
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

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

.step {
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
    border-top: 1px solid var(--border);
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.footer-section ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.footer-email a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
}

.footer-email a:hover {
    text-decoration: underline;
}

.footer-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-bottom a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .container {
        padding: 0 1rem;
    }

    .upload-box {
        padding: 2rem 1rem;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .images-grid {
        grid-template-columns: 1fr;
    }

    .settings-actions {
        flex-direction: column;
    }

    .steps {
        grid-template-columns: 1fr;
    }
}
