* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--primary-color);
}

/* Convert dropdown nav */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.nav-dropdown .caret {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.75rem;
    display: none;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 1.25rem;
    background: var(--bg-white);
    box-shadow: var(--shadow-md, 0 10px 30px rgba(0, 0, 0, 0.12));
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: grid;
}

.nav-dropdown:hover .caret {
    transform: rotate(180deg);
}

.nav-dropdown-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-dropdown-head {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.nav-dropdown-menu a {
    white-space: nowrap;
    font-weight: 500;
}

/* Convert landing page */
.convert-groups {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
    text-align: left;
}

/* Colorful hero for the Convert landing page */
.convert-hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: 0 0 32px 32px;
    padding-bottom: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 18px 40px -20px rgba(99, 102, 241, 0.6);
}

.convert-hero .hero-title,
.convert-hero .hero-subtitle {
    color: #ffffff;
}

.convert-hero .hero-subtitle {
    opacity: 0.92;
}

.convert-group {
    background: var(--bg-white);
    border: 1px solid #eef2ff;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px -18px rgba(79, 70, 229, 0.35);
}

.convert-group-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    color: var(--text-primary, #0f172a);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.convert-group-title::before {
    content: "";
    width: 6px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(180deg, #6366f1, #ec4899);
}

.convert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.1rem;
}

.convert-card {
    --accent: #6366f1;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.1rem 1.2rem;
    background: var(--bg-white);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary, #0f172a);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.convert-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--accent);
    opacity: 0.9;
}

.convert-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--accent) 55%, transparent);
}

.convert-card-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    background: color-mix(in srgb, var(--accent) 16%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.convert-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.convert-card-title {
    font-weight: 700;
    font-size: 1.02rem;
}

.convert-card-sub {
    font-size: 0.82rem;
    color: #64748b;
}

.brand-hero-strip {
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
    border-top: 3px solid var(--primary-color);
    border-bottom: 1px solid #e0e7ff;
    padding: 2rem 0;
}

.brand-hero-strip h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.brand-url-hint {
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.brand-url-hint a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.brand-url-hint a:hover {
    text-decoration: underline;
}

/* Running ad ticker (EMI calculator promo) */
.ad-ticker {
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #db2777, #4f46e5);
    background-size: 300% 100%;
    animation: ticker-bg 8s ease infinite;
    color: #fff;
    overflow: hidden;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

@keyframes ticker-bg {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.ad-ticker-track {
    display: flex;
    width: max-content;
    animation: ticker-scroll 28s linear infinite;
}

.ad-ticker-track a {
    flex-shrink: 0;
    padding: 0.6rem 2.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.ad-ticker-track a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* EMI dedicated page */
.emi-page-hero {
    padding-bottom: 3rem;
}

.emi-page-wrap {
    max-width: 440px;
    margin: 0 auto;
}

.emi-page-card {
    position: static;
    width: 100%;
    flex: none;
}

/* Hero workspace: PDF compressor LEFT + EMI ad widget RIGHT */
.hero .container {
    max-width: 1280px;
}

.hero-workspace {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.75rem;
    width: 100%;
    text-align: left;
}

.hero-main {
    flex: 1 1 0;
    min-width: 0;
}

.hero-workspace .upload-section {
    max-width: none;
    margin: 0;
}

/* EMI ad widget — vertical sidebar, advertisement-style */
.emi-ad-widget {
    flex: 0 0 340px;
    width: 340px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e0e7ff;
    box-shadow:
        0 4px 6px -1px rgba(99, 102, 241, 0.08),
        0 20px 40px -12px rgba(99, 102, 241, 0.25);
    position: sticky;
    top: 88px;
}

.emi-ad-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #db2777 100%);
    color: #fff;
    padding: 1.35rem 1.25rem 1.15rem;
    text-align: center;
}

.emi-ad-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.55rem;
}

.emi-ad-title {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.25rem;
}

.emi-ad-desc {
    font-size: 0.82rem;
    opacity: 0.92;
}

.emi-loan-tabs {
    display: flex;
    border-bottom: 2px solid #eef2ff;
    background: #f8fafc;
}

.emi-loan-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.65rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.emi-loan-tab:hover {
    color: var(--primary-color);
    background: #eef2ff;
}

.emi-loan-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: #fff;
}

.emi-input-tabs {
    padding: 1rem 1.1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.emi-input-tab {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.emi-input-tab:focus-within {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.emi-tab-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    background: linear-gradient(135deg, #eef2ff, #ede9fe);
}

.emi-tab-body {
    flex: 1;
    min-width: 0;
}

.emi-tab-body label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.emi-tab-body input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0;
}

.emi-tab-body input:focus {
    outline: none;
}

.emi-tab-body input::placeholder {
    color: #cbd5e1;
    font-weight: 500;
}

.emi-ad-btn {
    display: block;
    width: calc(100% - 2.2rem);
    margin: 0.5rem 1.1rem 0;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.55);
    transition: transform 0.15s, box-shadow 0.15s;
}

.emi-ad-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px rgba(99, 102, 241, 0.65);
}

.emi-ad-btn:active {
    transform: translateY(0);
}

.emi-error {
    color: var(--danger-color);
    font-size: 0.78rem;
    margin: 0.5rem 1.1rem 0;
    text-align: center;
}

.emi-result {
    padding: 0.75rem 1.1rem 0;
}

.emi-emi {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    text-align: center;
    margin-bottom: 0.65rem;
}

.emi-emi span {
    display: block;
    font-size: 0.75rem;
    opacity: 0.92;
    margin-bottom: 0.15rem;
}

.emi-emi strong {
    font-size: 1.65rem;
    font-weight: 800;
}

.emi-breakdown {
    display: grid;
    gap: 0.4rem;
}

.emi-breakdown div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.75rem;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 0.82rem;
}

.emi-breakdown span { color: #64748b; }
.emi-breakdown strong { color: var(--text-primary); font-weight: 700; }

.emi-ad-foot {
    text-align: center;
    font-size: 0.68rem;
    color: #94a3b8;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid #f1f5f9;
    margin-top: 0.75rem;
}

@media (max-width: 1024px) {
    .hero-workspace {
        flex-direction: column;
    }

    .emi-ad-widget {
        flex: none;
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        position: static;
    }
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Upload Section */
.upload-section {
    max-width: 700px;
    margin: 0 auto;
}

.upload-box {
    background: var(--bg-white);
    border: 3px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-box:hover {
    border-color: var(--primary-color);
    background: #fafbff;
}

.upload-box.drag-over {
    border-color: var(--primary-color);
    background: #f0f4ff;
    transform: scale(1.02);
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    margin: 0 auto 1rem;
}

.upload-box h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-box p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.upload-error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: left;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-download {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-download svg {
    width: 24px;
    height: 24px;
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Compression Options */
.compression-options {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-md);
}

.compression-options h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.file-info {
    background: var(--bg-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.file-info p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.file-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

.size-selector {
    margin-bottom: 2rem;
}

.size-selector label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.quality-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.quality-mode-card {
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background: #ffffff;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quality-mode-card strong,
.quality-mode-card span {
    display: block;
}

.quality-mode-card strong {
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.quality-mode-card span {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.35;
}

.quality-mode-card.active {
    border-color: var(--primary-color);
    background: #eff6ff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.target-kb-display {
    padding: 0.875rem 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--bg-secondary, #f8fafc);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
}

.compression-slider-label {
    display: block;
    margin-top: 0.25rem;
}

.pdf-analysis-info {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #eff6ff;
    color: #1e3a8a;
    border-left: 4px solid #3b82f6;
    font-size: 0.9rem;
}

.blur-alert {
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    color: #991b1b;
    border: 2px solid #ef4444;
    font-size: 0.92rem;
    line-height: 1.45;
}

.blur-alert strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.target-kb-display.locked {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.locked-range-hint {
    margin: -0.75rem 0 1rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-align: center;
}

.size-slider-container.locked .size-slider {
    accent-color: var(--primary-color);
}

.size-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.size-input-group input[type="number"] {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    outline: none;
    transition: border-color 0.3s;
}

.size-input-group input[type="number"]:focus {
    border-color: var(--primary-color);
}

.input-suffix {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.size-slider-container {
    margin-bottom: 1rem;
}

.size-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--bg-light);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-bottom: 0.5rem;
}

.size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
}

.size-slider::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.size-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.size-slider::-moz-range-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.size-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem;
}

/* Progress Section */
.progress-section {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-md);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-light);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 1rem;
    transition: width 0.3s;
}

.progress-fill.compress-progress {
    animation: progress-animation 1.5s ease-in-out infinite;
}

.progress-fill.upload-progress {
    animation: none;
    width: 0%;
    transition: width 0.35s ease;
}

.upload-progress-card {
    text-align: center;
}

.upload-progress-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin: 0 auto 1rem;
    animation: upload-bounce 1.2s ease-in-out infinite;
}

@keyframes upload-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.progress-file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    word-break: break-all;
}

.progress-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.75rem 0 0.5rem;
}

.progress-subtext {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

@keyframes progress-animation {
    0%, 100% { width: 0%; }
    50% { width: 100%; }
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Result Section */
.result-section {
    margin-top: 2rem;
}

.result-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    color: var(--success-color);
    margin: 0 auto 1rem;
}

.result-card h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timer-warning {
    background: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #92400e;
}

.timer-icon {
    width: 24px;
    height: 24px;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin: 0 auto 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
}

/* SEO Content */
.seo-content,
.faq-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.seo-content h2 {
    font-size: 2.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.seo-content > .container > p {
    max-width: 850px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.7;
}

.seo-grid,
.faq-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.seo-grid article,
.faq-list article {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.seo-grid h3,
.faq-list h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.seo-grid p,
.faq-list p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.keyword-cloud span {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
}

.faq-section {
    background: var(--bg-white);
}

/* Privacy Section */
.privacy {
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.privacy .section-title {
    color: white;
}

.privacy-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.privacy-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.privacy-number {
    background: rgba(255, 255, 255, 0.2);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.privacy-text h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.privacy-text p {
    opacity: 0.9;
}

.privacy-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.privacy-badge svg {
    width: 32px;
    height: 32px;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.footer-nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
}

.footer-nav a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* SEO breadcrumb & tools hub */
.seo-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.seo-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.seo-breadcrumb a:hover {
    text-decoration: underline;
}

.seo-tools-hub {
    padding: 3rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.tools-hub-intro {
    text-align: center;
    color: #64748b;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.tools-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.tools-hub-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tools-hub-card strong {
    font-size: 1rem;
    color: var(--primary);
}

.tools-hub-card span {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.tools-hub-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.tools-hub-card--primary {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
}

/* SEO guide pages (minimal UI — indexed, not in main nav) */
.seo-guide-page .header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.seo-guide-page .logo {
    text-decoration: none;
    color: inherit;
}

.seo-guide-header-cta {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.seo-guide-main {
    padding: 2rem 0 4rem;
    background: var(--bg-light);
    min-height: 60vh;
}

.seo-guide-article {
    max-width: 720px;
}

.seo-guide-article h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.25;
}

.seo-guide-lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.seo-guide-article h2 {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
}

.seo-guide-article p,
.seo-guide-article li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.seo-guide-article ul,
.seo-guide-article ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.seo-guide-article a {
    color: var(--primary);
}

.seo-guide-cta-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2rem;
    text-align: center;
}

.seo-guide-related {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.seo-guide-related li {
    margin-bottom: 0.5rem;
}

.seo-guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin: 1rem 0 1.5rem;
}

.seo-guide-table th,
.seo-guide-table td {
    border: 1px solid #e2e8f0;
    padding: 0.65rem 0.85rem;
    text-align: left;
}

.seo-guide-table th {
    background: #f1f5f9;
    color: var(--text-primary);
}

.seo-guides-index {
    display: grid;
    gap: 0.75rem;
    max-width: 640px;
    margin: 2rem 0;
}

.seo-guides-index a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.seo-guides-index a strong {
    color: var(--primary);
}

.seo-guides-index a span {
    font-size: 0.9rem;
    color: #64748b;
}

.seo-guides-index a:hover {
    border-color: var(--primary);
}

.seo-copy-block {
    background: #fff;
    border-left: 4px solid var(--primary);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
}

.seo-code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
}

.footer--guide {
    padding: 1.25rem 0;
}

.footer--guide p {
    font-size: 0.85rem;
    margin: 0;
}

.footer--guide a {
    color: #cbd5e1;
}

/* Subtle footer SEO links — visible but low prominence */
.footer-seo-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-seo-links a {
    font-size: 0.7rem;
    color: #64748b;
    text-decoration: none;
    opacity: 0.75;
}

.footer-seo-links a:hover {
    color: #94a3b8;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .nav-dropdown-menu {
        grid-template-columns: 1fr;
        left: auto;
        right: 0;
        gap: 0.75rem;
        padding: 1rem;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quality-mode-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .upload-box {
        padding: 2rem 1rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}
