* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* background */
.dark-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.14), transparent 28%),
        linear-gradient(180deg, #0f172a 0%, #111827 50%, #0b1120 100%);
}

.landing-dark,
.detect-dark {
    color: #e5e7eb;
}

/* subtle cursor spotlight */
.spotlight {
    position: fixed;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    pointer-events: none;
    z-index: -2;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(59, 130, 246, 0.05) 32%, rgba(0, 0, 0, 0) 72%);
    filter: blur(30px);
}

/* page transitions */
.page-content {
    animation: pageFadeIn 0.7s ease;
}

body.page-exit .page-content {
    animation: pageFadeOut 0.4s ease forwards;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pageFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-12px) scale(0.99);
    }
}

/* animated gradient border wrapper */
.gradient-border-card {
    position: relative;
}

.gradient-border-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.55), rgba(59, 130, 246, 0.18), rgba(6, 182, 212, 0.55), rgba(99, 102, 241, 0.55));
    background-size: 300% 300%;
    animation: borderFlow 8s linear infinite;
    z-index: -1;
    filter: blur(0.2px);
}

@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* shared shells */
.landing-shell,
.detect-shell {
    width: 92%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 0 60px 0;
}

/* topbars */
.topbar,
.detect-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0 26px 0;
    position: relative;
}

.brand {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.3px;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.topnav a,
.detect-home-link {
    text-decoration: none;
    color: #cbd5e1;
    font-size: 14px;
    transition: 0.25s ease;
}

.topnav a:hover,
.detect-home-link:hover {
    color: #ffffff;
}

.nav-cta {
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: white !important;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
}

/* mobile menu button */
.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 999px;
    transition: 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* landing hero */
.hero-saas {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 34px;
    align-items: center;
    padding: 46px 0 28px 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.16);
    color: #c7d2fe;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(129, 140, 248, 0.2);
    margin-bottom: 18px;
}

.hero-copy h1 {
    margin: 0 0 18px 0;
    font-size: 62px;
    line-height: 1.02;
    letter-spacing: -1.6px;
    color: #f8fafc;
}

.hero-copy h1 span {
    display: block;
    color: #94a3b8;
}

.hero-copy p {
    margin: 0;
    max-width: 640px;
    font-size: 16px;
    line-height: 1.8;
    color: #cbd5e1;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.primary-cta,
.secondary-cta,
.detect-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary-cta {
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.24);
}

.primary-cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 18px rgba(99, 102, 241, 0.55),
        0 0 34px rgba(37, 99, 235, 0.28),
        0 18px 34px rgba(79, 70, 229, 0.32);
}

.secondary-cta,
.detect-home-link {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
}

.secondary-cta:hover,
.detect-home-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 16px rgba(148, 163, 184, 0.12);
}

.hero-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.meta-item {
    min-width: 150px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.meta-item strong {
    display: block;
    color: #f8fafc;
    font-size: 15px;
    margin-bottom: 4px;
}

.meta-item span {
    font-size: 13px;
    color: #94a3b8;
}

/* preview card */
.hero-preview {
    display: flex;
    justify-content: center;
}

.preview-card-main {
    width: 100%;
    max-width: 440px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 28px;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.preview-dots {
    display: flex;
    gap: 8px;
}

.preview-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #475569;
}

.preview-title {
    font-size: 13px;
    color: #94a3b8;
}

.preview-panel {
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
}

.preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.preview-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #cbd5e1;
}

.preview-panel p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #e2e8f0;
}

.premium-danger {
    background: rgba(127, 29, 29, 0.16);
    border: 1px solid rgba(248, 113, 113, 0.22);
}

.premium-safe {
    background: rgba(20, 83, 45, 0.16);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.pill-danger,
.pill-safe {
    font-size: 12px;
    font-weight: 700;
    padding: 7px 11px;
    border-radius: 999px;
}

.pill-danger {
    background: rgba(248, 113, 113, 0.16);
    color: #fecaca;
}

.pill-safe {
    background: rgba(74, 222, 128, 0.16);
    color: #bbf7d0;
}

.preview-footer {
    margin-top: 10px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

/* feature strip */
.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 30px;
}

.saas-feature-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.22);
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.16);
    font-size: 22px;
    margin-bottom: 16px;
}

.saas-feature-card h3 {
    margin: 0 0 8px 0;
    color: #f8fafc;
}

.saas-feature-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #94a3b8;
}

/* workflow */
.workflow-section {
    margin-top: 34px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.22);
}

.section-heading {
    margin-bottom: 20px;
}

.mini-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #818cf8;
    margin-bottom: 8px;
}

.section-heading h2 {
    margin: 0 0 8px 0;
    color: #f8fafc;
    font-size: 34px;
    letter-spacing: -0.8px;
}

.section-heading p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.7;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.workflow-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    padding: 22px;
}

.workflow-number {
    font-size: 30px;
    font-weight: 800;
    color: #818cf8;
    margin-bottom: 10px;
}

.workflow-card h3 {
    margin: 0 0 8px 0;
    color: #f8fafc;
}

.workflow-card p {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
}

/* detect page */
.detect-layout {
    display: grid;
    grid-template-columns: 1fr 0.95fr;
    gap: 28px;
    align-items: start;
}

.detect-info-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.22);
}

.detect-badge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.16);
    color: #c7d2fe;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(129, 140, 248, 0.2);
    margin-bottom: 16px;
}

.detect-info-panel h1 {
    margin: 0 0 16px 0;
    font-size: 48px;
    line-height: 1.05;
    letter-spacing: -1.2px;
    color: #f8fafc;
}

.detect-info-panel p {
    margin: 0;
    font-size: 16px;
    line-height: 1.8;
    color: #cbd5e1;
}

.detect-points {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 26px;
}

.detect-point-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    padding: 18px;
}

.detect-point-card strong {
    display: block;
    font-size: 15px;
    color: #f8fafc;
    margin-bottom: 6px;
}

.detect-point-card span {
    font-size: 14px;
    color: #94a3b8;
}

.detect-form-panel {
    position: sticky;
    top: 28px;
}

.form-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.22);
}

.form-card h2 {
    margin: 0 0 18px 0;
    color: #f8fafc;
    font-size: 30px;
    letter-spacing: -0.7px;
}

.form-card label {
    display: block;
    text-align: left;
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
}

/* textarea */
.form-card textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    outline: none;
    font-size: 14px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.7);
    transition: 0.25s ease;
    resize: none;
}

.form-card textarea:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

/* updated select */
.form-card select {
    width: 100%;
    padding: 13px 14px;
    padding-right: 44px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    outline: none;
    font-size: 14px;
    color: #f8fafc;
    background-color: rgba(15, 23, 42, 0.82);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: 0.25s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.form-card select:hover {
    border-color: rgba(129, 140, 248, 0.45);
    background-color: rgba(15, 23, 42, 0.9);
}

.form-card select:focus {
    border-color: #818cf8;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.12),
        0 0 18px rgba(99, 102, 241, 0.12);
    background-color: rgba(15, 23, 42, 0.95);
}

.form-card select option {
    background: #0f172a;
    color: #f8fafc;
}

.form-card button {
    width: 100%;
    padding: 13px;
    margin-top: 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.22);
}

.form-card button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 18px rgba(99, 102, 241, 0.55),
        0 0 34px rgba(37, 99, 235, 0.28),
        0 18px 34px rgba(79, 70, 229, 0.3);
}

.form-card button:active {
    transform: scale(0.98);
}

.result {
    margin-top: 20px;
    padding: 16px;
    border-radius: 18px;
    animation: fadeIn 0.5s ease-in-out;
    transition: 0.3s;
    text-align: center;
}

.spam {
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.35), rgba(0, 0, 0, 0.4));
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.6);
    box-shadow:
        0 0 25px rgba(248, 113, 113, 0.45),
        inset 0 0 15px rgba(248, 113, 113, 0.2);
}

.ham {
    background: rgba(20, 83, 45, 0.16);
    color: #bbf7d0;
    border: 1px solid rgba(74, 222, 128, 0.2);
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.1);
}

.extra-info {
    margin-top: 12px;
    font-size: 14px;
}

.warning {
    color: #fb7185;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(248, 113, 113, 0.5);
}

.safe {
    color: #4ade80;
    font-weight: 500;
}

.risk {
    margin-top: 10px;
    font-weight: 600;
    color: #eab308;
}

.loader {
    margin: 20px auto;
    border: 4px solid rgba(99, 102, 241, 0.15);
    border-top: 4px solid #818cf8;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    animation: spin 1s linear infinite;
}

.hidden {
    display: none;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

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

/* responsive */
@media (max-width: 980px) {
    .hero-saas,
    .feature-strip,
    .workflow-grid,
    .detect-layout {
        grid-template-columns: 1fr;
    }

    .hero-copy h1 {
        font-size: 46px;
    }

    .detect-info-panel h1 {
        font-size: 38px;
    }

    .detect-form-panel {
        position: static;
    }
}

@media (max-width: 700px) {
    .landing-shell,
    .detect-shell {
        width: 94%;
        padding-top: 20px;
    }

    .topbar,
    .detect-topbar {
        flex-direction: row;
        align-items: center;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .topnav {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        width: min(260px, 100%);
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
        border: 1px solid rgba(148, 163, 184, 0.16);
        box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
        z-index: 50;
    }

    .topnav.nav-open {
        display: flex;
    }

    .topnav a {
        margin-left: 0;
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
    }

    .topnav .nav-cta {
        text-align: center;
    }

    .hero-copy h1 {
        font-size: 36px;
    }

    .hero-actions,
    .hero-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-cta,
    .secondary-cta,
    .nav-cta,
    .detect-home-link {
        width: 100%;
        text-align: center;
    }

    .secondary-cta {
        margin-left: 0;
    }

    .workflow-section,
    .preview-card-main,
    .saas-feature-card,
    .form-card,
    .detect-info-panel {
        padding: 20px;
    }

    .form-card h2 {
        font-size: 26px;
    }

    .detect-info-panel h1 {
        font-size: 32px;
    }

    .detect-points {
        grid-template-columns: 1fr;
    }

    .spotlight {
        width: 180px;
        height: 180px;
    }
}
