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

:root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a5f;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --red-500: #ef4444;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.1), 0 8px 48px rgba(0,0,0,0.05);
}

html {
    scroll-behavior: smooth;
}

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

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

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 700;
    font-size: 1.1rem;
}

.logo small {
    color: var(--blue-600);
    font-weight: 600;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    text-decoration: none;
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--blue-600);
}

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

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--blue-600);
}

.hero-subtitle {
    margin-top: 20px;
    font-size: 1.15rem;
    color: var(--gray-500);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Converter */
.converter-section {
    padding: 20px 0 80px;
}

.converter-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Drop Zone */
.drop-zone {
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.drop-zone:hover,
.drop-zone.drag-over {
    background: var(--blue-50);
    border-color: var(--blue-200);
}

.drop-zone.drag-over {
    background: var(--blue-50);
}

.upload-icon {
    width: 56px;
    height: 56px;
    color: var(--blue-500);
    margin-bottom: 16px;
}

.drop-zone h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.drop-zone p {
    font-size: 0.9rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--blue-600);
    color: #fff;
}

.btn-primary:hover {
    background: var(--blue-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

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

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
    border-radius: 10px;
}

.btn-ghost {
    background: transparent;
    color: var(--gray-500);
}

.btn-ghost:hover {
    color: var(--red-500);
    background: rgba(239,68,68,0.06);
}

.btn-success {
    background: var(--green-600);
    color: #fff;
}

.btn-success:hover {
    background: var(--green-500);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* File List */
.file-list {
    padding: 24px;
}

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

.file-list-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.file-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

.file-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--blue-100);
    color: var(--blue-600);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

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

.file-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 0.8rem;
    color: var(--gray-400);
}

.file-item-status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-item-status .badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-waiting {
    background: var(--gray-100);
    color: var(--gray-500);
}

.badge-converting {
    background: var(--blue-100);
    color: var(--blue-600);
    animation: pulse 1.5s infinite;
}

.badge-done {
    background: #dcfce7;
    color: var(--green-600);
}

.badge-error {
    background: #fef2f2;
    color: var(--red-500);
}

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

.file-item-error {
    font-size: 0.78rem;
    color: var(--red-500);
    margin-top: 2px;
    line-height: 1.3;
}

.file-item .btn-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 1.2rem;
    line-height: 1;
}

.file-item .btn-remove:hover {
    color: var(--red-500);
    background: rgba(239,68,68,0.08);
}

.file-list-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* Progress */
.progress-area {
    padding: 24px;
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-600));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* How It Works */
.how-section {
    padding: 80px 0;
    background: var(--gray-50);
}

.how-section h2,
.features-section h2,
.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 48px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step {
    text-align: center;
    padding: 32px 24px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--blue-600);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* Features */
.features-section {
    padding: 80px 0;
}

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

.feature {
    padding: 28px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.feature:hover {
    border-color: var(--blue-200);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--blue-50);
    color: var(--blue-600);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature p {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* FAQ */
.faq-section {
    padding: 80px 0;
    background: var(--gray-50);
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
}

.faq-item[open] {
    border-color: var(--blue-200);
    box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}

.faq-item summary {
    padding: 18px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--gray-800);
}

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

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

.faq-item[open] summary::after {
    content: '−';
    color: var(--blue-600);
}

.faq-item p {
    padding: 0 24px 18px;
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.7;
}

/* Footer */
.footer {
    padding: 48px 0 24px;
    background: var(--gray-900);
    color: var(--gray-400);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.85rem;
    max-width: 320px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links h4 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--blue-400);
}

.footer-bottom {
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Ad Container */
.ad-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    text-align: center;
}

.ad-container ins {
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

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

    .nav {
        display: none;
    }

    .drop-zone {
        padding: 40px 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
    }

    .file-item-name {
        max-width: 160px;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 48px 0 24px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }
}
