/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #e1980f;
    --primary-hover: #c9870d;
    --primary-light: #fef7e8;
    --accent: #f77405;
    --teal: #0aa38b;
    --teal-light: #e6f7f4;
    --dark: #232746;
    --dark-light: #2d3258;
    --bg: #faf9f7;
    --surface: #ffffff;
    --text: #232746;
    --text-muted: #6b7280;
    --border: #e5e2db;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(35,39,70,0.06), 0 4px 12px rgba(35,39,70,0.04);
    --shadow-lg: 0 4px 24px rgba(35,39,70,0.08);
}

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

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header / Navbar */
header {
    background: var(--dark);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar {
    display: flex;
    align-items: center;
    height: 60px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.brand:hover {
    opacity: 0.9;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.brand-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.brand-text .accent {
    color: var(--primary);
}

/* Hero */
.hero {
    text-align: center;
    padding: 48px 0 32px;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero .accent {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto;
}

/* Main */
main {
    flex: 1;
    padding-bottom: 40px;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.upload-zone:hover,
.upload-zone:focus-visible {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: var(--shadow-lg);
    outline: none;
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: #fde9c4;
    border-style: solid;
    box-shadow: 0 0 0 4px rgba(225,152,15,0.15);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 12px;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.upload-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.upload-link {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.upload-info {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 12px;
}

/* Progress */
.progress-section {
    margin-top: 24px;
    text-align: center;
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-pulse 1.5s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Error */
.error-section {
    margin-top: 24px;
    background: var(--error-bg);
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
}

.error-section p {
    color: var(--error);
    font-weight: 500;
    margin-bottom: 12px;
}

/* Result */
.result-section {
    margin-top: 24px;
}

.result-section h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    text-align: center;
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.preview-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.preview-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.preview-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #fff 0% 50%) 50% / 16px 16px;
    border-radius: 8px;
    overflow: hidden;
}

.preview-image img,
.preview-image svg {
    max-width: 100%;
    max-height: 400px;
    height: auto;
}

/* Buttons */
.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    text-decoration: none;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 2px 8px rgba(225,152,15,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #e06a04);
    box-shadow: 0 4px 16px rgba(225,152,15,0.4);
}

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

.btn-secondary:hover {
    background: var(--bg);
}

/* Features */
.features {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 56px 0;
}

.features h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 36px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.feature {
    text-align: center;
    padding: 24px 16px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.feature:hover {
    background: var(--bg);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    margin-bottom: 12px;
}

.feature h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

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

/* How it works */
.how-it-works {
    background: var(--dark);
    color: #fff;
    padding: 56px 0;
}

.how-it-works h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 36px;
    color: #fff;
}

.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.step {
    text-align: center;
    padding: 0 16px;
    position: relative;
}

.step-arrow {
    display: none;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.step h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: #fff;
}

.step p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* FAQ */
.faq {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 56px 0;
}

.faq h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 32px;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--surface);
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 700;
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 20px 16px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Footer */
footer {
    background: var(--dark);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0;
    text-align: center;
}

footer p {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
}

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

/* Tablet */
@media (min-width: 768px) {
    .hero h1 { font-size: 2.8rem; }
    .hero-sub { font-size: 1.15rem; }

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

    .brand-text {
        font-size: 1.5rem;
    }

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

    .preview-container {
        grid-template-columns: 1fr 1fr;
    }

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

    .step-arrow {
        display: none;
    }

    .actions {
        flex-direction: row;
        justify-content: center;
    }

    .actions .btn {
        min-width: 220px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .hero { padding: 56px 0 40px; }
    .hero h1 { font-size: 3rem; }
    main { padding-bottom: 56px; }
    .upload-zone { padding: 64px 32px; }

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