/* ================================================================
   CompJPG — Dark Theme Stylesheet
   Palette:
     bg-deep:    #0d1117   (page background)
     bg-card:    #161b22   (card/panel background)
     bg-ele:     #21262d   (inputs, buttons bg)
     border:     #30363d   (subtle borders)
     text-pri:   #e6edf3   (primary text)
     text-sec:   #8b949e   (secondary/muted)
     accent:     #39ff14   (neon green – brand)
     accent-dim: #1a7a06   (dimmer green)
     danger:     #f85149   (errors)
================================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-deep:    #0d1117;
    --bg-card:    #161b22;
    --bg-ele:     #21262d;
    --border:     #30363d;
    --text-pri:   #e6edf3;
    --text-sec:   #8b949e;
    --accent:     #39ff14;
    --accent-dim: #1a7a06;
    --accent-glow: rgba(57,255,20,0.18);
    --danger:     #f85149;
    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  18px;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.5);
    --transition: 0.22s ease;
}

html {
    background: var(--bg-deep);
    color: var(--text-pri);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    scroll-behavior: smooth;
}

body { background: var(--bg-deep); min-height: 100vh; }

/* ── Loading Splash ── */
#loading-splash {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-deep);
}
.splash-inner { text-align: center; }
.splash-logo  { margin-bottom: 1rem; }
.splash-text  { color: var(--text-sec); font-size: 0.9rem; letter-spacing: 0.06em; }

@keyframes spin-ring {
    to { stroke-dashoffset: 0; }
}
.splash-ring {
    animation: spin-ring 1.2s ease-out forwards;
}

/* ── Layout Wrapper ── */
.layout-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-rows: auto 1fr;
    gap: 0;
    min-height: 100vh;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (max-width: 1100px) {
    .layout-wrapper { grid-template-columns: 1fr; }
    .sidebar-ad { display: none; }
}

/* ── Blazor Error UI ── */
#blazor-error-ui {
    background: #2d0000;
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    bottom: 1rem; left: 50%;
    transform: translateX(-50%);
    color: var(--danger);
    display: none;
    padding: 0.75rem 1.5rem;
    position: fixed;
    z-index: 9999;
}
#blazor-error-ui.blazor-error-boundary::after { display: none; }
#blazor-error-ui a { color: var(--accent); }

/* ================================================================
   PAGE SECTIONS
================================================================ */

/* ── Main content column ── */
.main-col {
    padding: 24px 24px 24px 0;
    min-width: 0;
}

/* ── AdSense banner (top) ── */
.adsense-banner {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    width: 100%;
    max-width: 728px;
    margin: 0 auto 28px auto;
    color: var(--text-sec);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    overflow: hidden;
}

/* ── Sidebar AdSense ── */
.sidebar-ad {
    padding: 24px 0 24px 16px;
    position: sticky;
    top: 24px;
    height: fit-content;
}
.sidebar-ad .ad-box {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 600px;
    width: 300px;
    color: var(--text-sec);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

/* ── Hero ── */
.hero {
    text-align: center;
    margin-bottom: 32px;
}
.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-pri);
    line-height: 1.15;
}
.hero h1 span.accent { color: var(--accent); }
.hero p.subtitle {
    color: var(--text-sec);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Privacy badge */
.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(57,255,20,0.08);
    border: 1px solid rgba(57,255,20,0.22);
    border-radius: 999px;
    padding: 4px 14px;
    color: var(--accent);
    font-size: 0.78rem;
    margin-top: 14px;
    letter-spacing: 0.03em;
}
.privacy-badge svg { width: 14px; height: 14px; }

/* ── Settings Bar ── */
.settings-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.mode-toggle {
    display: flex;
    background: var(--bg-ele);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 3px;
}
.mode-toggle button {
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-sec);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 16px;
    transition: background var(--transition), color var(--transition);
    font-family: inherit;
}
.mode-toggle button.active {
    background: var(--accent);
    color: #000;
}
.mode-toggle button:not(.active):hover { color: var(--text-pri); }

.settings-control {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}
.settings-label {
    color: var(--text-sec);
    font-size: 0.82rem;
    white-space: nowrap;
    min-width: 90px;
}
.settings-value {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 48px;
}

/* Sliders */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: var(--bg-ele);
    outline: none;
    cursor: pointer;
    flex: 1;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #000;
    box-shadow: 0 0 8px var(--accent-glow);
    cursor: pointer;
    transition: transform var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #000;
    cursor: pointer;
}

/* Number input */
.size-input {
    background: var(--bg-ele);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-pri);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 6px 10px;
    width: 90px;
    outline: none;
    transition: border-color var(--transition);
}
.size-input:focus { border-color: var(--accent); }
.size-input-unit {
    color: var(--text-sec);
    font-size: 0.82rem;
}

/* ── Drop Zone ── */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    background: var(--bg-card);
    margin-bottom: 24px;
    position: relative;
    user-select: none;
    overflow: hidden;
}
.drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(57,255,20,0.05);
    box-shadow: 0 0 30px var(--accent-glow);
}
.drop-zone.has-files {
    border-color: var(--accent-dim);
    padding: 28px 24px;
}
.drop-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    filter: grayscale(0.3);
}
.drop-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-pri);
}
.drop-sub {
    color: var(--text-sec);
    font-size: 0.83rem;
    margin-top: 4px;
}
.drop-zone input[type="file"],
.drop-zone .drop-zone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}
.file-count-badge {
    display: inline-block;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 0.78rem;
    border-radius: 999px;
    padding: 2px 10px;
    margin-top: 8px;
}

/* ── Action Buttons ── */
.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    align-items: center;
}

.btn {
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 22px;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.01em;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 18px var(--accent-glow);
}
.btn-primary:not(:disabled):hover {
    background: #54ff2c;
    box-shadow: 0 0 28px rgba(57,255,20,0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-ele);
    color: var(--text-pri);
    border: 1px solid var(--border);
}
.btn-secondary:not(:disabled):hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger-ghost {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(248,81,73,0.3);
}
.btn-danger-ghost:not(:disabled):hover {
    background: rgba(248,81,73,0.08);
}

.btn-sm { padding: 6px 14px; font-size: 0.78rem; }

/* ── Before/After Slider Section ── */
.before-after-section {
    margin-bottom: 28px;
}
.before-after-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.ba-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.ba-badge {
    background: rgba(57, 255, 20, 0.12);
    border: 1px solid rgba(57, 255, 20, 0.35);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.ba-filename {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-pri);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 380px;
    margin: 0;
}
.ba-subtitle {
    font-size: 0.8rem;
    color: var(--text-sec);
    display: flex;
    align-items: center;
    gap: 6px;
}
.ba-count {
    color: var(--accent);
    font-weight: 600;
}


.slider-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    max-height: 460px;
    user-select: none;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}
.slider-before, .slider-after {
    position: absolute;
    inset: 0;
}
.slider-before img, .slider-after img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.slider-after {
    clip-path: inset(0 50% 0 0);
    transition: none;
}
/* Hidden img used for height reference */
.slider-ref-img {
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: contain;
    visibility: hidden;
    display: block;
}

.slider-handle {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 3px;
    background: #fff;
    cursor: ew-resize;
    z-index: 10;
    transform: translateX(-50%);
}
.slider-handle::before {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.slider-handle::after {
    content: "◀ ▶";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    color: #000;
    letter-spacing: -2px;
    white-space: nowrap;
}

.slider-labels {
    position: absolute;
    top: 10px; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    pointer-events: none;
    z-index: 11;
}
.slider-label {
    background: rgba(0,0,0,0.7);
    border-radius: 4px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 3px 8px;
}
.slider-label.after-label { color: var(--accent); }

.preview-size-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 8px 16px;
    font-size: 0.8rem;
    color: var(--text-sec);
}
.preview-size-bar .saving {
    color: var(--accent);
    font-weight: 600;
}

/* ── Image Grid ── */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.image-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    position: relative;
    cursor: pointer;
}
.image-card:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 0 16px rgba(57,255,20,0.1);
}
.image-card.status-done { border-color: var(--accent-dim); }
.image-card.status-error { border-color: var(--danger); }
.image-card.status-processing { border-color: rgba(57,255,20,0.35); }
.image-card.is-selected {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(57,255,20,0.4), 0 6px 20px rgba(57,255,20,0.15) !important;
}

.card-active-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(13, 17, 23, 0.88);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    z-index: 5;
    backdrop-filter: blur(4px);
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: var(--bg-deep);
    display: block;
}

.card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.card-filename {
    color: var(--text-pri);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-sec);
}
.card-stats .stat-val { color: var(--text-pri); font-weight: 500; }
.card-stats .stat-saving { color: var(--accent); font-weight: 700; }

.card-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

/* ── Green Progress Ring ── */
.progress-ring-wrap {
    position: absolute;
    top: 8px; right: 8px;
    width: 40px; height: 40px;
}
.progress-ring {
    transform: rotate(-90deg);
}
.progress-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.08);
    stroke-width: 3;
}
.progress-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100.5;  /* 2π×16 */
    stroke-dashoffset: 100.5;
    transition: stroke-dashoffset 0.45s ease, stroke 0.3s;
    filter: drop-shadow(0 0 4px var(--accent));
}
.progress-ring-fill.done {
    stroke-dashoffset: 0;
}
.progress-ring-fill.error {
    stroke: var(--danger);
    stroke-dashoffset: 0;
    filter: drop-shadow(0 0 4px var(--danger));
}
.progress-ring-text {
    fill: var(--text-pri);
    font-size: 9px;
    font-family: Inter, sans-serif;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
}
.progress-ring-text.done-text { fill: var(--accent); }
.progress-ring-text.error-text { fill: var(--danger); }

/* Processing pulse on thumbnail */
.card-thumb-wrap { position: relative; }
.processing-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13,17,23,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.processing-spinner {
    width: 28px; height: 28px;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stats Summary Banner ── */
.stats-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}
.stat-chip {
    display: flex;
    flex-direction: column;
}
.stat-chip-label {
    font-size: 0.72rem;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.stat-chip-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-pri);
}
.stat-chip-value.green { color: var(--accent); }

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-sec);
}
.empty-state .empty-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}
.empty-state p { font-size: 0.9rem; }

/* ── Tips Row ── */
.tips-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 32px;
    margin-bottom: 16px;
}
.tip-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}
.tip-card .tip-icon { font-size: 1.4rem; display: block; margin-bottom: 6px; }
.tip-card h4 { font-size: 0.82rem; font-weight: 600; color: var(--text-pri); margin-bottom: 4px; }
.tip-card p  { font-size: 0.76rem; color: var(--text-sec); line-height: 1.5; }

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 18px 0 24px;
    text-align: center;
    color: var(--text-sec);
    font-size: 0.76rem;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--bg-ele); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

/* ── Utility ── */
.text-accent { color: var(--accent); }
.text-sec    { color: var(--text-sec); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.image-card {
    animation: fadeInUp 0.3s ease both;
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .main-col { padding: 16px 0; }
    .settings-bar { padding: 14px 16px; }
    .image-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .actions-row { gap: 8px; }
    .btn { padding: 9px 16px; font-size: 0.82rem; }
}

/* ── Content & Blog Pages ── */
.content-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    min-height: 100vh;
}

.content-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    box-shadow: var(--shadow-card);
}

@media (max-width: 768px) {
    .content-article {
        padding: 28px 20px;
    }
}

.content-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
    margin-bottom: 32px;
}

.content-header h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-pri);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.content-meta {
    color: var(--text-sec);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-body {
    color: var(--text-pri);
    font-size: 1.05rem;
    line-height: 1.8;
}

.content-body h2 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-pri);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(48, 54, 61, 0.6);
}

.content-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-pri);
    margin-top: 28px;
    margin-bottom: 12px;
}

.content-body p {
    margin-bottom: 20px;
    color: #c9d1d9;
}

.content-body ul, .content-body ol {
    margin-bottom: 24px;
    padding-left: 28px;
}

.content-body li {
    margin-bottom: 10px;
    color: #c9d1d9;
}

.content-body strong {
    color: var(--text-pri);
    font-weight: 600;
}

.content-body a {
    color: var(--accent);
    text-decoration: none;
    transition: text-decoration 0.15s;
}

.content-body a:hover {
    text-decoration: underline;
}

.content-body code {
    background: var(--bg-ele);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: #ff7b72;
}

.content-body pre {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e6edf3;
}

.content-body blockquote {
    border-left: 4px solid var(--accent);
    background: rgba(57, 255, 20, 0.05);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 24px 0;
    color: #adbac7;
    font-style: italic;
}

.content-body .table-wrapper {
    overflow-x: auto;
    margin: 28px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

.content-body th {
    background: var(--bg-ele);
    color: var(--text-pri);
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.content-body td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: #c9d1d9;
}

.content-body tr:last-child td {
    border-bottom: none;
}

.content-body tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.content-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.cta-box {
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.08) 0%, rgba(22, 27, 34, 0.8) 100%);
    border: 1px solid rgba(57, 255, 20, 0.3);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    box-shadow: 0 0 24px rgba(57, 255, 20, 0.05);
}

.cta-box h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-pri);
    margin-bottom: 10px;
}

.cta-box p {
    color: var(--text-sec);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.back-to-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    color: var(--text-sec);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color var(--transition);
}

.back-to-tool:hover {
    color: var(--accent);
}

/* ================================================================
   SITE NAVIGATION
================================================================ */

.site-nav {
    background: rgba(13,17,23,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-pri);
}
.nav-logo-icon { font-size: 1.3rem; }
.nav-logo-text .accent { color: var(--accent); }
.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}
.nav-link {
    color: var(--text-sec);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.nav-link:hover {
    color: var(--text-pri);
    background: var(--bg-ele);
}
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-pri);
    font-size: 1.2rem;
    padding: 4px 10px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0; right: 0;
        background: var(--bg-deep);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px 24px;
        gap: 4px;
    }
    .nav-links.open { display: flex; }
    .nav-link { padding: 10px 14px; }
}

/* ================================================================
   COOKIE CONSENT BANNER
================================================================ */

.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
}
.cookie-inner {
    max-width: 900px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}
.cookie-inner p {
    color: var(--text-sec);
    font-size: 0.82rem;
    flex: 1;
    min-width: 250px;
}
.cookie-inner p a { color: var(--accent); }
.cookie-actions {
    display: flex;
    gap: 8px;
}

/* ================================================================
   CONTENT PAGES (Privacy, Terms, About, Contact, Blog articles)
================================================================ */

.content-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.content-article { }

.content-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.content-header h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--text-pri);
    line-height: 1.2;
}
.content-meta {
    color: var(--text-sec);
    font-size: 0.85rem;
    margin-top: 8px;
}

.content-body h2 {
    color: var(--text-pri);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 32px 0 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.content-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.content-body h3 {
    color: var(--text-pri);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 20px 0 8px;
}
.content-body p {
    color: var(--text-sec);
    line-height: 1.75;
    margin-bottom: 12px;
}
.content-body ul, .content-body ol {
    color: var(--text-sec);
    padding-left: 24px;
    margin-bottom: 16px;
    line-height: 1.8;
}
.content-body li { margin-bottom: 4px; }
.content-body a { color: var(--accent); text-decoration: none; }
.content-body a:hover { text-decoration: underline; }
.content-body strong { color: var(--text-pri); }
.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.content-body th, .content-body td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
    font-size: 0.88rem;
}
.content-body th {
    background: var(--bg-ele);
    color: var(--text-pri);
    font-weight: 600;
}
.content-body td { color: var(--text-sec); }

/* CTA Box */
.cta-box {
    background: var(--bg-card);
    border: 1px solid var(--accent-dim);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    margin-top: 32px;
}
.cta-box h3 { color: var(--text-pri); font-size: 1.1rem; margin-bottom: 8px; }
.cta-box p  { color: var(--text-sec); font-size: 0.9rem; margin-bottom: 16px; }

.content-footer { margin-top: 40px; }

/* ================================================================
   BLOG INDEX GRID
================================================================ */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-decoration: none;
    display: block;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.blog-card:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 4px 20px rgba(57,255,20,0.08);
    transform: translateY(-2px);
}
.blog-card-icon { font-size: 1.8rem; margin-bottom: 10px; }
.blog-card h3 {
    color: var(--text-pri);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}
.blog-card p {
    color: var(--text-sec);
    font-size: 0.82rem;
    line-height: 1.6;
    margin-bottom: 10px;
}
.blog-card-meta {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ================================================================
   FAQ SECTION
================================================================ */

.faq-section {
    margin-top: 40px;
    margin-bottom: 32px;
}
.faq-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-pri);
    margin-bottom: 20px;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition);
}
.faq-item[open] { border-color: var(--accent-dim); }
.faq-item summary {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-pri);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: "▸";
    color: var(--accent);
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}
.faq-item[open] summary::before { transform: rotate(90deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-item p {
    padding: 0 18px 14px;
    color: var(--text-sec);
    font-size: 0.88rem;
    line-height: 1.7;
    margin: 0;
}
.faq-item p a { color: var(--accent); text-decoration: none; }
.faq-item p a:hover { text-decoration: underline; }

/* ================================================================
   CONTACT PAGE
================================================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    margin-top: 24px;
}
@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
}

.contact-form-wrap h2, .contact-info h2 {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    color: var(--text-sec);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    background: var(--bg-ele);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-pri);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 10px 12px;
    outline: none;
    transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 100px; }
select.form-input { cursor: pointer; }

.success-message {
    text-align: center;
    padding: 32px 16px;
}
.success-message h3 { color: var(--accent); margin: 8px 0; }
.success-message p  { color: var(--text-sec); }

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}
.contact-card h4 { color: var(--text-pri); font-size: 0.88rem; margin-bottom: 4px; }
.contact-card p  { color: var(--text-sec); font-size: 0.82rem; line-height: 1.5; margin: 0; }
.contact-card a  { color: var(--accent); text-decoration: none; }

/* Use-cases grid on About page */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

/* ================================================================
   GLOBAL SITE FOOTER
================================================================ */

.site-footer-global {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
    margin-top: 40px;
}
.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}
.footer-cols {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
@media (max-width: 768px) {
    .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 480px) {
    .footer-cols { grid-template-columns: 1fr; }
}
.footer-col h4 {
    color: var(--text-pri);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.footer-col h4 .accent { color: var(--accent); }
.footer-col p {
    color: var(--text-sec);
    font-size: 0.82rem;
    line-height: 1.6;
}
.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col ul li {
    margin-bottom: 6px;
}
.footer-col ul li a {
    color: var(--text-sec);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    text-align: center;
}
.footer-bottom p {
    color: var(--text-sec);
    font-size: 0.76rem;
}
.footer-bottom a { color: var(--accent); text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }
