/* ===== Reset ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
    background: #0b1220;
    color: #e5e7eb;
    line-height: 1.6;
}

/* ===== Topbar ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 18, 32, 0.75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    color: #fff;
    text-decoration: none;
    font-weight: 950;
    letter-spacing: -0.01em;
}

.nav {
    display: none;
    gap: 0.9rem;
}

.nav a {
    color: rgba(229, 231, 235, 0.75);
    text-decoration: none;
    font-weight: 850;
}

.nav a:hover {
    color: #fff;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

/* ===== Layout ===== */
.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 1rem;
}

.page {
    padding-bottom: 3rem;
}

/* ===== Hero background ===== */
.hero {
    padding: 2.5rem 0 2rem;
    background:
        radial-gradient(1200px 500px at 50% -50%, rgba(37, 99, 235, 0.55), transparent 70%),
        radial-gradient(900px 500px at 10% 0%, rgba(16, 185, 129, 0.25), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(168, 85, 247, 0.18), transparent 60%);
}

/* ===== Typography ===== */
h1 {
    text-align: center;
    font-weight: 900;
    letter-spacing: -0.02em;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: rgba(229, 231, 235, 0.75);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    margin-bottom: 1.25rem;
}

.seo-intro {
    text-align: center;
    max-width: 70ch;
    margin: 0.75rem auto 1rem;
    color: rgba(229, 231, 235, 0.75);
}

.seo-note {
    margin-top: 1rem;
    text-align: center;
    color: rgba(229, 231, 235, 0.7);
}

.seo-note a {
    color: rgba(147, 197, 253, 0.95);
}

/* ===== Card ===== */
.converter-card {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    max-width: 860px;
    margin: 0.75rem auto 0;
}

.card-top {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(37, 99, 235, 0.25);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
}

.badge.warn {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.25);
}

/* ===== Mode buttons ===== */
.modes {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 1rem 0 0.75rem;
}

.mode {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(229, 231, 235, 0.85);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}

.mode:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.18);
}

.mode.active {
    background: rgba(37, 99, 235, 0.9);
    border-color: rgba(37, 99, 235, 0.9);
    color: #fff;
}

/* ===== Dropzone ===== */
.dropzone {
    margin: 0.75rem auto 0.75rem;
    border: 1.8px dashed rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    cursor: pointer;
    transition: 0.2s ease;
    outline: none;
    max-width: 760px;
}

.dropzone:hover,
.dropzone:focus {
    background: rgba(37, 99, 235, 0.10);
    border-color: rgba(37, 99, 235, 0.55);
}

.dropzone.dragover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.6);
}

.dropzone input[type="file"] {
    display: none;
}

.dz-inner {
    padding: 1.3rem 1rem;
    text-align: center;
}

.dz-icon {
    font-size: 1.7rem;
    margin-bottom: 0.2rem;
    opacity: 0.9;
}

.dz-title {
    font-weight: 900;
    font-size: 1.05rem;
    color: #fff;
}

.dz-sub {
    color: rgba(229, 231, 235, 0.7);
    margin-top: 0.2rem;
}

.filename {
    margin-top: 0.6rem;
    font-weight: 900;
    color: #fff;
    word-break: break-word;
}

.hint {
    margin-top: 0.35rem;
    font-size: 0.92rem;
    color: rgba(229, 231, 235, 0.7);
}

/* ===== Actions ===== */
.actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

button {
    border: 0;
    border-radius: 12px;
    padding: 0.85rem 1.15rem;
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.2s ease, opacity 0.2s ease;
}

button:active {
    transform: scale(0.98);
}

.primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}

.download {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #052e2b;
}

.primary:disabled,
.download:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.status {
    text-align: center;
    margin-top: 0.8rem;
    min-height: 1.4rem;
    font-weight: 800;
    color: rgba(229, 231, 235, 0.9);
}

.spinner {
    display: none;
    margin: 0.9rem auto 0;
    width: 34px;
    height: 34px;
    border: 4px solid rgba(255, 255, 255, 0.18);
    border-top: 4px solid rgba(37, 99, 235, 0.95);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.linklike {
    background: transparent;
    border: none;
    margin: 0.75rem auto 0;
    display: block;
    color: rgba(147, 197, 253, 0.95);
    text-decoration: underline;
    font-weight: 900;
}

/* ===== Trust row ===== */
.trust-row {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.trust-pill {
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(229, 231, 235, 0.85);
    font-weight: 850;
    font-size: 0.92rem;
}

/* ===== Ad slot ===== */
.ad-slot {
    margin: 1.2rem auto 0;
    max-width: 760px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.8rem;
}

.ad-label {
    font-size: 0.85rem;
    font-weight: 900;
    color: rgba(229, 231, 235, 0.7);
    margin-bottom: 0.5rem;
}

.ad-box {
    border-radius: 14px;
    padding: 1.1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(229, 231, 235, 0.7);

    /* Reserve space to reduce CLS (RPM + SEO) */
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== SEO sections ===== */
.content-section {
    margin-top: 2.6rem;
}

.content-section .container {
    max-width: 980px;
}

.content-section h2 {
    font-size: clamp(1.25rem, 2.6vw, 1.7rem);
    margin-bottom: 0.8rem;
    color: #fff;
}

.steps-list {
    padding-left: 1.2rem;
    margin: 0.8rem 0 1rem;
}

p,
li {
    color: rgba(229, 231, 235, 0.72);
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    margin-top: 1rem;
}

.benefit {
    background: rgba(17, 24, 39, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.benefit strong {
    color: #fff;
    display: block;
    margin-bottom: 0.25rem;
}

.faq h3 {
    color: #fff;
    margin-top: 1rem;
}

.faq p {
    margin-top: 0.35rem;
}

/* ===== Compliance pages (About/Privacy/Contact) ===== */
.compliance-wrap {
    padding: 2rem 0 1rem;
    background:
        radial-gradient(900px 300px at 50% -30%, rgba(37, 99, 235, 0.35), transparent 70%);
}

.compliance-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.25rem;
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.compliance-page h1 {
    text-align: left;
    margin-bottom: 0.75rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.compliance-page h2 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.compliance-page h3 {
    margin-top: 1rem;
    color: rgba(229, 231, 235, 0.92);
}

.compliance-page a {
    color: rgba(147, 197, 253, 0.95);
}

.back-link {
    display: inline-block;
    margin-bottom: 0.75rem;
    text-decoration: none;
    font-weight: 900;
}

.last-updated {
    color: rgba(229, 231, 235, 0.7);
    margin-bottom: 1rem;
}

.compliance-page ul {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.compliance-page li {
    margin: 0.25rem 0;
}

/* ===== Footer ===== */
.site-footer {
    margin-top: 3rem;
    background: #060a12;
    padding: 2rem 1rem;
}

.footer-content {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.footer-links a {
    color: rgba(229, 231, 235, 0.65);
    text-decoration: none;
    font-weight: 900;
}

.footer-links a:hover {
    color: #fff;
}

.footer-badge {
    background: rgba(37, 99, 235, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 950;
}

.footer-copyright {
    color: rgba(229, 231, 235, 0.55);
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
    .converter-card {
        padding: 1.5rem;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .actions button {
        width: 100%;
    }

    .converter-card {
        padding: 1rem;
    }

    .compliance-page {
        padding: 1rem;
    }
}

/* Status colors */
.success {
    color: #34d399;
    font-weight: 900;
}

.error {
    color: #fb7185;
    font-weight: 900;
}