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

html, body {
    min-height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';
    background: #0c0c0e;
    color: #f2f2f3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* ── Page ─────────────────────────────────────────────────────────────────── */

.page {
    max-width: 580px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f97316;
    background: rgba(249,115,22,0.1);
    border: 1px solid rgba(249,115,22,0.2);
    border-radius: 99px;
    padding: 0.25em 0.9em;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #f2f2f3;
    margin-bottom: 1rem;
}

.hero-accent {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 0.95rem;
    color: #8e8e99;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.65;
    letter-spacing: -0.01em;
}

/* ── Features ─────────────────────────────────────────────────────────────── */

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 2rem;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.1rem 1.1rem;
    background: #141416;
}

.feature-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #f97316;
}

.feature-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f2f2f3;
    letter-spacing: -0.01em;
    margin-bottom: 0.2rem;
}

.feature-desc {
    font-size: 0.75rem;
    color: #64646f;
    line-height: 1.4;
}

/* ── Drop zone ────────────────────────────────────────────────────────────── */

.drop-zone {
    background: #141416;
    border: 1.5px dashed rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #f97316;
    background: rgba(249,115,22,0.04);
}

.upload-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 1rem;
    color: #3a3a45;
}

.drop-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8e8e99;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

.drop-sub {
    color: #525260;
    margin-bottom: 0.875rem;
    font-size: 0.82rem;
}

.drop-hint {
    color: #525260;
    font-size: 0.75rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* ── Meta table ───────────────────────────────────────────────────────────── */

.meta-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.meta-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.meta-table td:first-child {
    color: #64646f;
    width: 40%;
    font-weight: 500;
}

.meta-table tr:last-child td { border-bottom: none; }

.result-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Progress ─────────────────────────────────────────────────────────────── */

#progress-section {
    margin-top: 1.5rem;
    text-align: center;
}

.progress-bar-wrap {
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    height: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: #f97316;
    border-radius: 99px;
    transition: width 0.3s ease;
}

#progress-label {
    font-size: 0.8rem;
    color: #64646f;
}

/* ── Result / error cards ─────────────────────────────────────────────────── */

.result-card {
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-top: 1.25rem;
    border: 1px solid rgba(255,255,255,0.07);
    background: #141416;
}

.result-card.success { border-color: rgba(249,115,22,0.3); }
.result-card.error   { border-color: rgba(244,63,94,0.3); }

.result-card h2 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #f2f2f3;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: #8e8e99;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    letter-spacing: -0.01em;
}

.btn:hover {
    background: rgba(255,255,255,0.08);
    color: #f2f2f3;
    border-color: rgba(255,255,255,0.15);
}

.btn-primary {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
    font-weight: 600;
}

.btn-primary:hover {
    background: #ea6c0a;
    border-color: #ea6c0a;
    color: #fff;
}

.btn-danger {
    border-color: rgba(244,63,94,0.3);
    color: #f43f5e;
    background: rgba(244,63,94,0.06);
}

.btn-danger:hover {
    background: rgba(244,63,94,0.12);
    border-color: rgba(244,63,94,0.5);
}

/* ── Privacy block ────────────────────────────────────────────────────────── */

.privacy-block {
    margin-top: 1.75rem;
    background: #141416;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
}

.privacy-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.privacy-icon {
    width: 18px;
    height: 18px;
    color: #34d399;
    flex-shrink: 0;
}

.privacy-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #34d399;
    letter-spacing: -0.01em;
}

.privacy-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.privacy-list li {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: #8e8e99;
    line-height: 1.5;
}

.privacy-check {
    color: #34d399;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.privacy-list strong {
    color: #f2f2f3;
    font-weight: 600;
}

.privacy-list em {
    font-style: normal;
    color: #f2f2f3;
}

/* ── Instructions ─────────────────────────────────────────────────────────── */

.instructions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.instructions h3 {
    font-size: 0.7rem;
    font-weight: 700;
    color: #525260;
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.instructions ol {
    padding-left: 1.35rem;
}

.instructions li {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #64646f;
    line-height: 1.6;
}

.instructions strong {
    color: #8e8e99;
    font-weight: 600;
}

code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8em;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    padding: 0.1em 0.4em;
    color: #f97316;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1.5rem;
}

.modal {
    background: #141416;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 18px;
    padding: 1.75rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.modal-icon {
    width: 18px;
    height: 18px;
    color: #f97316;
    flex-shrink: 0;
}

.modal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f2f2f3;
    letter-spacing: -0.02em;
}

.modal-meta {
    background: #0f0f12;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-size: 0.82rem;
}

.modal-key {
    color: #525260;
    font-weight: 500;
    flex-shrink: 0;
}

.modal-val {
    color: #f2f2f3;
    font-weight: 500;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-cta {
    width: 100%;
    padding: 0.65rem 1.2rem;
    font-size: 0.9rem;
}

.modal-actions .btn {
    width: 100%;
    padding: 0.55rem 1.2rem;
}

.hidden { display: none !important; }

/* ── Footer ────────────────────────────────────────────────────────────────── */

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.75rem;
    color: #444;
}
.site-footer a {
    color: #555;
    text-decoration: none;
}
.site-footer a:hover { color: #f97316; }
