@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --glass: rgba(255, 255, 255, 0.15);
    --glass-strong: rgba(255, 255, 255, 0.22);
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-border-strong: rgba(255, 255, 255, 0.5);
    --glass-shadow: rgba(180, 120, 80, 0.08);
    --glass-blur: 28px;
    --text: #3d2b1f;
    --text-mid: #6b5244;
    --text-dim: #a08e82;
    --accent: #f4845f;
    --accent-light: #f7a072;
    --gradient-btn: linear-gradient(135deg, #f4845f, #f7b267);
    --danger: #d94f4f;
    --radius: 20px;
    --radius-sm: 12px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    background: #fde8d8;
    background-image:
        radial-gradient(ellipse at 20% 10%, rgba(247, 178, 103, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(244, 132, 95, 0.3) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 90%, rgba(255, 200, 160, 0.35) 0%, transparent 50%);
    background-attachment: fixed;
}

.bg-orb {
    position: fixed;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 132, 95, 0.25) 0%, transparent 70%);
    top: 10%; right: -5%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: drift 20s ease-in-out infinite;
}

.bg-orb::before {
    content: '';
    position: fixed;
    width: 350px; height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 178, 103, 0.2) 0%, transparent 70%);
    bottom: 5%; left: -5%;
    filter: blur(80px);
    animation: drift 26s ease-in-out infinite reverse;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 40px); }
}

.container {
    max-width: 620px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px var(--glass-shadow);
}

.glass-strong {
    background: var(--glass-strong);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.4);
}

header { padding: 56px 0 28px; text-align: center; }

.logo {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

h1 {
    font-size: clamp(30px, 7vw, 48px);
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text);
}

.subtitle {
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 300;
    margin-top: 6px;
}

.ad-slot {
    padding: 16px;
    text-align: center;
    color: var(--text-dim);
    font-size: 11px;
    margin: 20px 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── trust badges ── */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.trust-badges span {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: rgba(244, 132, 95, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(244, 132, 95, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── dropzone ── */
.dropzone {
    padding: 52px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropzone:hover, .dropzone.dragover {
    transform: translateY(-2px);
    border-color: var(--glass-border-strong);
    box-shadow: 0 8px 32px rgba(180, 120, 80, 0.12);
}

.drop-icon { font-size: 44px; margin-bottom: 12px; display: block; }
.drop-text { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.drop-hint { color: var(--text-dim); font-size: 13px; }
.drop-hint em { color: var(--accent); font-style: normal; font-weight: 500; }
input[type="file"] { display: none; }

/* ── example result ── */
.example-result {
    margin-top: 16px;
    padding: 18px 20px;
    text-align: left;
}
.example-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.example-preview {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-mid);
    white-space: pre-wrap;
    max-height: 100px;
    overflow: hidden;
    position: relative;
}
.example-preview::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(253, 232, 216, 0.6));
}
.example-meta {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

/* ── file list ── */
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.file-list:empty { display: none; }
.file-list .file-card { padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.file-list .file-icon {
    width: 34px; height: 34px;
    background: var(--gradient-btn);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.file-list .file-info { flex: 1; min-width: 0; }
.file-list .file-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-list .file-meta { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

/* ── status ── */
.status { margin-top: 14px; display: none; }
.status.visible { display: block; }
.file-card { padding: 14px 16px; display: flex; align-items: center; gap: 12px; }

.file-icon {
    width: 38px; height: 38px;
    background: var(--gradient-btn);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; font-weight: 600; color: #fff;
    flex-shrink: 0;
}

.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* ── progress ── */
.progress-wrap { margin-top: 14px; display: none; }
.progress-wrap.visible { display: block; }
.progress-bar { height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gradient-btn); border-radius: 2px; width: 0%; transition: width 0.5s ease; }
.progress-text { font-size: 12px; color: var(--text-dim); margin-top: 8px; text-align: center; }

/* ── error ── */
.error-msg {
    margin-top: 14px; padding: 14px 18px;
    background: rgba(217, 79, 79, 0.08);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(217, 79, 79, 0.2);
    border-radius: var(--radius);
    color: var(--danger); font-size: 14px;
    display: none; text-align: center;
}
.error-msg.visible { display: block; }

/* ── result ── */
.result { margin-top: 14px; display: none; }
.result.visible { display: block; }

.preview-box {
    padding: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; line-height: 1.8;
    color: var(--text-mid);
    max-height: 170px; overflow: hidden;
    position: relative;
    white-space: pre-wrap; word-break: break-all;
}

.preview-box::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(253, 232, 216, 0.6));
    pointer-events: none;
}

.download-btn {
    display: block; width: 100%; margin-top: 14px; padding: 14px;
    background: var(--gradient-btn);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 15px; font-weight: 600;
    border: none; border-radius: var(--radius);
    cursor: pointer; transition: all 0.2s ease;
    text-decoration: none; text-align: center;
    box-shadow: 0 4px 16px rgba(244, 132, 95, 0.25);
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(244, 132, 95, 0.3);
}

.download-meta { text-align: center; font-size: 12px; color: var(--text-dim); margin-top: 8px; }

.reset-btn {
    display: block; width: 100%; margin-top: 8px; padding: 11px;
    background: rgba(255,255,255,0.15);
    color: var(--text-dim);
    font-family: 'Outfit', sans-serif;
    font-size: 13px; font-weight: 500;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    cursor: pointer; transition: all 0.2s ease;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.reset-btn:hover { background: rgba(255,255,255,0.3); color: var(--text); }

/* ── batch summary ── */
.batch-summary { padding: 16px 18px; }
.batch-item { font-size: 13px; padding: 6px 0; color: var(--text-mid); }
.batch-item.error { color: var(--danger); }

/* ── info ── */
.info-section { margin-top: 16px; padding: 22px 24px; }
.info-section h2 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.info-section p, .info-section li { color: var(--text-mid); font-size: 13px; line-height: 1.8; }
.info-section ul { list-style: none; padding: 0; }
.info-section li::before { content: '· '; color: var(--accent); font-weight: 700; }
.faq dt { font-weight: 600; margin-top: 14px; font-size: 13px; }
.faq dd { color: var(--text-mid); font-size: 13px; margin: 3px 0 0; }

/* ── footer ── */
footer { margin-top: 36px; padding: 20px 0 36px; text-align: center; }
.footer-text { color: var(--text-dim); font-size: 11px; line-height: 2; }
.footer-text a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
.footer-text a:hover { color: var(--accent); }

@media (max-width: 480px) {
    .dropzone { padding: 36px 16px; }
    .info-section { padding: 16px 18px; }
    header { padding: 40px 0 20px; }
    .trust-badges { gap: 8px; }
    .trust-badges span { font-size: 11px; padding: 5px 10px; }
}
