/*
 * Lianbridge — Excel 智能翻译
 * Design: Hero Two-Column · Light Pastel · Minimalist
 */

/* ========================================
   Design System
   ======================================== */
:root {
    /* Base */
    --color-bg: #F5F7FB;
    --color-surface: #FFFFFF;
    --color-paper: #F5F7FB;
    --color-paper-dark: #EDF0F7;

    /* Text */
    --color-ink: #1A202C;
    --color-ink-light: #4A5568;
    --color-ink-muted: #A0AEC0;

    /* Accent — Pink / Magenta */
    --color-accent: #D53F8C;
    --color-accent-dark: #B83280;
    --color-accent-light: #ED64A6;
    --color-accent-soft: #FFF5F7;

    /* Secondary — Indigo */
    --color-secondary: #5A67D8;
    --color-secondary-light: #7F8CF5;
    --color-secondary-soft: #EBF4FF;

    /* Semantic */
    --color-success: #38A169;
    --color-success-soft: #F0FFF4;
    --color-warning: #D69E2E;
    --color-error: #E53E3E;
    --color-error-soft: #FFF5F5;

    /* Pastels */
    --pastel-pink: #FED7E2;
    --pastel-blue: #C3DAFE;
    --pastel-green: #C6F6D5;
    --pastel-purple: #E9D8FD;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-glow: 0 0 24px rgba(213,63,140,0.18);

    /* Typography - 国内字体优化 */
    --font-brand: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-display: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-serif: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'SF Mono', 'Consolas', 'Menlo', 'Monaco', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Borders */
    --border-color: rgba(0,0,0,0.06);
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 24px;
    --border-radius-pill: 999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 150ms ease;
    --transition-base: 300ms var(--ease-out);
    --transition-slow: 500ms var(--ease-out);
}

/* ========================================
   Reset
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-ink);
    background: var(--color-bg);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    animation: pageLoadFadeIn 0.5s var(--ease-out);
}

@keyframes pageLoadFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   Background — Gradient & Orbs (KEPT)
   ======================================== */
.bg-gradient {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(199,210,254,0.35) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(254,215,226,0.25) 0%, transparent 55%),
        var(--color-bg);
}
.bg-orb { position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; opacity: 0.45; }
.bg-orb-1 { width: 600px; height: 600px; background: var(--pastel-purple); top: -200px; right: -150px; }
.bg-orb-2 { width: 400px; height: 400px; background: var(--pastel-pink); bottom: -100px; left: -100px; }
.bg-orb-3 { width: 350px; height: 350px; background: var(--pastel-blue); top: 50%; left: 50%; transform: translate(-50%,-50%); }

/* Legacy */
.paper-texture, .deco-line, .deco-line-1, .deco-line-2 { display: none; }

/* ========================================
   Layout
   ======================================== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-2xl);
}

/* ========================================
   Header — Compact
   ======================================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-lg);
    animation: fadeInDown 0.5s var(--ease-out);
}

.header-brand {
    display: flex;
    align-items: center;
}

.brand-logo-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.logo-mark {
    width: 52px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 52px;
    height: auto;
}

.logo-cn { display: none; }

.logo-text {
    font-family: var(--font-brand);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-ink);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-ink-muted);
    transition: all var(--transition-fast);
}

.settings-btn:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   Config Drawer (hidden by default)
   ======================================== */
.config-section {
    position: relative;
    margin-bottom: var(--space-md);
}

.config-body {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 45vw;
    padding: var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
}

.config-body.open {
    display: block;
    animation: slideDown 0.35s var(--ease-out);
}

/* ========================================
   Hero — Two Column
   ======================================== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-3xl);
    min-height: calc(100vh - 160px);
    align-items: center;
    animation: fadeIn 0.6s var(--ease-out) 0.1s both;
}

/* --- Left Column --- */
.hero-left {
    padding-right: var(--space-xl);
}

.hero-heading {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--color-ink);
    margin-bottom: 0;
}

.hero-subheading {
    font-family: var(--font-body);
    font-size: 3.2rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--color-ink-muted);
    margin-bottom: var(--space-xl);
}

.hero-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-ink-light);
    max-width: 380px;
    margin-bottom: var(--space-2xl);
}

/* Feature Badges */
.feature-badges {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-ink-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.feature-badge svg {
    color: var(--color-ink-muted);
    flex-shrink: 0;
}

/* ========================================
   Quota Widget — Lightweight Progress Bar
   ======================================== */
.quota-widget {
    margin-top: var(--space-xl);
    padding: var(--space-lg) var(--space-xl);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(213, 63, 140, 0.15);
    border-radius: var(--border-radius);
    animation: quotaFadeIn 0.6s var(--ease-out) 0.4s both;
}

.quota-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.quota-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-ink);
    letter-spacing: 0.01em;
}

.quota-count {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: -0.01em;
}

.quota-count #quotaTotal {
    color: var(--color-ink-muted);
    font-weight: 500;
}

.quota-bar-container {
    height: 6px;
    background: var(--color-paper-dark);
    border-radius: var(--border-radius-pill);
    overflow: hidden;
    margin-bottom: var(--space-md);
    position: relative;
}

.quota-bar-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    border-radius: var(--border-radius-pill);
    transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    position: relative;
}

.quota-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmerQuota 2s ease-in-out infinite;
}

@keyframes shimmerQuota {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.quota-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.quota-stat-item {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-ink-light);
    font-weight: 400;
}

.quota-stat-item strong {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-ink);
    margin-left: 2px;
}

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

/* ========================================
   WeChat QR Code Section
   ======================================== */
.wechat-qr-section {
    margin-top: var(--space-xl);
    padding: var(--space-lg) var(--space-xl);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(213, 63, 140, 0.15);
    border-radius: var(--border-radius);
    animation: quotaFadeIn 0.6s var(--ease-out) 0.6s both;
}

.wechat-qr-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.wechat-qr-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-ink);
    letter-spacing: 0.01em;
}

.wechat-qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.wechat-qr-image {
    width: 180px;
    height: 180px;
    border-radius: var(--border-radius);
    border: 2px solid rgba(213, 63, 140, 0.2);
    box-shadow: var(--shadow-sm);
    object-fit: contain;
    background: white;
}

.wechat-qr-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-ink-light);
    text-align: center;
    line-height: 1.6;
    margin: 0;
}

/* --- Right Column --- */
.hero-right {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-2xl);
    border: 2px dashed rgba(0,0,0,0.07);
    border-radius: var(--border-radius-lg);
    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(4px);
    min-height: 420px;
    transition: all var(--transition-base);
}

.hero-right:has(.drop-zone:hover) {
    border-color: rgba(213,63,140,0.3);
    background: rgba(255,255,255,0.5);
    box-shadow: 0 8px 32px rgba(213,63,140,0.12);
    transform: translateY(-2px);
}

/* ========================================
   Upload Zone — Circular Icon Style
   ======================================== */
.upload-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone {
    width: 100%;
    padding: var(--space-3xl) var(--space-xl);
    border: none;
    border-radius: var(--border-radius);
    background: transparent;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.drop-zone:hover .drop-icon-circle {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(213,63,140,0.2);
}

.drop-zone.drag-over {
    background: var(--color-accent-soft);
    border-radius: var(--border-radius-lg);
}

.drop-zone.drag-over .drop-icon-circle {
    transform: scale(1.08);
    box-shadow: var(--shadow-glow);
}

.drop-zone-content {
    pointer-events: none;
}

.drop-icon-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    color: var(--color-accent);
    transition: all var(--transition-base);
}

.drop-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: var(--space-xs);
}

.drop-hint {
    font-size: 0.9rem;
    color: var(--color-ink-muted);
    font-weight: 400;
}

/* Legacy classes kept for compat */
.drop-formats {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-secondary);
    background: var(--color-secondary-soft);
    padding: 4px 12px;
    border-radius: var(--border-radius-pill);
    font-weight: 500;
    margin-top: var(--space-sm);
}

.drop-icon { display: none; }

/* ========================================
   Files Section
   ======================================== */
.files-section {
    animation: fadeIn 0.4s var(--ease-out);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-ink);
}

.btn-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-ink-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.btn-text:hover {
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

.file-list {
    list-style: none;
    margin-bottom: var(--space-lg);
    border-radius: var(--border-radius);
    background: var(--color-surface);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
}

.file-item {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    animation: slideIn 0.3s var(--ease-out);
    transition: background var(--transition-fast);
}

.file-item:last-child { border-bottom: none; }
.file-item:hover { background: rgba(0,0,0,0.01); }

.file-icon {
    width: 36px;
    height: 36px;
    margin-right: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-success);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 600;
    border-radius: 50%;
    letter-spacing: 0.03em;
}

.file-info { flex: 1; min-width: 0; }

.file-name {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-ink-muted);
    margin-top: 2px;
}

.file-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    color: var(--color-ink-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.file-remove:hover {
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

/* Current Config Display */
.current-config {
    margin-bottom: var(--space-lg);
    padding: 10px 16px;
    background: var(--color-secondary-soft);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    border: 1px solid rgba(90,103,216,0.1);
}

.config-label { color: var(--color-ink-muted); font-weight: 400; }
.config-value { font-weight: 600; color: var(--color-secondary); }

/* ========================================
   Buttons — Pink / Magenta Primary
   ======================================== */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px var(--space-xl);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #fff;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon-left {
    margin-right: var(--space-sm);
    font-size: 0.85em;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px var(--space-xl);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-ink);
    background: var(--color-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    border-color: var(--color-ink-muted);
    background: var(--color-paper-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   Progress Section
   ======================================== */
.progress-section {
    animation: fadeIn 0.4s var(--ease-out);
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.progress-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-accent);
    padding: 4px 12px;
    background: var(--color-accent-soft);
    border-radius: var(--border-radius-pill);
}

.progress-bar-container {
    height: 8px;
    background: var(--color-paper-dark);
    border-radius: var(--border-radius-pill);
    overflow: hidden;
    margin-bottom: var(--space-lg);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-success), #48BB78);
    border-radius: var(--border-radius-pill);
    transition: width 0.5s var(--ease-out);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-log {
    max-height: 200px;
    overflow-y: auto;
    padding: var(--space-lg);
    background: #1A202C;
    border-radius: var(--border-radius);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.9;
    color: #CBD5E0;
    box-shadow: var(--shadow-md);
}

.log-entry { margin-bottom: var(--space-xs); animation: fadeIn 0.3s var(--ease-out); }
.log-entry.success { color: #68D391; }
.log-entry.error { color: #FC8181; }
.log-entry .timestamp { color: #4A5568; margin-right: var(--space-sm); }

/* ========================================
   Results Section
   ======================================== */
.results-section {
    animation: fadeIn 0.4s var(--ease-out);
}

.results-summary {
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--color-success-soft) 0%, rgba(198,246,213,0.3) 100%);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-lg);
    text-align: center;
    border: 1px solid rgba(56,161,105,0.12);
}

.results-summary .big-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-success);
    line-height: 1;
}

.results-summary .summary-text {
    font-size: 0.9rem;
    color: var(--color-ink-muted);
    margin-top: var(--space-sm);
}

/* Error state for results summary */
.results-summary:has(.error-number) {
    background: linear-gradient(135deg, var(--color-error-soft) 0%, rgba(254,215,226,0.3) 100%);
    border: 1px solid rgba(229,62,62,0.12);
}

.results-summary .big-number.error-number {
    color: var(--color-error);
}

.results-summary .summary-text.error-text {
    color: var(--color-error);
    font-weight: 500;
}

.results-list {
    list-style: none;
    border-radius: var(--border-radius);
    background: var(--color-surface);
    overflow: hidden;
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
}

.result-item {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.result-item:last-child { border-bottom: none; }
.result-item:hover { background: rgba(0,0,0,0.01); }

/* Error item styling */
.result-item.error-item {
    background: rgba(254,215,226,0.05);
    border-left: 3px solid var(--color-error);
}

.result-item.error-item:hover {
    background: rgba(254,215,226,0.1);
}

.result-status {
    width: 32px; height: 32px;
    margin-right: var(--space-md);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.result-status.success { background: var(--color-success-soft); color: var(--color-success); }
.result-status.error { background: var(--color-error-soft); color: var(--color-error); }

.result-info { flex: 1; min-width: 0; }
.result-name { font-size: 0.9rem; font-weight: 500; color: var(--color-ink); }
.result-stats { font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-ink-muted); margin-top: 2px; }

/* Error detail styling */
.result-error-detail {
    margin-top: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-error-soft);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(229,62,62,0.15);
}

.error-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-error);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.error-message {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-error);
    line-height: 1.5;
    word-break: break-word;
}

.result-download {
    padding: 8px 16px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-accent-soft);
    border: none;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.result-download:hover {
    background: var(--pastel-pink);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.results-actions { text-align: center; }

/* ========================================
   Form Elements (config drawer)
   ======================================== */
.form-group { margin-top: var(--space-md); }
.form-group:first-child { margin-top: 0; }

.input-label { display: block; margin-bottom: var(--space-sm); }

.label-text {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-ink);
}

.label-hint {
    font-size: 0.75rem;
    color: var(--color-ink-muted);
    margin-left: var(--space-xs);
    font-weight: 400;
}

.input-group { display: flex; gap: var(--space-sm); }

.text-input {
    flex: 1;
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--color-paper);
    color: var(--color-ink);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.text-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(90,103,216,0.12);
    background: var(--color-surface);
}

.text-input::placeholder { color: var(--color-ink-muted); opacity: 0.7; }

.select-input {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--color-paper);
    color: var(--color-ink);
    cursor: pointer;
    transition: border-color var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A0AEC0' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.select-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(90,103,216,0.12);
}

.btn-icon {
    padding: 10px 14px;
    background: var(--color-paper);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex; align-items: center; justify-content: center;
}

.btn-icon:hover { background: var(--color-paper-dark); border-color: var(--color-ink-muted); }

/* Provider Grid */
.provider-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.provider-card {
    padding: 14px 16px;
    background: var(--color-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.provider-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(90,103,216,0.03) 0%, rgba(127,140,245,0.03) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.provider-card:hover { 
    border-color: var(--color-secondary);
    transform: translateX(3px); 
    box-shadow: var(--shadow-sm);
}

.provider-card:hover::before { opacity: 1; }

.provider-card.selected {
    border-color: var(--color-secondary);
    background: var(--color-secondary-soft);
    box-shadow: 0 0 0 1px var(--color-secondary);
}

.provider-card.selected::before { opacity: 1; }

.provider-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-ink);
    text-align: center;
}

.model-description { margin-top: var(--space-sm); font-size: 0.8rem; color: var(--color-ink-muted); }
.api-hint { margin-top: var(--space-sm); font-size: 0.8rem; color: var(--color-ink-muted); line-height: 1.5; }
.api-hint a { color: var(--color-secondary); text-decoration: none; font-weight: 500; }
.api-hint a:hover { text-decoration: underline; }

.btn-save {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--space-md);
    width: 100%;
    padding: 12px var(--space-md);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #fff;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-save::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-save:hover { 
    background: linear-gradient(135deg, var(--color-secondary-light) 0%, #9FA8FF 100%);
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(90,103,216,0.25), var(--shadow-md); 
}

.btn-save:hover::before { opacity: 1; }

.btn-save:active { 
    transform: translateY(0); 
    box-shadow: var(--shadow-sm);
}

/* ========================================
   Notes / Footer — Hidden
   ======================================== */
.notes-section, .footer { display: none; }

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ========================================
   Scrollbar
   ======================================== */
.progress-log::-webkit-scrollbar { width: 6px; }
.progress-log::-webkit-scrollbar-track { background: transparent; }
.progress-log::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.progress-log::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
    .container { padding: var(--space-lg) var(--space-md); }

    .hero {
        display: flex;
        flex-direction: column;
        gap: var(--space-lg);
        min-height: auto;
        align-items: center;
    }

    .hero-left {
        padding-right: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-heading { font-size: 3rem; }
    .hero-subheading { font-size: 2.2rem; }
    .hero-desc { max-width: none; margin-left: auto; margin-right: auto; }

    .feature-badges {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: var(--space-xl); /* 增加与上传区域的距离 */
    }

    /* 三个box统一宽度 */
    .hero-right {
        padding: var(--space-xl);
        min-height: 320px;
        width: 100%;
        max-width: 500px;
        margin-top: var(--space-lg); /* 增加与上方元素的距离 */
    }

    .quota-widget {
        max-width: 500px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .wechat-qr-section {
        max-width: 500px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .wechat-qr-image {
        width: 150px;
        height: 150px;
    }

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

    .bg-orb-1, .bg-orb-2, .bg-orb-3 { opacity: 0.25; }
}

@media (max-width: 480px) {
    .hero-heading { font-size: 2.4rem; }
    .hero-subheading { font-size: 1.8rem; }

    .hero-right { padding: var(--space-lg); }
    .drop-icon-circle { width: 64px; height: 64px; }
    .drop-icon-circle svg { width: 22px; height: 22px; }
}

/* ========================================
   Copyright Notice
   ======================================== */
.copyright-notice {
    position: relative;
    padding-top: 6rem;
    padding-bottom: 1.5rem;
    padding-left: 1rem;
    font-size: 0.65rem;
    color: rgba(26, 32, 44, 0.25);
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 0.01em;
    user-select: none;
}

/* AI Disclaimer */
.ai-disclaimer {
    margin-top: 2rem;
    margin-bottom: 0;
    text-align: center;
    font-size: 0.55rem;
    color: rgba(26, 32, 44, 0.25);
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 0.01em;
    user-select: none;
}
