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

:root {
    --bg: #f5f0e8;
    --bg2: #ece7df;
    --surface: #ffffff;
    --surface2: #f0ebe3;
    --border: #d8d0c4;
    --border-dark: #b8b0a4;
    --ink: #1a1714;
    --ink2: #4a4540;
    --ink3: #8a837c;
    --ink4: #b0a8a0;
    --accent: #e85d26;
    --accent2: #c44d1e;
    --accent-bg: rgba(232,93,38,0.08);
    --accent-bg2: rgba(232,93,38,0.15);
    --green: #2a7a4b;
    --green-bg: rgba(42,122,75,0.1);
    --blue: #1d5fa8;
    --blue-bg: rgba(29,95,168,0.1);
    --red: #c0392b;
    --red-bg: rgba(192,57,43,0.1);
    --yellow: #e67e22;
    --yellow-bg: rgba(230,126,34,0.1);
    --radius: 8px;
    --shadow: 0 2px 12px rgba(26,23,20,0.08), 0 1px 3px rgba(26,23,20,0.05);
    --shadow-lg: 0 8px 32px rgba(26,23,20,0.12), 0 2px 8px rgba(26,23,20,0.08);
}

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

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Space Mono', monospace;
    min-height: 100vh;
    padding-bottom: 80px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Header */
header {
    background: var(--ink);
    padding: 0 48px;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 32px;
    position: relative;
    z-index: 10;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-box {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

header h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}
header h1 span { color: var(--accent); }

.header-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-family: 'Unbounded', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #aaa;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.15s;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; border-bottom-color: var(--accent); }

.header-sub {
    margin-left: auto;
    font-size: 10px;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Main */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px 0;
    position: relative;
    z-index: 1;
}

/* Drop Zone */
#drop-zone {
    background: var(--surface);
    border: 2px dashed var(--border-dark);
    border-radius: 12px;
    padding: 56px 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.2s;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.45s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
#drop-zone::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(232,93,38,0.04) 0%, transparent 70%);
    pointer-events: none;
}
#drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-bg);
    transform: scale(1.005);
}
/* Add hover effect similar to drag-over */
#drop-zone:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
    transform: scale(1.002);
    transition: all 0.2s;
}

.dz-icon-wrap {
    width: 56px; height: 56px;
    background: var(--bg2);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}

#drop-zone h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

#drop-zone p {
    font-size: 11px;
    color: var(--ink3);
    line-height: 1.7;
    max-width: 420px;
    margin: 0 auto 24px;
}

.supported-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-bottom: 24px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.chip {
    font-size: 9px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid;
}
.chip-img { background: var(--blue-bg); color: var(--blue); border-color: rgba(29,95,168,0.2); }
.chip-vid { background: var(--red-bg); color: var(--red); border-color: rgba(192,57,43,0.2); }
.chip-aud { background: var(--green-bg); color: var(--green); border-color: rgba(42,122,75,0.2); }
.chip-doc { background: var(--yellow-bg); color: var(--yellow); border-color: rgba(230,126,34,0.2); }

.btn-browse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: 0.3px;
}
.btn-browse:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-browse:active { transform: translateY(0); }

#file-input { display: none; }

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 14px;
    flex-wrap: wrap;
}
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}
.section-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--ink3);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-right: 4px;
}
.count-pill {
    font-size: 10px;
    background: var(--accent-bg2);
    color: var(--accent);
    border: 1px solid rgba(232,93,38,0.25);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.bulk-select-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: 6px 10px;
    box-shadow: var(--shadow);
}
.bulk-select-wrap label {
    font-size: 10px;
    color: var(--ink3);
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.bulk-select-wrap select {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    padding: 0 16px 0 0;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a837c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    min-width: 60px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none !important; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:not(:disabled):active { transform: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:not(:disabled):hover { background: var(--accent2); }

.btn-secondary { background: var(--ink); color: #fff; }
.btn-secondary:not(:disabled):hover { background: #333; }

.btn-outline {
    background: var(--surface);
    color: var(--ink2);
    border: 1px solid var(--border-dark);
    box-shadow: var(--shadow);
}
.btn-outline:not(:disabled):hover { border-color: var(--ink2); }

.btn-danger {
    background: transparent;
    color: var(--ink3);
    border: 1px solid transparent;
}
.btn-danger:not(:disabled):hover { color: var(--red); border-color: rgba(192,57,43,0.3); background: var(--red-bg); }

/* File List */
#file-list { display: flex; flex-direction: column; gap: 6px; }

/* File Strip */
.file-strip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    transition: border-color 0.15s;
    animation: slideDown 0.32s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}
.file-strip::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
}
.file-strip.type-image::before { background: var(--blue); }
.file-strip.type-video::before { background: var(--red); }
.file-strip.type-audio::before { background: var(--green); }
.file-strip.type-document::before { background: var(--yellow); }
.file-strip.type-other::before { background: var(--ink3); }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
    to { opacity: 1; transform: translateY(0); }
}

.type-badge {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid;
}
.type-badge.img { background: var(--blue-bg); color: var(--blue); border-color: rgba(29,95,168,0.2); }
.type-badge.vid { background: var(--red-bg); color: var(--red); border-color: rgba(192,57,43,0.2); }
.type-badge.aud { background: var(--green-bg); color: var(--green); border-color: rgba(42,122,75,0.2); }
.type-badge.doc { background: var(--yellow-bg); color: var(--yellow); border-color: rgba(230,126,34,0.2); }
.type-badge.oth { background: var(--bg2); color: var(--ink3); border-color: var(--border); }

.strip-thumb {
    width: 40px; height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.strip-info { flex: 1; min-width: 0; }
.strip-name {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink);
    letter-spacing: -0.2px;
}
.strip-meta {
    font-size: 10px;
    color: var(--ink3);
    margin-top: 3px;
    display: flex;
    gap: 8px;
}
.strip-meta span::after { content: '·'; margin-left: 8px; color: var(--ink4); }
.strip-meta span:last-child::after { display: none; }

.format-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.format-arrow {
    color: var(--ink4);
    display: flex;
    align-items: center;
}
.format-select {
    appearance: none;
    background: var(--bg2);
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    padding: 6px 28px 6px 10px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a837c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 90px;
}
.format-select:hover { border-color: var(--accent); }
.format-select:focus { border-color: var(--accent); }

.strip-status {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    transition: all 0.2s;
}
.strip-status.idle { background: var(--bg2); color: var(--ink4); }
.strip-status.working { background: var(--yellow-bg); color: var(--yellow); }
.strip-status.done { background: var(--green-bg); color: var(--green); }
.strip-status.error { background: var(--red-bg); color: var(--red); }
.strip-status.warning {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.strip-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--border);
    display: none;
}
.strip-progress.active { display: block; }
.strip-progress-bar {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s;
    width: 0%;
    border-radius: 2px;
}

.strip-convert-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 6px;
    background: var(--accent-bg);
    border: 1px solid rgba(232,93,38,0.2);
    color: var(--accent);
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.strip-convert-btn:hover { background: var(--accent); color: #fff; }
.strip-convert-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.strip-remove-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border-radius: 5px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink4);
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.strip-remove-btn:hover { background: var(--red-bg); color: var(--red); border-color: rgba(192,57,43,0.2); }

/* Bottom Bar */
.bottom-bar {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Global Status */
#global-status {
    margin-top: 14px;
    font-size: 11px;
    color: var(--ink3);
    min-height: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
#global-status.working { color: var(--yellow); }
#global-status.success { color: var(--green); }
#global-status.error { color: var(--red); }
#global-status.warning { color: var(--yellow); }

/* FFmpeg Notice */
.ffmpeg-notice {
    background: var(--blue-bg);
    border: 1px solid rgba(29,95,168,0.2);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 10px;
    color: var(--blue);
    margin-top: 12px;
    display: none;
    line-height: 1.6;
}
.ffmpeg-notice.visible { display: block; }

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spin-anim {
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

/* SEO Content */
.seo-content {
    margin-top: 64px;
    padding: 40px 0 20px;
    border-top: 1px solid var(--border);
}
.seo-content h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.seo-content h3 {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 28px 0 12px;
    color: var(--ink2);
}
.seo-content p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink2);
    margin-bottom: 16px;
}
.seo-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}
.seo-content li {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink2);
}
.faq details {
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}
.faq summary {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink);
    margin-bottom: 8px;
}
.faq p {
    font-size: 12px;
    color: var(--ink3);
    margin-left: 0;
}

/* Footer */
footer {
    max-width: 1000px;
    margin: 60px auto 0;
    padding: 30px 24px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 11px;
    color: var(--ink3);
    position: relative;
    z-index: 1;
}
.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    color: var(--ink3);
    text-decoration: none;
    transition: color 0.15s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copyright a {
    color: var(--ink3);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.footer-copyright a:hover {
    color: var(--accent);
}

/* Mobile */
@media (max-width: 640px) {
    header { padding: 0 20px; }
    .header-nav { gap: 16px; }
    .nav-link { font-size: 10px; }
    main { padding: 24px 16px 0; }
    .strip-thumb { display: none; }
    .format-select-wrap .format-arrow { display: none; }
    footer { flex-direction: column; text-align: center; }
}

/* Contact Page */
.contact-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 0 40px;
}
.contact-container h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.contact-subhead {
    font-size: 14px;
    color: var(--ink3);
    margin-bottom: 40px;
}
.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 48px;
}
.contact-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent);
}
.contact-card h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}
.contact-card p {
    font-size: 13px;
    color: var(--ink2);
    max-width: 400px;
    margin: 0 auto 24px;
    line-height: 1.6;
}
.email-link {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 2px solid var(--accent-bg2);
    padding-bottom: 4px;
    transition: border-color 0.15s;
}
.email-link:hover {
    border-bottom-color: var(--accent);
}
.response-time {
    margin-top: 16px;
    font-size: 11px;
    color: var(--ink3);
}
.contact-faq {
    margin-top: 20px;
}
.contact-faq h3 {
    font-family: 'Unbounded', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--ink2);
}
.contact-faq details {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}
.contact-faq summary {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink);
}
.contact-faq p {
    font-size: 12px;
    color: var(--ink3);
    margin-top: 8px;
    line-height: 1.6;
}

/* Content Pages (About, Privacy, Terms) */
.content-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 0 40px;
}
.content-page h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.content-page .lede {
    font-size: 16px;
    color: var(--ink2);
    margin-bottom: 40px;
    line-height: 1.6;
    font-style: italic;
}
.content-page h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin: 36px 0 16px;
    color: var(--ink);
}
.content-page p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink2);
    margin-bottom: 18px;
}
.content-page ul {
    margin-left: 24px;
    margin-bottom: 24px;
}
.content-page li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink2);
    margin-bottom: 8px;
}
.content-page a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-bg2);
    transition: border-color 0.15s;
}
.content-page a:hover {
    border-bottom-color: var(--accent);
}