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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --border-color: #2a2a38;
    --border-light: #3a3a4a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===== Navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-home {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-home:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-home svg {
    width: 18px;
    height: 18px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand svg {
    -webkit-text-fill-color: initial;
    color: var(--accent-primary);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.hero-glow-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-glow-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: -100px;
    right: 10%;
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--success);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Main Content ===== */
.main-content {
    padding-bottom: 80px;
}

.tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-lg);
}

/* ===== Steps ===== */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.step.active {
    background: var(--accent-glow);
    border-color: var(--accent-primary);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--accent-primary);
    color: white;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.step.active .step-label {
    color: var(--text-primary);
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--border-color);
}

/* ===== Upload Section ===== */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.upload-box {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

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

.upload-box.dragover {
    border-color: var(--accent-primary);
    background: var(--accent-glow);
    transform: scale(1.02);
}

.upload-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.upload-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.file-info {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    text-align: left;
    position: relative;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 24px;
}

.file-size {
    font-size: 12px;
    color: var(--text-muted);
}

.file-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--error-bg);
    color: var(--error);
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.file-remove:hover {
    background: var(--error);
    color: white;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

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

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-outline:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* ===== Action Area ===== */
.action-area {
    text-align: center;
}

.hint-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Progress Section ===== */
.progress-section {
    padding: 20px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.progress-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.progress-percent {
    font-size: 24px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-bar {
    height: 8px;
    background: var(--bg-card);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 32px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.progress-step.active {
    color: var(--text-primary);
}

.progress-step.done {
    color: var(--success);
}

.prog-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s ease;
}

.progress-step.active .prog-dot {
    background: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-glow);
}

.progress-step.done .prog-dot {
    background: var(--success);
}

.log-area {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.8;
}

.log-entry {
    color: var(--text-secondary);
    padding: 2px 0;
}

.log-entry.success {
    color: var(--success);
}

.log-entry.error {
    color: var(--error);
}

.log-entry.info {
    color: var(--accent-primary);
}

/* ===== Result Section ===== */
.result-section, .error-section {
    text-align: center;
    padding: 20px 0;
}

.result-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.result-icon.success {
    background: var(--success-bg);
    color: var(--success);
}

.result-icon.error {
    background: var(--error-bg);
    color: var(--error);
}

.result-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.result-desc {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

.detail-item {
    text-align: center;
}

.detail-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Features Section ===== */
.features {
    margin-top: 80px;
}

.section-title {
    text-align: center;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== How it works ===== */
.how-it-works {
    margin-top: 80px;
}

.how-steps {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
}

.how-step {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
}

.how-step-num {
    font-size: 48px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.how-step h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.how-step p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.how-arrow {
    display: flex;
    align-items: center;
    font-size: 32px;
    color: var(--border-light);
    font-weight: 300;
}

/* ===== FAQ Section ===== */
.faq-section {
    margin-top: 80px;
}

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

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--border-light);
}

.faq-item[open] {
    border-color: var(--accent-primary);
}

.faq-item summary {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

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

.faq-item summary::after {
    content: '+';
    font-size: 24px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    font-weight: 300;
}

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

.faq-item p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand svg {
    -webkit-text-fill-color: initial;
    color: var(--accent-primary);
}

.footer-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.footer-home {
    display: inline-block;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-home:hover {
    color: var(--accent-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .tool-card {
        padding: 32px 24px;
    }
    
    .upload-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .how-steps {
        flex-direction: column;
    }
    
    .how-arrow {
        transform: rotate(90deg);
        justify-content: center;
    }
    
    .steps {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .step-line {
        display: none;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 60px 0 40px;
    }
    
    .tool-card {
        padding: 24px 16px;
        margin-top: -20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .result-details {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 16px;
    }
    
    .detail-value {
        font-size: 16px;
    }
    
    .step {
        padding: 8px 12px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .nav-home span {
        display: none;
    }
}
