:root {
    --bg: #f1f5fb;
    --surface: #ffffff;
    --surface-soft: rgba(255, 255, 255, 0.9);
    --text: #0f1f37;
    --text-muted: #5e6f86;
    --border: #d2deef;
    --accent: #1170ee;
    --accent-2: #0f8ac4;
    --accent-deep: #0c5ac9;
    --shadow: 0 10px 30px rgba(22, 56, 109, 0.12);
}

html[data-theme="dark"] {
    --bg: #0d1728;
    --surface: #13213a;
    --surface-soft: rgba(19, 33, 58, 0.88);
    --text: #e9f0fc;
    --text-muted: #9db1d1;
    --border: #2a3f63;
    --accent: #5fa6ff;
    --accent-2: #36b0e8;
    --accent-deep: #3d87e7;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-mark {
    font-family: "Space Grotesk", "Sora", sans-serif;
}

.site-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 8% 10%, rgba(17, 112, 238, 0.22), transparent 33%),
        radial-gradient(circle at 92% 18%, rgba(15, 138, 196, 0.2), transparent 33%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 34%);
    pointer-events: none;
    z-index: -1;
}

.site-header .navbar,
.site-footer,
.card-soft,
.auth-card,
.glass-card,
.feature-tile,
.stats-strip {
    background: var(--surface-soft);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.site-header .navbar {
    margin: 0;
    width: 100%;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: 0 3px 14px rgba(22, 56, 109, 0.08);
}

.camscan-nav {
    background: #f5f6f7 !important;
}

.brand-mark {
    color: #1f2937;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.45rem;
}

.brand-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #51d3b6;
    background: #18324a;
}

.camscan-nav .nav-link,
.camscan-nav .dropdown-toggle {
    color: #4b5563 !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.7rem !important;
}

.camscan-nav .dropdown-menu {
    border: 1px solid #dde5f2;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-radius: 10px;
}

.lang-btn {
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.35rem 0.55rem;
}

.btn-outline-online {
    border: 1px solid #08a8a3;
    color: #087f7c;
    background: #effdfc;
    border-radius: 0;
    padding: 0.4rem 0.95rem;
    font-weight: 500;
    line-height: 1.15;
}

.btn-outline-online:hover {
    border-color: #04857f;
    color: #056966;
    background: #def8f6;
}

.btn-signin {
    background: #0ea578;
    color: #fff;
    border-radius: 0;
    padding: 0.45rem 1.15rem;
    border: 1px solid #0d9a70;
    font-weight: 600;
}

.btn-signin:hover {
    background: #0c8f68;
    border-color: #0c8f68;
    color: #fff;
}

.logout-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
}

.small,
p,
.text-muted,
label,
li {
    color: var(--text-muted) !important;
}

.main-shell {
    min-height: calc(100vh - 160px);
}

.hero-main {
    position: relative;
}

.eyebrow {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--accent-deep);
    background: rgba(17, 112, 238, 0.14);
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: var(--text);
    max-width: 650px;
}

.hero-subtitle {
    font-size: 1.03rem;
    max-width: 620px;
}

.hero-bullets span {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.84rem;
}

.scanner-showcase {
    position: relative;
}

.showcase-card {
    border-radius: 24px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(17, 112, 238, 0.1), rgba(15, 138, 196, 0.07)), var(--surface-soft);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.showcase-head {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.green { background: #4ade80; }
.dot.amber { background: #fbbf24; }
.dot.red { background: #fb7185; }

.showcase-body {
    padding: 16px;
}

.scan-preview {
    height: 250px;
    border-radius: 16px;
    border: 1px dashed var(--border);
    background:
        linear-gradient(160deg, rgba(17, 112, 238, 0.12), rgba(15, 138, 196, 0.06)),
        repeating-linear-gradient(0deg, rgba(17, 112, 238, 0.07) 0, rgba(17, 112, 238, 0.07) 1px, transparent 1px, transparent 24px);
}

.scan-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.scan-metrics div {
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    gap: 2px;
}

.scan-metrics strong {
    font-size: 1rem;
    color: var(--text);
}

.scan-metrics span {
    font-size: 0.76rem;
}

.stats-strip {
    border-radius: 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.stats-strip div {
    display: grid;
    gap: 2px;
    text-align: center;
    padding: 4px;
}

.stats-strip strong {
    color: var(--text);
    font-size: 1.35rem;
}

.feature-tile {
    border-radius: 16px;
    padding: 18px;
}

.feature-tile h3 {
    font-size: 1.03rem;
    margin-bottom: 8px;
}

.feature-tile p {
    margin: 0;
    font-size: 0.93rem;
}

.cta-panel {
    border-radius: 22px;
    background: linear-gradient(135deg, var(--accent-deep), var(--accent-2));
    box-shadow: 0 18px 38px rgba(10, 69, 148, 0.3);
}

.btn-accent {
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: #fff;
    border: 0;
}

.btn-accent:hover {
    color: #fff;
    filter: brightness(0.95);
}

.card-soft,
.auth-card,
.glass-card {
    border-radius: 16px;
}

.auth-card {
    max-width: 520px;
    padding: 28px;
}

input,
select,
textarea {
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    padding: 10px 12px !important;
    width: 100%;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

p > input,
p > select,
p > textarea {
    margin-top: 4px;
}

.metric-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
}

.content-body p {
    line-height: 1.8;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.rich-content a {
    color: var(--accent);
}

.rich-content pre,
.rich-content code {
    background: rgba(127, 127, 127, 0.12);
    border-radius: 8px;
    padding: 2px 6px;
}

.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.site-footer {
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.06);
}

.footer-top-row {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-brand {
    font-size: 1.2rem;
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.93rem;
}

.footer-links a:hover {
    color: #0f172a;
}

.tool-feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.tool-feature-card {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 14px;
}

.tool-feature-card span {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-deep);
}

.tool-feature-card strong {
    display: block;
    margin-top: 4px;
    font-size: 1.02rem;
    color: var(--text);
}

.tool-feature-card p {
    margin: 5px 0 0;
    font-size: 0.88rem;
}

.tool-actions-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.scan-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.scan-tool-card {
    border: 0;
    background: transparent;
    padding: 0;
    display: grid;
    grid-template-rows: 80px auto auto;
    gap: 6px;
    justify-items: center;
}

.scan-tool-card::before {
    content: "";
    width: 100%;
    height: 80px;
    border: 1px solid #9dcaee;
    border-radius: 14px;
    background: #d5e7f8;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
    grid-row: 1;
    grid-column: 1;
}

.scan-tool-card:hover::before {
    background: #cbe1f6;
    border-color: #7cb8e8;
}

.scan-tool-icon {
    grid-row: 1;
    grid-column: 1;
    align-self: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.52);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    z-index: 1;
}

.scan-tool-card:hover .scan-tool-icon {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 11px 22px rgba(15, 23, 42, 0.28);
    filter: saturate(1.06);
}

.scan-tools-grid .scan-tool-card:nth-child(1) .scan-tool-icon  { background: linear-gradient(145deg, #3b82f6, #2563eb); }
.scan-tools-grid .scan-tool-card:nth-child(2) .scan-tool-icon  { background: linear-gradient(145deg, #0ea5e9, #0284c7); }
.scan-tools-grid .scan-tool-card:nth-child(3) .scan-tool-icon  { background: linear-gradient(145deg, #22c55e, #16a34a); }
.scan-tools-grid .scan-tool-card:nth-child(4) .scan-tool-icon  { background: linear-gradient(145deg, #8b5cf6, #7c3aed); }
.scan-tools-grid .scan-tool-card:nth-child(5) .scan-tool-icon  { background: linear-gradient(145deg, #f97316, #ea580c); }
.scan-tools-grid .scan-tool-card:nth-child(6) .scan-tool-icon  { background: linear-gradient(145deg, #06b6d4, #0891b2); }
.scan-tools-grid .scan-tool-card:nth-child(7) .scan-tool-icon  { background: linear-gradient(145deg, #ef4444, #dc2626); }
.scan-tools-grid .scan-tool-card:nth-child(8) .scan-tool-icon  { background: linear-gradient(145deg, #14b8a6, #0f766e); }
.scan-tools-grid .scan-tool-card:nth-child(9) .scan-tool-icon  { background: linear-gradient(145deg, #f59e0b, #d97706); }
.scan-tools-grid .scan-tool-card:nth-child(10) .scan-tool-icon { background: linear-gradient(145deg, #ec4899, #db2777); }
.scan-tools-grid .scan-tool-card:nth-child(11) .scan-tool-icon { background: linear-gradient(145deg, #4f46e5, #4338ca); }
.scan-tools-grid .scan-tool-card:nth-child(12) .scan-tool-icon { background: linear-gradient(145deg, #10b981, #059669); }

.scan-tool-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
}

.scan-tool-subtitle {
    font-size: 0.78rem;
    color: #334155;
    text-align: center;
}

.tool-launch-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.tool-launch {
    border: 1px solid #d9dbe2;
    background: #f3f4f6;
    border-radius: 10px;
    min-height: 126px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.tool-launch:hover {
    transform: translateY(-1px);
    border-color: #bcc3d0;
    background: #eceff3;
}

.tool-launch-label {
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
    text-align: center;
    max-width: 96px;
}

.tool-launch-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    font-size: 1rem;
}

.ico-word { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.ico-excel { background: linear-gradient(135deg, #0f9d58, #16a34a); }
.ico-ppt { background: linear-gradient(135deg, #ea580c, #f97316); }
.ico-image { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.ico-merge { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.ico-split { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.ico-delete { background: linear-gradient(135deg, #ef4444, #f43f5e); }
.ico-sort { background: linear-gradient(135deg, #d97706, #f59e0b); }
.ico-rotate { background: linear-gradient(135deg, #22c55e, #16a34a); }
.ico-sign { background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.ico-watermark { background: linear-gradient(135deg, #f97316, #ea580c); }

.tool-launch.is-soon {
    opacity: 0.78;
    cursor: not-allowed;
}

.tool-soon-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e2e8f0;
    color: #334155;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.62rem;
    font-weight: 700;
}

.tool-action {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    text-align: left;
    padding: 9px;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.83rem;
}

.tool-action:hover {
    border-color: rgba(17, 112, 238, 0.45);
    background: rgba(17, 112, 238, 0.08);
}

.tool-thumb {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    background: linear-gradient(145deg, #146ff0, #0ba0d1);
    flex-shrink: 0;
}

.reveal-up {
    animation: revealUp 0.6s ease both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .site-header .navbar {
        border-radius: 0;
    }

    .stats-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-title {
        font-size: clamp(1.8rem, 10vw, 2.5rem);
    }

    .scan-metrics {
        grid-template-columns: 1fr;
    }

    .tool-feature-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-actions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .scan-tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tool-launch-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .stats-strip {
        grid-template-columns: 1fr;
    }

    .tool-feature-strip,
    .tool-actions-grid {
        grid-template-columns: 1fr;
    }

    .scan-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .tool-launch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header-actions {
        align-items: stretch !important;
        flex-direction: column;
    }
}
