/* ================================================================
   SK FILE COMPRESSOR — World-Class Premium Theme
   Modern Blue · Fully Responsive · Dark Mode
   ================================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ---------- Design tokens ---------- */
:root {
    /* Blue palette */
    --blue-50:  #eff6ff; --blue-100: #dbeafe; --blue-200: #bfdbfe;
    --blue-300: #93c5fd; --blue-400: #60a5fa; --blue-500: #3b82f6;
    --blue-600: #2563eb; --blue-700: #1d4ed8; --blue-800: #1e40af;
    --blue-900: #1e3a8a;

    /* Cyan */
    --cyan-300: #67e8f9; --cyan-400: #22d3ee; --cyan-500: #06b6d4;

    /* Slate */
    --slate-50:  #f8fafc;  --slate-100: #f1f5f9;  --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;  --slate-400: #94a3b8;  --slate-500: #64748b;
    --slate-600: #475569;  --slate-700: #334155;  --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Semantic */
    --bg:          #f6faff;
    --surface:     #ffffff;
    --surface-2:   #f0f7ff;
    --border:      #dbeafe;
    --border-soft: #e8f2ff;
    --text:        #0f172a;
    --text-soft:   #475569;
    --text-dim:    #94a3b8;
    --success:     #10b981;
    --warn:        #f59e0b;
    --danger:      #ef4444;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 45%, #06b6d4 100%);
    --grad-soft:    linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    --grad-btn:     linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);

    /* Radii */
    --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px; --r-2xl: 36px;

    /* Shadows */
    --sh-sm: 0 2px 8px rgba(30,58,138,0.06);
    --sh-md: 0 8px 24px rgba(30,58,138,0.08);
    --sh-lg: 0 18px 48px rgba(30,58,138,0.12);
    --sh-xl: 0 28px 72px rgba(30,58,138,0.18);
    --sh-blue: 0 12px 32px rgba(37,99,235,0.30);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Container width */
    --container: 1180px;
    --container-narrow: 900px;
}

/* ---------- Base ---------- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    padding: 12px 20px;
    background: var(--blue-600);
    color: #fff;
    border-radius: 8px;
    z-index: 999;
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus { top: 20px; }

/* ---------- Background layers ---------- */
.aurora {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    overflow: hidden;
}
.aurora::before, .aurora::after {
    content: '';
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(ellipse 55% 40% at 20% 25%, rgba(37,99,235,0.18), transparent 60%),
        radial-gradient(ellipse 45% 40% at 80% 30%, rgba(6,182,212,0.16), transparent 60%),
        radial-gradient(ellipse 60% 45% at 50% 90%, rgba(14,165,233,0.14), transparent 65%);
    animation: auroraMove 26s ease-in-out infinite alternate;
}
.aurora::after {
    animation-duration: 34s;
    animation-direction: alternate-reverse;
    opacity: 0.6;
    filter: blur(50px);
}
@keyframes auroraMove {
    0%   { transform: translate(0,0) rotate(0) scale(1); }
    50%  { transform: translate(-2%,3%) rotate(3deg) scale(1.05); }
    100% { transform: translate(2%,-3%) rotate(-3deg) scale(1.02); }
}
.grid-pattern {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(37,99,235,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,99,235,0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 20%, transparent 75%);
}

/* ---------- Container ---------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}
.wrap { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: rgba(255,255,255,0.78);
    border-bottom: 1px solid rgba(219,234,254,0.9);
}
[data-theme="dark"] .navbar {
    background: rgba(15,22,40,0.85);
    border-bottom-color: #1e2a47;
}
.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
}

/* Logo */
.logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--text);
    transition: transform var(--ease) 0.25s;
    flex-shrink: 0;
}
.logo:hover { transform: translateY(-1px); }
.logo-mark {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: var(--grad-primary);
    color: #fff;
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
    box-shadow: var(--sh-blue);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.logo-mark::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shine 3.5s ease-in-out infinite;
}
@keyframes shine { to { transform: translateX(100%); } }
.logo-name {
    font-weight: 800; font-size: 1.2rem;
    letter-spacing: -0.03em;
    white-space: nowrap;
}
.logo-name span {
    background: var(--grad-primary);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Nav menu */
.nav-menu {
    display: flex; gap: 32px; align-items: center;
    flex: 1;
    justify-content: center;
}
.nav-menu a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 600;
    position: relative;
    padding: 4px 0;
    transition: color var(--ease) 0.25s;
    white-space: nowrap;
}
.nav-menu a::after {
    content: ''; position: absolute;
    bottom: -3px; left: 50%;
    width: 0; height: 2px;
    background: var(--grad-primary);
    border-radius: 2px;
    transition: all var(--ease) 0.3s;
    transform: translateX(-50%);
}
.nav-menu a:hover { color: var(--blue-600); }
.nav-menu a:hover::after { width: 100%; }

/* Nav actions */
.nav-actions {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
}
.theme-toggle {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.25s ease;
}
.theme-toggle:hover {
    background: var(--blue-50);
    border-color: var(--blue-400);
    transform: translateY(-1px);
}

/* Mobile hamburger */
.mobile-toggle {
    display: none;
    width: 42px; height: 42px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
}
.mobile-toggle:hover { border-color: var(--blue-400); background: var(--blue-50); }
.mobile-toggle span {
    display: block; height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: left center;
}
.mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translateY(-2px); }
.mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translateY(2px); }

/* ================================================================
   HERO
   ================================================================ */
.hero {
    padding: 72px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
    margin-bottom: 56px;
}
.hero-content { max-width: 620px; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border: 1px solid var(--blue-200);
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--blue-700);
    box-shadow: 0 4px 14px rgba(37,99,235,0.10);
    letter-spacing: 0.01em;
}
.pill-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(37,99,235,0.25); }
    50%      { box-shadow: 0 0 0 6px rgba(37,99,235,0.05); }
}

.hero-title {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.045em;
    margin-bottom: 22px;
    color: var(--text);
}
.grad-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    background-size: 200% 200%;
    animation: gradShift 6s ease infinite;
}
@keyframes gradShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.18rem);
    color: var(--text-soft);
    margin-bottom: 32px;
    line-height: 1.7;
    max-width: 540px;
}
.hero-sub strong { color: var(--blue-700); font-weight: 800; }

/* CTA buttons */
.hero-cta {
    display: flex;
    gap: 14px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: var(--r-md);
    font-weight: 800;
    font-size: 0.98rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--ease) 0.28s;
    font-family: inherit;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

.btn-primary {
    background: var(--grad-btn);
    background-size: 200% 200%;
    color: #fff;
    box-shadow: var(--sh-blue);
}
.btn-primary::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.8s var(--ease);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(37,99,235,0.42);
    background-position: 100% 50%;
}
.btn-primary:hover::after { transform: translateX(100%); }

.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--blue-400);
    background: var(--blue-50);
    color: var(--blue-700);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37,99,235,0.15);
}

.btn-light {
    background: #fff;
    color: var(--blue-700);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.20);
}

/* Trust bullets */
.hero-trust {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}
.hero-trust li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-soft);
}
.hero-trust .check {
    display: inline-grid;
    place-items: center;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--blue-100);
    color: var(--blue-700);
    font-weight: 900;
    font-size: 0.72rem;
    flex-shrink: 0;
}

/* Hero visual — floating cards */
.hero-visual {
    position: relative;
    height: 420px;
}
.visual-stack {
    position: relative;
    width: 100%;
    height: 100%;
}
.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    animation: floatCard 6s ease-in-out infinite;
    width: 240px;
}
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
.float-card-1 { top: 6%;  left: 0;   animation-delay: 0s;   }
.float-card-2 { top: 32%; right: 0;  animation-delay: 1.5s; }
.float-card-3 { bottom: 22%; left: 6%; animation-delay: 3s; }
.float-card-4 { bottom: 0;   right: 8%; animation-delay: 4.5s; }

.fc-icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: var(--grad-soft);
    border: 1px solid var(--blue-200);
    font-size: 1.4rem;
    flex-shrink: 0;
}
.fc-title { font-weight: 800; font-size: 1rem; color: var(--text); letter-spacing: -0.015em; }
.fc-sub { font-size: 0.8rem; color: var(--text-dim); font-weight: 600; margin-top: 2px; }

/* Trust bar */
.trust-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 26px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-md);
}
.trust-item { text-align: center; }
.ti-num {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
    line-height: 1;
}
.ti-num span { font-size: 0.65em; }
.ti-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ================================================================
   SECTIONS
   ================================================================ */
.section { padding: 88px 0; }
.tools-section { padding: 40px 0 88px; }

.section-head {
    text-align: center;
    margin-bottom: 52px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.section-tag {
    display: inline-block;
    padding: 6px 14px;
    margin-bottom: 14px;
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--blue-700);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.section-head h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.15;
}
.section-head p {
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 1.65;
}

/* ================================================================
   TOOLS GRID
   ================================================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}
.tool-card {
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg);
    text-decoration: none;
    color: var(--text);
    transition: all var(--ease) 0.3s;
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad-primary);
    opacity: 0;
    transition: opacity var(--ease) 0.3s;
}
.tool-card:hover {
    transform: translateY(-6px);
    border-color: var(--blue-400);
    box-shadow: var(--sh-lg);
}
.tool-card:hover::before { opacity: 1; }

.tool-icon {
    width: 60px; height: 60px;
    display: grid; place-items: center;
    font-size: 1.75rem;
    margin-bottom: 18px;
    border-radius: 18px;
    background: var(--grad-soft);
    border: 1px solid var(--blue-200);
    transition: transform var(--ease-bounce) 0.4s;
    flex-shrink: 0;
}
.tool-card:hover .tool-icon { transform: scale(1.1) rotate(-6deg); }

.tool-card.blue .tool-icon { background: linear-gradient(135deg, #dbeafe, #e0f2fe); border-color: var(--blue-300); }
.tool-card.cyan .tool-icon { background: linear-gradient(135deg, #cffafe, #e0f2fe); border-color: var(--cyan-300); }

.tool-name {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text);
}
.tool-desc {
    font-size: 0.88rem;
    color: var(--text-soft);
    line-height: 1.55;
    margin-bottom: 16px;
    flex: 1;
}
.tool-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--blue-600);
    margin-top: auto;
    transition: gap var(--ease) 0.25s;
}
.tool-card:hover .tool-arrow { gap: 12px; }
.tool-arrow .arrow { transition: transform var(--ease) 0.25s; }
.tool-card:hover .tool-arrow .arrow { transform: translateX(4px); }

/* ================================================================
   FEATURES
   ================================================================ */
.section-features {
    background: linear-gradient(180deg, transparent 0%, rgba(219,234,254,0.35) 50%, transparent 100%);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}
.feat {
    padding: 32px 28px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: all var(--ease) 0.35s;
    position: relative;
    overflow: hidden;
}
.feat::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 3px;
    background: var(--grad-primary);
    transition: width var(--ease) 0.35s;
}
.feat:hover {
    transform: translateY(-8px);
    border-color: var(--blue-300);
    box-shadow: var(--sh-lg);
}
.feat:hover::after { width: 100%; }
.feat-ico {
    width: 60px; height: 60px;
    display: grid; place-items: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-radius: 18px;
    background: var(--grad-soft);
    border: 1px solid var(--blue-200);
    transition: transform var(--ease-bounce) 0.4s;
}
.feat:hover .feat-ico { transform: scale(1.1) rotate(-8deg); }
.feat h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.feat p {
    color: var(--text-soft);
    font-size: 0.94rem;
    line-height: 1.65;
}

/* ================================================================
   HOW IT WORKS
   ================================================================ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    list-style: none;
    padding: 0;
    counter-reset: steps;
}
.step-card {
    padding: 36px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    text-align: center;
    transition: all var(--ease) 0.3s;
    position: relative;
}
.step-card:hover {
    transform: translateY(-6px);
    border-color: var(--blue-300);
    box-shadow: var(--sh-lg);
}
.step-num {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: var(--grad-primary);
    color: #fff;
    font-size: 1.65rem;
    font-weight: 900;
    box-shadow: var(--sh-blue);
}
.step-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.step-card p {
    color: var(--text-soft);
    font-size: 0.94rem;
    line-height: 1.65;
}

/* ================================================================
   FAQ
   ================================================================ */
.section-faq {
    background: linear-gradient(180deg, rgba(219,234,254,0.25) 0%, transparent 100%);
}
.faq-list {
    display: grid;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}
.faq-list details {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: 22px 26px;
    transition: all var(--ease) 0.28s;
}
.faq-list details[open] {
    border-color: var(--blue-400);
    box-shadow: 0 10px 32px rgba(37,99,235,0.12);
}
.faq-list summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--text);
    letter-spacing: -0.01em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
    content: '+';
    font-size: 1.6rem;
    color: var(--blue-500);
    transition: transform var(--ease) 0.3s;
    flex-shrink: 0;
    line-height: 1;
    font-weight: 400;
}
.faq-list details[open] summary::after { content: '−'; transform: rotate(180deg); }
.faq-list p {
    color: var(--text-soft);
    font-size: 0.95rem;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
    line-height: 1.7;
}

/* ================================================================
   CTA BANNER
   ================================================================ */
.cta-banner { padding: 40px 0 88px; }
.cta-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding: 48px 56px;
    background: var(--grad-primary);
    background-size: 200% 200%;
    animation: gradShift 8s ease infinite;
    border-radius: var(--r-2xl);
    box-shadow: var(--sh-xl);
    color: #fff;
    flex-wrap: wrap;
}
.cta-left h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    color: #fff;
}
.cta-left p {
    color: rgba(255,255,255,0.88);
    font-size: 1.02rem;
    max-width: 520px;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    padding: 72px 0 0;
    background: linear-gradient(180deg, transparent 0%, rgba(219,234,254,0.5) 100%);
    border-top: 1px solid var(--border-soft);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 44px;
    padding-bottom: 52px;
}
.footer-brand { max-width: 360px; }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.footer-logo .logo-mark {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 13px;
    background: var(--grad-primary);
    color: #fff;
    font-weight: 900;
    font-size: 0.95rem;
    box-shadow: var(--sh-blue);
}
.footer-logo .logo-name {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}
.footer-logo .logo-name span {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.footer-tagline {
    color: var(--text-soft);
    font-size: 0.93rem;
    line-height: 1.7;
    margin-bottom: 22px;
}
.footer-social {
    display: flex;
    gap: 10px;
}
.footer-social a {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.25s ease;
}
.footer-social a:hover {
    background: var(--grad-primary);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--sh-blue);
    filter: brightness(10) saturate(0);
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 11px; }
.footer-col a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}
.footer-col a:hover { color: var(--blue-600); padding-left: 6px; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 26px 0;
    border-top: 1px solid var(--border-soft);
}
.footer-copy {
    color: var(--text-dim);
    font-size: 0.87rem;
}
.footer-copy strong {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}
.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.87rem;
}
.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--blue-600); }
.footer-links .dot { color: var(--text-dim); opacity: 0.5; }

/* ================================================================
   DARK MODE
   ================================================================ */
[data-theme="dark"] {
    --bg:          #0a0e1a;
    --surface:     #0f1628;
    --surface-2:   #141c33;
    --border:      #1e2a47;
    --border-soft: #182340;
    --text:        #e6edf7;
    --text-soft:   #94a3b8;
    --text-dim:    #64748b;
    --blue-50:     #1e2a47;
    --blue-100:    #243456;
    --blue-200:    #2d4270;
    --blue-300:    #3b5998;
    --blue-400:    #4a72c4;
    --blue-500:    #5b8dd9;
    --blue-600:    #4a7cd1;
    --blue-700:    #6b9be0;
    --grad-soft:   linear-gradient(135deg, #1e2a47 0%, #243456 100%);
    --grad-btn:    linear-gradient(135deg, #4a7cd1 0%, #4dc4e0 100%);
    --grad-primary: linear-gradient(135deg, #5b8dd9 0%, #4dc4e0 100%);
    --sh-sm: 0 2px 8px rgba(0,0,0,0.4);
    --sh-md: 0 8px 24px rgba(0,0,0,0.5);
    --sh-lg: 0 18px 48px rgba(0,0,0,0.6);
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .card,
[data-theme="dark"] .tool-card,
[data-theme="dark"] .feat,
[data-theme="dark"] .step-card,
[data-theme="dark"] .faq-list details,
[data-theme="dark"] .trust-bar,
[data-theme="dark"] .float-card {
    background: rgba(15,22,40,0.85);
    border-color: var(--border);
}
[data-theme="dark"] .aurora::before,
[data-theme="dark"] .aurora::after { opacity: 0.4; }
[data-theme="dark"] .grid-pattern { opacity: 0.35; }
[data-theme="dark"] .section-features {
    background: linear-gradient(180deg, transparent 0%, rgba(30,42,71,0.4) 50%, transparent 100%);
}
[data-theme="dark"] .section-faq {
    background: linear-gradient(180deg, rgba(30,42,71,0.3) 0%, transparent 100%);
}
[data-theme="dark"] .footer {
    background: linear-gradient(180deg, transparent 0%, rgba(15,22,40,0.9) 100%);
}

/* ================================================================
   RESPONSIVE — TABLET
   ================================================================ */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { height: 340px; max-width: 560px; margin: 0 auto; width: 100%; }
    .float-card { width: 220px; }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; max-width: 100%; }
}

/* ================================================================
   RESPONSIVE — MOBILE
   ================================================================ */
@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 14px 20px;
        gap: 4px;
        display: none;
        box-shadow: var(--sh-lg);
        z-index: 99;
    }
    .nav-menu.open {
        display: flex;
        animation: slideDown 0.25s ease;
    }
    .nav-menu a {
        padding: 12px 6px;
        font-size: 0.96rem;
        border-radius: 8px;
        width: 100%;
    }
    .nav-menu a:hover { background: var(--blue-50); }
    .nav-menu a::after { display: none; }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .mobile-toggle { display: flex; }

    .container { padding: 0 20px; }

    .hero { padding: 48px 0 40px; }
    .hero-grid { gap: 32px; margin-bottom: 40px; }
    .hero-cta { gap: 10px; }
    .btn-lg { padding: 15px 24px; font-size: 1rem; }
    .hero-visual { height: 280px; }
    .float-card { width: 200px; padding: 14px 16px; }
    .fc-icon { width: 42px; height: 42px; font-size: 1.25rem; border-radius: 12px; }
    .fc-title { font-size: 0.92rem; }
    .fc-sub { font-size: 0.75rem; }

    .trust-bar {
        grid-template-columns: 1fr 1fr;
        padding: 22px;
        gap: 12px;
    }
    .ti-num { font-size: 1.5rem; }
    .ti-label { font-size: 0.72rem; }

    .section { padding: 64px 0; }
    .tools-section { padding: 28px 0 64px; }
    .section-head { margin-bottom: 38px; }

    .tools-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
    .tool-card { padding: 22px 18px; }
    .tool-icon { width: 50px; height: 50px; font-size: 1.5rem; margin-bottom: 14px; border-radius: 14px; }
    .tool-name { font-size: 1rem; }
    .tool-desc { font-size: 0.83rem; margin-bottom: 12px; }
    .tool-arrow { font-size: 0.8rem; }

    .features-grid, .steps-grid { gap: 16px; }
    .feat, .step-card { padding: 26px 22px; }
    .feat-ico { width: 52px; height: 52px; font-size: 1.55rem; margin-bottom: 16px; border-radius: 15px; }
    .step-num { width: 54px; height: 54px; font-size: 1.4rem; border-radius: 16px; margin-bottom: 16px; }

    .faq-list details { padding: 18px 20px; }
    .faq-list summary { font-size: 0.95rem; }

    .cta-card { padding: 32px 28px; border-radius: 24px; text-align: center; justify-content: center; }
    .cta-card .btn { width: 100%; }
    .cta-banner { padding: 24px 0 64px; }

    .footer { padding: 56px 0 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; padding-bottom: 40px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 12px; padding: 22px 0; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* ================================================================
   RESPONSIVE — SMALL PHONE
   ================================================================ */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .nav-inner { padding: 12px 16px; }
    .logo-mark { width: 40px; height: 40px; font-size: 0.85rem; }
    .logo-name { font-size: 1.05rem; }

    .hero { padding: 36px 0 32px; }
    .pill { font-size: 0.76rem; padding: 7px 14px; }
    .hero-title { font-size: 2rem; }
    .hero-sub { font-size: 0.95rem; margin-bottom: 24px; }
    .hero-cta { flex-direction: column; }
    .btn { width: 100%; }
    .hero-trust { gap: 12px; }
    .hero-trust li { font-size: 0.82rem; }

    .hero-visual { height: 240px; }
    .float-card { width: 180px; padding: 12px 14px; gap: 10px; }
    .fc-icon { width: 38px; height: 38px; font-size: 1.1rem; }
    .fc-title { font-size: 0.88rem; }
    .fc-sub { font-size: 0.72rem; }

    .trust-bar { padding: 18px 14px; }
    .ti-num { font-size: 1.3rem; }
    .ti-label { font-size: 0.68rem; letter-spacing: 0.04em; }

    .section { padding: 52px 0; }
    .section-tag { font-size: 0.7rem; }
    .section-head h2 { font-size: 1.6rem; }
    .section-head p { font-size: 0.94rem; }

    .tools-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tool-card { padding: 18px 14px; }
    .tool-icon { width: 44px; height: 44px; font-size: 1.3rem; margin-bottom: 12px; border-radius: 12px; }
    .tool-name { font-size: 0.92rem; }
    .tool-desc { font-size: 0.78rem; }
    .tool-arrow { font-size: 0.76rem; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
    .footer-logo, .footer-social { justify-content: center; }
    .footer-col a:hover { padding-left: 0; }

    .cta-card { padding: 28px 22px; }
    .cta-left h2 { font-size: 1.4rem; }
    .cta-left p { font-size: 0.92rem; }
}

/* ================================================================
   ACCESSIBILITY & UTILITIES
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
:focus-visible {
    outline: 3px solid var(--blue-400);
    outline-offset: 3px;
    border-radius: 6px;
}
::selection {
    background: var(--blue-200);
    color: var(--blue-900);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--blue-50); }
::-webkit-scrollbar-thumb { background: var(--blue-300); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-500); }

/* ================================================================
   KEEP EXISTING TOOL-PAGE STYLES (used by tool.php)
   ================================================================ */

/* Cards */
.card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(219,234,254,0.9);
    border-radius: var(--r-xl);
    padding: 32px;
    box-shadow: 0 24px 56px -12px rgba(30,58,138,0.14);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    animation: cardIn 0.55s var(--ease-bounce);
}
.card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-primary);
    background-size: 200% 100%;
    animation: gradShift 4s ease infinite;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-home { padding: 60px 0 60px; }

/* Dropzone */
.dropzone {
    position: relative;
    border: 2px dashed var(--blue-300);
    border-radius: var(--r-lg);
    padding: 52px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--ease) 0.3s;
    background:
        radial-gradient(circle at 50% 0%, rgba(37,99,235,0.06), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
    margin-bottom: 24px;
}
.dropzone:hover, .dropzone.drag {
    border-color: var(--blue-500);
    transform: translateY(-3px);
    box-shadow: var(--sh-blue);
}
.dz-icon {
    width: 76px; height: 76px;
    margin: 0 auto 18px;
    display: grid; place-items: center;
    border-radius: 22px;
    background: var(--grad-primary);
    color: #fff;
    box-shadow: var(--sh-blue);
    transition: transform var(--ease-bounce) 0.4s;
}
.dropzone:hover .dz-icon { transform: scale(1.08) rotate(-4deg); }
.dz-icon svg { width: 34px; height: 34px; }
.dropzone h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; }
.dropzone p { color: var(--text-soft); font-size: 0.94rem; }
.dropzone .browse {
    color: var(--blue-600); font-weight: 800;
    text-decoration: underline; text-underline-offset: 3px;
}
.formats { margin-top: 16px; font-size: 0.8rem; color: var(--text-dim); }
.formats span { opacity: 0.6; }

/* Tool page header */
.tool-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--border-soft);
}
.tool-header-icon {
    width: 76px; height: 76px;
    display: grid; place-items: center;
    font-size: 2.1rem;
    border-radius: 22px;
    background: var(--grad-soft);
    border: 1px solid var(--blue-200);
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(37,99,235,0.12);
}
.tool-header-text h1 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}
.tool-header-text p { color: var(--text-soft); font-size: 0.95rem; }

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    transition: color var(--ease) 0.2s, gap var(--ease) 0.2s;
}
.back-link:hover { color: var(--blue-600); gap: 12px; }

/* Preview grid */
.preview-card { padding: 22px; margin-bottom: 22px; }
.preview-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: stretch;
}
.preview-box {
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    background: #fff;
    overflow: hidden;
    transition: all var(--ease) 0.3s;
}
.preview-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    background: linear-gradient(180deg, #f0f7ff 0%, #dbeafe 100%);
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.preview-label .p-size {
    font-size: 0.85rem;
    letter-spacing: 0;
    text-transform: none;
    background: var(--grad-primary);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.preview-img-wrap {
    aspect-ratio: 4 / 3;
    background: #f6faff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.preview-img-wrap img {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
}
.preview-img-wrap .placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; height: 100%;
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
}
.preview-arrow {
    display: grid; place-items: center;
    font-size: 1.8rem;
    color: var(--blue-500);
    font-weight: 800;
    align-self: center;
}

/* Controls */
.controls {
    padding: 26px;
    margin-bottom: 26px;
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
}
.control-block { margin-bottom: 24px; }
.control-block:last-child { margin-bottom: 0; }
.ctrl-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}
.ctrl-row label {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ctrl-val {
    background: var(--grad-primary);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

/* Size mode cards */
.size-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}
.size-mode {
    position: relative;
    padding: 20px 20px 20px 66px;
    border: 2px solid var(--border);
    background: #ffffff;
    border-radius: var(--r-md);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all var(--ease) 0.3s;
    color: var(--text-soft);
}
.size-mode::before {
    content: ''; position: absolute;
    left: 20px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    transition: all var(--ease) 0.3s;
}
.size-mode::after {
    content: ''; position: absolute;
    left: 27px; top: 50%;
    transform: translateY(-50%) scale(0);
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--grad-primary);
    transition: transform var(--ease-bounce) 0.35s;
}
.size-mode:hover {
    border-color: var(--blue-300);
    transform: translateY(-2px);
    box-shadow: var(--sh-sm);
}
.size-mode.active {
    border-color: var(--blue-500);
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    color: var(--text);
    box-shadow: var(--sh-blue);
    transform: translateY(-2px);
}
.size-mode.active::before { border-color: var(--blue-500); }
.size-mode.active::after { transform: translateY(-50%) scale(1); }
.size-mode-title {
    display: block;
    font-weight: 800;
    font-size: 0.98rem;
    margin-bottom: 3px;
    color: var(--text);
}
.size-mode-desc { display: block; font-size: 0.8rem; color: var(--text-dim); font-weight: 500; }
.size-mode.active .size-mode-desc { color: var(--text-soft); }

/* Range slider */
input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--blue-200) 0%, var(--cyan-300) 100%);
    outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--blue-500);
    cursor: grab;
    box-shadow: 0 6px 16px rgba(37,99,235,0.35);
    transition: transform var(--ease) 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--blue-500);
    cursor: grab;
}
.hint {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 600;
}

/* Inputs */
.text-input, .number-input {
    width: 100%;
    padding: 15px 18px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    outline: none;
    transition: all var(--ease) 0.25s;
    font-variant-numeric: tabular-nums;
}
.text-input:focus, .number-input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 5px rgba(37,99,235,0.12);
}
.input-row { display: flex; gap: 12px; align-items: stretch; }
.input-row .kb-unit {
    display: grid; place-items: center;
    padding: 0 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border: 2px solid var(--blue-200);
    border-radius: var(--r-md);
    font-weight: 800;
    color: var(--blue-700);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}
.kb-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.kb-chip {
    padding: 9px 16px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--text-soft);
    cursor: pointer;
    font-family: inherit;
    transition: all var(--ease) 0.22s;
}
.kb-chip:hover {
    background: var(--blue-50);
    border-color: var(--blue-400);
    color: var(--blue-700);
    transform: translateY(-2px);
}
.kb-chip.active {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--sh-blue);
    transform: translateY(-2px);
}

/* Select */
.select-group { margin-top: 18px; }
.select-group label {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 10px;
}
.styled-select {
    width: 100%;
    padding: 15px 46px 15px 18px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-size: 0.98rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: all var(--ease) 0.25s;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 18px center;
}
.styled-select:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 5px rgba(37,99,235,0.12);
}

/* Buttons (tool pages) */
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }

/* File pill */
.file-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    gap: 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border: 1px solid var(--blue-200);
    border-radius: var(--r-md);
    margin-bottom: 26px;
}
.fp-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.fp-thumb {
    width: 56px; height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    box-shadow: var(--sh-sm);
    display: grid; place-items: center;
    font-size: 1.5rem;
}
.fp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fp-meta { min-width: 0; flex: 1; }
.fp-name {
    font-weight: 700;
    font-size: 0.96rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fp-size { color: var(--text-soft); font-size: 0.83rem; font-weight: 600; margin-top: 2px; }
.fp-remove {
    background: #fee2e2; color: var(--danger);
    border: none;
    width: 40px; height: 40px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 800;
    transition: all var(--ease) 0.25s;
    flex-shrink: 0;
    display: grid; place-items: center;
}
.fp-remove:hover { background: var(--danger); color: #fff; transform: rotate(90deg); }

/* Result */
.result { text-align: center; }
.res-emoji { font-size: 3.6rem; margin-bottom: 14px; display: inline-block; animation: pop 0.6s var(--ease-bounce); }
@keyframes pop {
    0% { transform: scale(0) rotate(-30deg); }
    70% { transform: scale(1.25) rotate(8deg); }
    100% { transform: scale(1) rotate(0); }
}
.result h3 { font-size: 1.45rem; margin-bottom: 10px; font-weight: 800; }
.res-file {
    color: var(--text-soft);
    font-size: 0.88rem;
    word-break: break-all;
    margin-bottom: 26px;
    padding: 12px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-sm);
    display: inline-block;
    max-width: 100%;
    font-weight: 600;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.stat {
    padding: 20px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-md);
    transition: transform var(--ease) 0.25s;
}
.stat:hover { transform: translateY(-3px); }
.stat.good { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); border-color: #6ee7b7; }
.stat.warn { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border-color: #fcd34d; }
.stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-weight: 800;
}
.stat-val {
    display: block;
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.stat.good .stat-val { color: #047857; }
.stat.warn .stat-val { color: #b45309; }
.actions { display: grid; gap: 12px; }

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border: none;
    box-shadow: 0 8px 22px rgba(239,68,68,0.3);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(239,68,68,0.45); }

/* Error */
.error-box { text-align: center; }
.error-box::before { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }
.error-box .res-emoji { animation: shake 0.55s; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-12px); }
    40% { transform: translateX(12px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}
.error-box h3 { color: var(--danger); }
.error-box p { color: var(--text-soft); margin-bottom: 24px; }

/* Loader ring */
.spinner {
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sk-spinner-ring {
    width: 44px; height: 44px;
    border: 4px solid rgba(37,99,235,0.18);
    border-top-color: var(--blue-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Progress bar (PDF.js) */
.pdfjs-bar {
    height: 10px;
    border-radius: 5px;
    background: var(--blue-100);
    overflow: hidden;
    margin-top: 4px;
}
.pdfjs-bar-fill {
    height: 100%; width: 0%;
    background: var(--grad-primary);
    border-radius: 5px;
    transition: width 0.25s ease;
}

/* Tool page wrap */
.wrap-narrow { max-width: 900px; margin: 0 auto; }

/* Small-screen tool tweaks */
@media (max-width: 640px) {
    .card { padding: 22px; border-radius: 22px; }
    .tool-header-icon { width: 60px; height: 60px; font-size: 1.7rem; border-radius: 18px; }
    .dropzone { padding: 40px 18px; }
    .dz-icon { width: 62px; height: 62px; }
    .dz-icon svg { width: 28px; height: 28px; }
    .size-modes { grid-template-columns: 1fr; }
    .size-mode { padding: 18px 18px 18px 62px; }
    .stats { grid-template-columns: 1fr; }
    .preview-grid { grid-template-columns: 1fr; }
    .preview-arrow { transform: rotate(90deg); }
    .hero-home { padding: 40px 0 40px; }
}




/* ================================================================
   TOOL PAGE — Premium Tool Layout, Breadcrumbs, Related Section
   Works in light + dark mode
   ================================================================ */

/* ---------- Tool page container ---------- */
.tool-page {
    padding: 40px 0 80px;
    position: relative;
}
.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.86rem;
    color: var(--text-dim);
    margin-bottom: 22px;
    padding: 0 4px;
}
.breadcrumb a {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.breadcrumb a:hover { color: var(--blue-600); }
.bc-sep {
    color: var(--text-dim);
    opacity: 0.6;
    font-size: 1rem;
}
.bc-current {
    color: var(--text);
    font-weight: 700;
}

/* ---------- Button block variant ---------- */
.btn-block { width: 100%; }

/* ---------- 3-column size modes (split tool) ---------- */
.size-modes-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ================================================================
   RELATED TOOLS SECTION
   ================================================================ */
.related-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-soft);
}
.related-title {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
    text-align: center;
    color: var(--text);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.related-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text);
    transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
}
.related-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--grad-primary);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}
.related-card:hover {
    transform: translateY(-3px);
    border-color: var(--blue-400);
    box-shadow: var(--sh-md);
}
.related-card:hover::before { transform: scaleY(1); }

.related-icon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 13px;
    background: var(--grad-soft);
    border: 1px solid var(--blue-200);
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.related-card:hover .related-icon { transform: scale(1.08) rotate(-6deg); }
.related-card.blue .related-icon { background: linear-gradient(135deg,#dbeafe,#e0f2fe); border-color: var(--blue-300); }
.related-card.cyan .related-icon { background: linear-gradient(135deg,#cffafe,#e0f2fe); border-color: var(--cyan-300); }

.related-info { min-width: 0; flex: 1; }
.related-name {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.015em;
    color: var(--text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.related-desc {
    font-size: 0.78rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================================
   DARK MODE — tool-page specific overrides
   ================================================================ */
[data-theme="dark"] .related-card {
    background: rgba(15,22,40,0.85);
    border-color: #1e2a47;
}
[data-theme="dark"] .related-card:hover {
    border-color: var(--blue-400);
}
[data-theme="dark"] .related-icon {
    background: linear-gradient(135deg, #1e2a47 0%, #243456 100%);
    border-color: #2d4270;
}

[data-theme="dark"] .breadcrumb a:hover { color: var(--blue-400); }

/* ---------- Dark mode: dropzone ---------- */
[data-theme="dark"] .dropzone {
    background:
        radial-gradient(circle at 50% 0%, rgba(91,141,217,0.12), transparent 60%),
        linear-gradient(180deg, #0f1628 0%, #141c33 100%);
    border-color: #2d4270;
}
[data-theme="dark"] .dropzone:hover,
[data-theme="dark"] .dropzone.drag {
    border-color: var(--blue-400);
    background:
        radial-gradient(circle at 50% 0%, rgba(91,141,217,0.20), transparent 60%),
        linear-gradient(180deg, #0f1628 0%, #1a2947 100%);
}

/* ---------- Dark mode: controls panel ---------- */
[data-theme="dark"] .controls {
    background: linear-gradient(180deg, #0f1628 0%, #141c33 100%);
    border-color: #182340;
}

/* ---------- Dark mode: size modes ---------- */
[data-theme="dark"] .size-mode {
    background: #141c33;
    border-color: #1e2a47;
    color: var(--text-soft);
}
[data-theme="dark"] .size-mode::before {
    background: #0f1628;
    border-color: #2d4270;
}
[data-theme="dark"] .size-mode.active {
    background: linear-gradient(135deg, #1e2a47 0%, #243456 100%);
    border-color: var(--blue-400);
}
[data-theme="dark"] .size-mode.active::before { border-color: var(--blue-400); }
[data-theme="dark"] .size-mode-title { color: var(--text); }
[data-theme="dark"] .size-mode-desc { color: var(--text-dim); }
[data-theme="dark"] .size-mode.active .size-mode-desc { color: var(--text-soft); }

/* ---------- Dark mode: inputs ---------- */
[data-theme="dark"] .text-input,
[data-theme="dark"] .number-input {
    background: #141c33;
    border-color: #1e2a47;
    color: var(--text);
}
[data-theme="dark"] .text-input:focus,
[data-theme="dark"] .number-input:focus {
    border-color: var(--blue-400);
    box-shadow: 0 0 0 5px rgba(91,141,217,0.20);
}
[data-theme="dark"] .input-row .kb-unit {
    background: linear-gradient(135deg, #1e2a47 0%, #243456 100%);
    border-color: #2d4270;
    color: var(--blue-300);
}
[data-theme="dark"] .kb-chip {
    background: #141c33;
    border-color: #1e2a47;
    color: var(--text-soft);
}
[data-theme="dark"] .kb-chip:hover {
    background: #1e2a47;
    border-color: var(--blue-400);
    color: var(--blue-300);
}
[data-theme="dark"] .kb-chip.active {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
}

/* ---------- Dark mode: select ---------- */
[data-theme="dark"] .styled-select {
    background-color: #141c33;
    border-color: #1e2a47;
    color: var(--text);
}

/* ---------- Dark mode: preview box ---------- */
[data-theme="dark"] .preview-box {
    background: #0f1628;
    border-color: #1e2a47;
}
[data-theme="dark"] .preview-label {
    background: linear-gradient(180deg, #141c33 0%, #1e2a47 100%);
    border-bottom-color: #182340;
    color: var(--text-soft);
}
[data-theme="dark"] .preview-img-wrap {
    background: #0a0e1a;
}

/* ---------- Dark mode: file pill ---------- */
[data-theme="dark"] .file-pill {
    background: linear-gradient(135deg, #1e2a47 0%, #243456 100%);
    border-color: #2d4270;
}
[data-theme="dark"] .fp-thumb { background: #0f1628; }

/* ---------- Dark mode: stats ---------- */
[data-theme="dark"] .stat {
    background: #141c33;
    border-color: #182340;
}
[data-theme="dark"] .stat.good {
    background: linear-gradient(135deg, #1a3d2e 0%, #14532d 100%);
    border-color: #2d7a4f;
}
[data-theme="dark"] .stat.warn {
    background: linear-gradient(135deg, #3d2e1a 0%, #533f14 100%);
    border-color: #7a6f2d;
}
[data-theme="dark"] .stat.good .stat-val { color: #6ee7b7; }
[data-theme="dark"] .stat.warn .stat-val { color: #fcd34d; }
[data-theme="dark"] .res-file {
    background: #141c33;
    border-color: #182340;
    color: var(--text-soft);
}

/* ---------- Dark mode: buttons ---------- */
[data-theme="dark"] .btn-ghost {
    background: #141c33;
    color: var(--text);
    border-color: #1e2a47;
}
[data-theme="dark"] .btn-ghost:hover {
    background: #1e2a47;
    border-color: var(--blue-400);
    color: var(--blue-300);
}

/* ---------- Dark mode: progress bar ---------- */
[data-theme="dark"] .pdfjs-bar {
    background: #1e2a47;
}

/* ---------- Dark mode: breadcrumb ---------- */
[data-theme="dark"] .breadcrumb a { color: var(--text-soft); }
[data-theme="dark"] .bc-current { color: var(--text); }
[data-theme="dark"] .breadcrumb a:hover { color: var(--blue-400); }

/* ================================================================
   RESPONSIVE — TOOL PAGE
   ================================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .container-narrow { max-width: 100%; }
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .tool-page { padding: 24px 0 60px; }
    .container-narrow { padding: 0 20px; }

    .breadcrumb { font-size: 0.8rem; gap: 7px; margin-bottom: 18px; }

    .related-section { margin-top: 32px; padding-top: 32px; }
    .related-title { font-size: 1.15rem; margin-bottom: 16px; }
    .related-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .related-card { padding: 14px; gap: 10px; }
    .related-icon {
        width: 40px; height: 40px;
        font-size: 1.15rem;
        border-radius: 11px;
    }
    .related-name { font-size: 0.88rem; }
    .related-desc { font-size: 0.72rem; }
}

/* Small phone */
@media (max-width: 480px) {
    .container-narrow { padding: 0 16px; }

    .related-grid { grid-template-columns: 1fr; }
    .related-card { padding: 12px 14px; }
    .related-icon { width: 38px; height: 38px; font-size: 1.1rem; }

    /* Split mode: stack the 3 options */
    .size-modes-3 { grid-template-columns: 1fr; }
}

/* ---------- Light mode: ensure text on preview label is readable ---------- */
.preview-label { color: var(--text-soft); }
.preview-label .p-size { font-weight: 800; }

/* ---------- Light mode: card surface polish ---------- */
.tool-page .card {
    margin-bottom: 20px;
}


/* ================================================================
   DARK MODE FIX — .pill and .cta-banner
   ================================================================ */

/* ---------- PILL (hero badge) ---------- */
/* Light mode (default) — already defined above */
[data-theme="dark"] .pill {
    background: linear-gradient(135deg, #1e2a47 0%, #243456 100%);
    border-color: #2d4270;
    color: var(--blue-300);
    box-shadow: 0 4px 14px rgba(91, 141, 217, 0.18);
}
[data-theme="dark"] .pill-dot {
    background: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(91, 141, 217, 0.25);
}
@keyframes pulse-dark {
    0%, 100% { box-shadow: 0 0 0 3px rgba(91,141,217,0.30); }
    50%      { box-shadow: 0 0 0 6px rgba(91,141,217,0.05); }
}
[data-theme="dark"] .pill-dot { animation-name: pulse-dark; }

/* ---------- CTA BANNER ---------- */
[data-theme="dark"] .cta-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 40%, #0891b2 100%);
    background-size: 200% 200%;
    box-shadow: 0 28px 72px rgba(30, 58, 138, 0.5);
}
[data-theme="dark"] .cta-left h2 {
    color: #ffffff;
}
[data-theme="dark"] .cta-left p {
    color: rgba(255, 255, 255, 0.85);
}
[data-theme="dark"] .cta-card .btn-light {
    background: rgba(255, 255, 255, 0.95);
    color: var(--blue-700);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .cta-card .btn-light:hover {
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}


/* ================================================================
   ENHANCED CONVERT DROPDOWN
   ================================================================ */
.styled-select optgroup {
    font-weight: 800;
    color: var(--blue-700);
    background: var(--blue-50);
    padding: 8px 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.styled-select option {
    padding: 10px 12px;
    font-weight: 500;
    color: var(--text);
    background: var(--surface);
}

.styled-select option:hover,
.styled-select option:checked {
    background: var(--blue-100);
    color: var(--blue-900);
}

[data-theme="dark"] .styled-select optgroup {
    background: #1e2a47;
    color: var(--blue-300);
}

[data-theme="dark"] .styled-select option {
    background: #0f1628;
    color: var(--text);
}

[data-theme="dark"] .styled-select option:checked {
    background: #2d4270;
    color: #fff;
}

/* Convert quality box spacing */
#convertQualityBox {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
}