/* =========================
   DARK THEME (DEFAULT)
========================= */
:root {
    --bg-main:#0f172a;
    --bg-card:rgba(255,255,255,.06);

    --text-primary:#f8fafc;
    --text-secondary:#94a3b8;
    --text-muted:#64748b;

    --safe:#22c55e;
    --warning:#facc15;
    --danger:#ef4444;

    --border:rgba(255,255,255,.08);
}

/* =========================
   LIGHT MODE OVERRIDE
========================= */
body:not(.dark-mode) {
    --bg-main:#ffffff;
    --bg-card:#f8fafc;

    --text-primary:#0f172a;
    --text-secondary:#334155;
    --text-muted:#64748b;

    --border:#e2e8f0;
}
/* ===============================
   Status Colors
=============================== */

.status-safe{
    color:#22c55e;
}

.status-warning{
    color:#facc15;
}

.status-danger{
    color:#ef4444;
}

/* ===============================
   GLOBAL RESET
=============================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}


/* ===============================
   BODY (BASE LAYER)
=============================== */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #e5e7eb;
     position: relative;
    margin: 0;
    min-height: 100vh;
    
    background:
        radial-gradient(circle at 15% 20%, rgba(56,189,248,0.25), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(34,211,238,0.18), transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(99,102,241,0.18), transparent 50%),
        linear-gradient(180deg, #0f172a 0%, #111827 50%, #0b1220 100%);

    background-attachment: fixed;
    
}
header,
main,
footer,
.dashboard-layout {
    position: relative;
    z-index: 1;
}

/* =========================
   BACKGROUND LAYERS
========================= */

.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;

    background-image: url('../images/noise.png');
    background-repeat: repeat;
    opacity: 0.08;
}

/* Shared glass effect */
header,
.site-footer {
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    position: relative;
    z-index: 2;
}

/* ===============================
   HEADER (SEAMLESS)
=============================== */
header {
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    display: block;

    border-bottom: none;

    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    
}
/* soft fade instead of border line */
header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.08),
        transparent
    );
}

header h1 {
    color: #f8fafc;
    background: none;
    -webkit-text-fill-color: unset;
}


/* MAIN CONTAINER */
.topbar {
    width: 100%;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 75px;
    padding: 0 40px;
}

/* LOGO AREA (LEFT) */
.logo-header {
    display: flex;
    align-items: center;
}

/* LOGO IMAGE */
.logo-img {
    max-height: 60px; /* 75px is too big for normal nav */
    width: 100%;
}

/* NAV (RIGHT) */
.topnav {
    display: flex;
    align-items: center;
    gap: 23px;

    background: rgba(0,0,0,0.02);
    padding: 15px 24px;
    border-radius: 12px;
}

/* LINKS */
.topnav a,
.nav-btn {
    text-decoration: none;
    color: #fff;
    font-size: 15px;
    font-weight: 500;

    background: none;
    border: none;
    cursor: pointer;
}
.topnav a,
.topnav .dropdown {
    display: flex;
    align-items: center;
    justify-content: center;
}
.topnav a:hover,
.topnav .dropdown > a:hover {
    opacity: 0.7;
    transform: translateY(-1px);
    transition: 0.2s ease;
}
.icon {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: #f8fafc; /* force visible */
    stroke-width: 2;
}
/* ===============================
   MAIN LAYOUT
=============================== */
main {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 30px 0;
    gap: 30px;
    padding: 0 30px;
    align-items: flex-start;
}

.content {
    flex: 1 1 0;
    min-width: 300px;
}

.sidebar {
    flex: 0 0 250px;
    min-width: 220px;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(18px);
    border-radius: 0 8px 24px rgba(0,0,0,.15);
    padding: 24px;
    position: sticky;
    top: 30px;
    align-self: flex-start;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* ===============================
   SEARCH FORM
=============================== */
form#domainForm {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 35px;
}

form#domainForm input[type="text"] {
    flex: 1;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 15px;
    transition: all .2s ease;
}

form#domainForm input[type="text"]:focus {
    outline: none;
    border-color: rgba(255,255,255,.3);
    box-shadow: 0 0 0 3px rgba(56,189,248,0.2);
}


/* ===============================
   BUTTON
=============================== */
button {
    padding: 14px 24px;
    background: rgba(255,255,255,.14);
    color:#fff;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(56,189,248,0.35);
    transition: transform .15s ease, box-shadow .2s ease;
    backdrop-filter:blur(15px);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(56,189,248,0.55);
}

button:active {
    transform: translateY(1px);
}

/* Disabled Quick Tools Links */
.result-links.disabled {
    pointer-events: none; /* prevent click */
    opacity: 0.4;         /* gray out */
    cursor: not-allowed;
}
.donate-btn {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    background: #22c55e;
    color: white;
}

/* ===============================
   TABS
=============================== */
.tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 12px;
}

.tab {
    flex: 1;
    padding: 10px 18px;
    text-align: center;
    cursor: pointer;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    background: rgba(255,255,255,0.05);
    transition: all .2s ease;
}

.tab:hover {
    background: rgba(56,189,248,0.15);
    color: #38bdf8;
}

.tab.active {
    background: #38bdf8;
    color: #0b1220;
}

/* ===============================
   CARDS
=============================== */
.card {
    background: rgba(255,255,255,.08);
    backdrop-filter:blur(25px);
    padding: 30px;
    margin-bottom: 30px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:24px;
    box-shadow:  0 8px 24px rgba(0,0,0,.15);
    transition: transform .2s ease, box-shadow .2s ease;
    animation: fadeIn .4s ease forwards;
}

.card:hover{

    transform:
    translateY(-2px);

    box-shadow:
    0 12px 30px
    rgba(0,0,0,.18);
}

.card h3 {
    color: #38bdf8;
    margin-bottom: 18px;
}

/* ===============================
   LISTS
=============================== */
ul {
    padding-left: 20px;
    line-height: 1.8;
}

.raw {
    color: #22d3ee;
    word-break: break-word;
}

/* ===============================
   SIDEBAR LINKS
=============================== */
.sidebar h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: .6;
    margin-bottom: 18px;
}

.sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 14px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.04);
    transition: all .2s ease;
}

.sidebar a:hover {
    background: rgba(56,189,248,0.15);
    transform: translateX(4px);
}

/* ===============================
   CLOCK CARD (UPGRADED SAFE)
=============================== */

.clock-card {
    background: linear-gradient(135deg, rgba(56,189,248,0.08), rgba(34,211,238,0.05));
    border: 1px solid rgba(56,189,248,0.15);
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: inset 0 0 20px rgba(56,189,248,0.05);
}

/* SECTION TITLE */
.clock-section-title {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 1px;
    opacity: 1;
    margin-top: 10px;
}

/* TIME */
.clock-time {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #38bdf8;
    margin: 4px 0;
}

/* DAY + DATE */
.clock-text {
    font-size: 13px;
    opacity: .75;
}

/* ===============================
   TOGGLE SWITCH (SAFE VERSION)
=============================== */

.clock-switch {
    margin-top: 15px;
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.clock-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.clock-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #334155;
    transition: .3s;
    border-radius: 34px;
}

.clock-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: #22d3ee;
    border-radius: 50%;
    transition: .3s;
}

.clock-switch input:checked + .clock-slider {
    background-color: #38bdf8;
}

.clock-switch input:checked + .clock-slider:before {
    transform: translateX(22px);
}
/* ===============================
   FOOTER (SEAMLESS)
=============================== */
.site-footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 22px 6%;

    border-top: none; /* remove harsh line */
    position: relative;

    color: #94a3b8;
    font-size: .9rem;
}

/* soft fade top edge */
.site-footer::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.08),
        transparent
    );
}

.footer-left {
    font-weight: 500;
}

.footer-center {
    opacity: .75;
    letter-spacing: .03em;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-right a {
    color: #94a3b8;
    text-decoration: none;
    transition: .25s ease;
}

.footer-right a:hover {
    color: #38bdf8;
}

/* ===============================
   MOBILE
=============================== */
@media (max-width: 900px) {
    .site-footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 18px;
    }
}
/* ===============================
   ANIMATION
=============================== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

/* ===============================
   RESPONSIVE
=============================== */
@media (max-width: 900px) {
    main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: auto;
    }

    form#domainForm {
        flex-direction: column;
    }

    form#domainForm input,
    form#domainForm button {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
}
}
/* Wrap long text inside Security Analysis */
#persistentSecurityCard .card ul li,
#persistentSecurityCard .card ul li ul li {
    word-break: break-word;   /* Wrap long words */
    overflow-wrap: anywhere;  /* Also break anywhere if needed */
    white-space: normal;      /* Prevent horizontal scrolling */
}



/* ===============================
 ===== ABOUT OVERLAY =====
=============================== */

#aboutOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.about-card {
    background: var(--bg-card);
    border-radius: 26px;
    padding: 35px;
    max-width: 600px;
    width: 90%;
    color: #e5e7eb;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    animation: fadeIn .4s ease;
    position: relative;
}

.about-card h2 {
    color: #38bdf8;
    margin-bottom: 15px;
}

.about-card p {
    margin-bottom: 15px;
    line-height: 1.6;
}

#closeAbout {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.7;
}

#closeAbout:hover {
    opacity: 1;
}
.about-logo {
    display: block;
    margin: 0 auto 20px auto;
    max-height: 260px; /* bigger */
    width: 60%;

}
@media (max-width: 900px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .learn-jargon {
        width: 100%;
    }
}

/* ====================================
   HTTPS FIX MODAL
==================================== */

.fix-modal{
    display:none;
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.7);
    backdrop-filter:blur(8px);

    justify-content:center;
    align-items:center;

    z-index:99999;
}

.fix-modal-content{

    width:90%;
    max-width:520px;

    background:#0f172a;

    border:1px solid rgba(255,255,255,.08);

    border-radius:18px;

    padding:24px;

    position:relative;

    box-shadow:
    0 20px 60px rgba(0,0,0,.5);
}

.fix-close-btn{

    position:absolute;

    top:12px;
    right:14px;

    border:none;
    background:none;

    color:#fff;

    font-size:22px;

    cursor:pointer;
}

.fix-title{

    color:#38bdf8;

    margin-bottom:16px;
}

.fix-tabs{

    display:flex;

    gap:10px;

    margin-bottom:16px;
}

.fix-tab{

    flex:1;

    height:42px;

    border:none;

    border-radius:10px;

    cursor:pointer;

    background:#1e293b;

    color:#fff;

    opacity:.6;
    
    transition:.2s;
}

.fix-tab.active{

    opacity:1;

    background:#22c55e;
    
    color:#fff;
}

.fix-code{

    background:#020617;

    border-radius:12px;

    padding:16px;

    overflow:auto;

    font-size:13px;

    max-height:280px;
}

.fix-copy-btn{

    width:100%;

    margin-top:14px;

    height:44px;

    border:none;

    border-radius:10px;

    cursor:pointer;

    font-weight:700;

    background:#22c55e;

    color:#fff;
}

.fix-guide{

    text-align:center;

    margin-top:12px;
}

.fix-guide a{

    color:#38bdf8;

    text-decoration:underline;
}