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

:root {
    --color-primary: #2563EB;
    --color-primary-dark: #1D4ED8;
    --color-primary-light: #3B82F6;
    --color-primary-bg: #EFF6FF;
    --color-text: #0F172A;
    --color-text-muted: #64748B;
    --color-border: #E2E8F0;
    --color-border-strong: #CBD5E1;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F8FAFC;
    --color-bg-hover: #F1F5F9;
    --color-success: #10B981;
    --color-success-bg: #ECFDF5;
    --color-danger: #EF4444;
    --color-danger-bg: #FEF2F2;
    --color-footer: #0f172a;
    --color-footer-text: #94a3b8;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --container-max: 1200px;
    --container-narrow: 760px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}
.container-narrow { max-width: var(--container-narrow); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #fff;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-border-strong);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
}
.btn-ghost:hover { background: var(--color-bg-hover); color: var(--color-text); }

.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--color-text);
    text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--color-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}
.logo-light .logo-text { color: #fff; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    padding: 8px 14px;
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.nav-link:hover {
    color: var(--color-text);
    background: var(--color-bg-hover);
    text-decoration: none;
}
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.nav-toggle:hover { background: var(--color-bg-hover); }
.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
    position: relative;
    padding: 88px 0 64px;
    text-align: center;
    background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37, 99, 235, 0.10), transparent), var(--color-bg);
}
.hero-content { max-width: 780px; margin: 0 auto; }
.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-bg);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 100px;
    margin-bottom: 20px;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}
.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--color-text-muted);
    max-width: 620px;
    margin: 0 auto 32px;
}
.hero-cta { margin-bottom: 40px; }
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}
.hero-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 700;
}
.hero-stat span {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Sections */
.section { padding: 80px 0; }
.section.bg-light { background: var(--color-bg-alt); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* Tool Card */
.tool-section { padding: 40px 0 80px; }
.tool-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

/* Uploader */
.uploader {
    border: 2px dashed var(--color-border-strong);
    border-radius: var(--radius-lg);
    padding: 64px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: linear-gradient(180deg, #FFFFFF 0%, var(--color-bg-alt) 100%);
    outline: none;
}
.uploader:hover,
.uploader.drag-over {
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
}
.uploader:focus-visible {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}
.uploader-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    color: var(--color-primary);
    padding: 18px;
    background: var(--color-primary-bg);
    border-radius: 50%;
}
.uploader-icon svg { width: 100%; height: 100%; }
.uploader-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.uploader-hint {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 14px;
}
.uploader-note {
    margin-top: 20px;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* File Panel */
.file-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.file-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.file-summary { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.file-panel-title {
    font-size: 1.15rem;
    font-weight: 700;
}
.file-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-chip {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 100px;
}
.file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
    padding: 4px;
    margin: 0 -4px;
}
.file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    cursor: grab;
}
.file-item:active { cursor: grabbing; }
.file-item:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-xs); }
.file-item.dragging { opacity: 0.4; border-style: dashed; }
.file-item.drag-over {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.file-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}
.file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.file-name {
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-size {
    font-size: 12px;
    color: var(--color-text-muted);
}
.file-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.file-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.file-action-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
}
.file-action-btn.danger:hover {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}
.file-action-btn svg { width: 16px; height: 16px; }
.action-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
}

/* Process / Success / Error Screens */
.process-screen,
.success-screen,
.error-screen {
    text-align: center;
    padding: 40px 16px;
}
.process-icon,
.success-icon,
.error-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}
.process-icon {
    background: var(--color-primary-bg);
    color: var(--color-primary);
    animation: pulse 2s ease-in-out infinite;
}
.process-icon svg { width: 100%; height: 100%; animation: spin 1.8s linear infinite; }
.success-icon { background: var(--color-success-bg); color: var(--color-success); }
.error-icon { background: var(--color-danger-bg); color: var(--color-danger); }
.success-icon svg,
.error-icon svg { width: 100%; height: 100%; }

.process-title,
.success-title,
.error-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.process-subtitle,
.success-subtitle,
.error-message {
    color: var(--color-text-muted);
    font-size: 15px;
    margin-bottom: 24px;
}
.progress {
    max-width: 420px;
    margin: 24px auto 12px;
    height: 8px;
    background: var(--color-bg-alt);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
    border-radius: 100px;
    transition: width 0.3s ease;
}
.process-step {
    font-size: 13px;
    color: var(--color-text-muted);
    min-height: 18px;
}
.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.04); opacity: 0.9; }
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.step-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: all var(--transition);
}
.step-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary-bg);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 16px;
}
.step-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.step-desc { color: var(--color-text-muted); font-size: 14px; }

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.feature-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: all var(--transition);
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.feature-icon {
    width: 48px;
    height: 48px;
    padding: 12px;
    border-radius: 12px;
    background: var(--color-primary-bg);
    color: var(--color-primary);
    margin-bottom: 18px;
}
.feature-icon svg { width: 100%; height: 100%; }
.feature-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-desc { color: var(--color-text-muted); font-size: 14px; }

/* Benefits */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}
.benefit-item {
    display: flex;
    gap: 14px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}
.benefit-item:hover { box-shadow: var(--shadow-sm); }
.benefit-check {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-success-bg);
    color: var(--color-success);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.benefit-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.benefit-item p { color: var(--color-text-muted); font-size: 14px; }

/* Privacy */
.privacy-container { max-width: 760px; text-align: center; }
.privacy-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    padding: 18px;
    border-radius: 50%;
    background: var(--color-success-bg);
    color: var(--color-success);
}
.privacy-icon svg { width: 100%; height: 100%; }
.privacy-lead {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 28px;
    line-height: 1.7;
}
.privacy-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    text-align: left;
}
.privacy-list li {
    padding: 14px 18px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-text-muted);
}
.privacy-list li strong { color: var(--color-text); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
}
.faq-item[open] {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    list-style: none;
    user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { background: var(--color-bg-alt); }
.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: transform var(--transition), background var(--transition);
}
.faq-item[open] .faq-icon {
    background: var(--color-primary);
    color: #fff;
    transform: rotate(45deg);
}
.faq-answer {
    padding: 0 22px 20px;
    color: var(--color-text-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* Related Tools */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.related-card {
    display: flex;
    flex-direction: column;
    padding: 22px 18px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    transition: all var(--transition);
    text-decoration: none;
}
.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
    text-decoration: none;
}
.related-icon {
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 10px;
    background: var(--color-primary-bg);
    color: var(--color-primary);
    margin-bottom: 14px;
}
.related-icon svg { width: 100%; height: 100%; }
.related-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.related-card p { color: var(--color-text-muted); font-size: 13px; line-height: 1.5; }

/* Footer - DARK */
.footer {
    background: var(--color-footer);
    padding: 48px 0 32px;
    margin-top: 40px;
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
    align-items: flex-start;
}
.footer-brand { max-width: 320px; }
.footer-tagline {
    margin-top: 10px;
    color: var(--color-footer-text);
    font-size: 14px;
}
.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--color-footer-text);
    font-size: 14px;
    font-weight: 500;
}
.footer-links a:hover { color: #ffffff; }
.footer-copy {
    width: 100%;
    text-align: center;
    color: var(--color-footer-text);
    font-size: 13px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Focus */
*:focus { outline: none; }
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 860px) {
    .section { padding: 60px 0; }
    .hero { padding: 56px 0 40px; }
    .tool-card { padding: 28px 20px; }
    .uploader { padding: 48px 16px; }

    .nav-toggle { display: flex; }
    .nav-menu {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: #fff;
        padding: 12px;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition);
    }
    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-link { padding: 12px 14px; }

    .hero-stats { gap: 24px; }
    .hero-stat strong { font-size: 19px; }

    .file-actions { flex-direction: column; }
    .file-action-btn { width: 28px; height: 28px; }

    .action-row {
        flex-direction: column;
        align-items: stretch;
    }
    .action-row .btn { width: 100%; }

    .footer-inner { flex-direction: column; align-items: flex-start; }
    .footer-links { width: 100%; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-title { font-size: 2rem; }
    .tool-card { padding: 22px 16px; }
    .uploader-icon { width: 60px; height: 60px; padding: 14px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .related-card { padding: 18px 14px; }
}

/* Scrollbar */
.file-list::-webkit-scrollbar { width: 8px; }
.file-list::-webkit-scrollbar-track { background: transparent; }
.file-list::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: 4px;
}
.file-list::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

