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

:root {
    --bg: #F6F1E8;
    --surface: #FBF7EF;
    --surface-white: #FFFFFF;
    --border: #E2D9C8;
    --ink: #1F2421;
    --muted: #8A8A80;
    --accent: #C8853F;
    --accent-hover: #A86B2C;
    --accent-tint: #F0E3D0;
    --dark-block: #2A2723;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.nav {
    position: sticky;
    top: 0;
    background: rgba(246, 241, 232, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
}

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

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    background: var(--accent-tint);
    color: var(--accent);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: 'DM Serif Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.hero-title em {
    color: var(--accent);
    font-style: italic;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--muted);
    line-height: 1.7;
}

.hero-visual {
    position: relative;
}

.browser-window {
    background: var(--surface-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

.browser-bar {
    background: var(--surface);
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.browser-dots {
    display: flex;
    gap: 0.5rem;
}

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
}

.browser-dots span:nth-child(1) { background: #FF5F56; }
.browser-dots span:nth-child(2) { background: #FFBD2E; }
.browser-dots span:nth-child(3) { background: #27C93F; }

.browser-content {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-chip {
    position: absolute;
    bottom: -1rem;
    right: 2rem;
    background: var(--surface-white);
    padding: 0.625rem 1rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27C93F;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.upload-section {
    margin-bottom: 3rem;
}

.upload-card {
    background: var(--surface-white);
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

.upload-card:hover {
    border-color: var(--accent);
    background: var(--surface);
}

.upload-card.dragover {
    border-color: var(--accent);
    background: var(--accent-tint);
}

.upload-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
}

.upload-content p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.file-hint {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--muted);
    background: var(--surface);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.preview-content {
    position: relative;
}

.preview-content img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.btn-remove {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: var(--border);
}

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: var(--surface-white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 133, 63, 0.3);
}

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

.btn-primary.loading {
    pointer-events: none;
}

.btn-primary.loading span {
    opacity: 0.7;
}

.hidden {
    display: none !important;
}

.result-section {
    animation: fadeIn 0.3s;
}

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

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

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.result-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 700;
}

.icon-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-tint);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.result-content {
    color: var(--ink);
    line-height: 1.8;
}

.result-content h3 {
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--accent);
}

.result-content p {
    margin-bottom: 1rem;
}

.result-content code {
    background: var(--surface);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.result-content pre {
    background: var(--surface);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .container {
        padding: 2rem 1rem;
    }
}
