/* -- FINJUSTERAT & BALANSERAT TECH-TEMA -- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Typsnitt */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-head: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Bakgrunder & Kontraster */
    --bg-dark: #0A0F1D;         
    --bg-page: #F3F4F6;         /* Stabil, mjuk grå för perfekt kontrast mot vita kort */
    --bg-light: #F8FAFC;        
    --white: #FFFFFF;           
    
    /* Textfärger */
    --text-main: #0F172A;       
    --text-muted: #475569;      
    --text-light: #94A3B8;      

    /* Det blåa temat (Accenter) */
    --blue-primary: #38BDF8;    
    --blue-hover: #0EA5E9;      
    --blue-dark: #0284C7;       
    --blue-soft: #F0F9FF;       /* Superfräsch bakgrund för aktiva flikar */
    

    /* Alias för komponenter som använder kortnamn */
    --blue:   #0284C7;
    --teal:   #0F6E56;
    --orange: #EA580C;

    /* Gråskala */
    --gray-50:  #F8FAFC;
    --gray-500: #64748B;

    /* Statusfärger */
    --green:      #10B981;
    --green-lt:   #F0FDF4;
    --red:        #EF4444;
    --red-lt:   #FEF2F2;
    --yellow:     #F59E0B;
    --yellow-lt:  #FFFBEB;
    
    /* Kanter och skuggor */
    --border:     #E2E8F0;
    --border-md:  #CBD5E1;
    --radius-sm:  6px;
    --radius-md:  8px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    
    /* Professionella box-shadows för lyft och djup */
    --shadow-sm:  0 1px 3px 0 rgba(15, 23, 42, 0.06);
    --shadow-md:  0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg-page); 
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-dark); text-decoration: none; transition: color 0.12s; }
a:hover { color: var(--blue-hover); text-decoration: underline; }

/* -- NAVIGERING -- */
.site-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    padding: 0 40px;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
    box-shadow: var(--shadow-sm);
}
.nav-logo {
    font-family: var(--font-head);
    font-size: 19px; font-weight: 800; letter-spacing: -0.02em;
    color: var(--text-main); text-decoration: none;
}
.nav-logo span { color: var(--blue-dark); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    font-size: 14px; font-weight: 500;
    color: var(--text-muted); padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none; transition: color 0.12s, background 0.12s;
}
.nav-links a:hover { color: var(--text-main); background: var(--bg-light); }
.nav-links a.active { color: var(--blue-dark); font-weight: 600; background: var(--blue-soft); }
.nav-support {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600;
    background: var(--blue-dark); color: var(--white);
    padding: 8px 16px; border-radius: var(--radius-md);
    text-decoration: none; transition: background 0.12s;
}
.nav-support:hover { background: var(--blue-hover); text-decoration: none; }

/* -- HERO -- */
.hero {
    background: radial-gradient(circle at top, #141E33 0%, var(--bg-dark) 100%);
    padding: 80px 32px 80px;
    text-align: center;
    position: relative; overflow: hidden;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(56, 189, 248, 0.1); color: var(--blue-primary); border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 999px; padding: 6px 14px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
    text-transform: uppercase; margin-bottom: 24px;
}
.hero-badge .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--blue-primary);
    box-shadow: 0 0 8px var(--blue-primary);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
}
.hero h1 {
    font-family: var(--font-head);
    font-size: 42px; font-weight: 800; color: #fff; line-height: 1.1;
    margin-bottom: 16px; letter-spacing: -0.03em;
}
.hero h1 em { color: var(--blue-primary); font-style: normal; }
.hero-sub {
    font-size: 16px; color: #E2E8F0;
    max-width: 640px; margin: 0 auto 32px; line-height: 1.6;
}
.hero-stats {
    display: flex; gap: 40px; justify-content: center;
    flex-wrap: wrap; position: relative; z-index: 1;
}
.hero-stat strong {
    font-family: var(--font-head);
    display: block; font-size: 36px; font-weight: 700; color: var(--blue-primary); letter-spacing: -0.02em;
}
.hero-stat span { font-size: 12px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; }
.hero-divider { width: 1px; background: rgba(255,255,255,0.1); align-self: center; height: 40px; }

/* -- SEKTIONER -- */
.section { max-width: 1100px; margin: 0 auto; padding: 56px 40px; }
.section-tag {
    font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--blue-dark); margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-head);
    font-size: 28px; font-weight: 800; color: var(--text-main);
    margin-bottom: 12px; letter-spacing: -0.02em;
}
.section-body {
    font-size: 15px; color: var(--text-muted);
    line-height: 1.6; max-width: 700px; margin-bottom: 32px;
}
.divider { border: none; border-top: 1px solid var(--border); }

/* -- ATTRIBUT / FEATURE KORT -- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--blue-dark); }
.feature-icon {
    width: 42px; height: 42px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin-bottom: 16px;
}
.fi-orange { background: rgba(2, 132, 199, 0.08); color: var(--blue-dark); }
.fi-blue   { background: rgba(14, 165, 233, 0.08); color: #0EA5E9; }
.fi-teal   { background: rgba(20, 184, 166, 0.08); color: #14B8A6; }
.fi-purple { background: rgba(99, 102, 241, 0.08); color: #6366F1; }
.feature-card h3 { font-family: var(--font-head); font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* -- CONNECT BANNER -- */
.connect-banner {
    background: linear-gradient(135deg, #141E33, var(--bg-dark));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-xl);
    padding: 32px;
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 24px;
    color: #fff; margin-top: 40px;
}
.connect-banner h3 { font-family: var(--font-head); font-size: 20px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.connect-banner p  { font-size: 14px; color: var(--text-light); max-width: 400px; line-height: 1.5; }
.connect-codes     { display: flex; gap: 12px; flex-wrap: wrap; }
.connect-code {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    padding: 12px 20px; text-align: center;
}
.connect-code .label { font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-light); margin-bottom: 4px; }
.connect-code .value { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--blue-primary); }

/* -- LIVE STATUS (MÄTARKORT) -- */
.stats-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 24px 40px;
    display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
    box-shadow: var(--shadow-sm);
}
.stat-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
    gap: 16px; 
    margin: 20px 0 36px 0; 
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.stat-lbl { 
    font-size: 11px; 
    font-weight: 600; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    margin-bottom: 8px; 
}
.stat-val { 
    font-family: var(--font-head); 
    font-size: 34px; 
    font-weight: 800; 
    color: var(--text-main); 
    line-height: 1.1; 
    letter-spacing: -0.02em; 
}
.stat-val.orange { color: var(--blue-dark); }
.stat-val.green  { color: var(--green); }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-weight: 400; }

/* -- SERVER STATUS KORT (RENODLAD GRID) -- */
.server-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.server-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.server-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-md); }

.server-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-light);
}
.server-name { font-size: 15px; font-weight: 700; color: var(--text-main); }

/* Inre mätboxar för servrar */
.server-body { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1px; 
    background: var(--border); /* Skapar naturliga tunna linjer mellan fälten */
    padding: 0; 
}
.server-body > div, 
.server-body > .stat-cell { 
    background: var(--white); 
    padding: 16px 20px; 
    display: flex;
    flex-direction: column;
}
.srv-lbl { 
    font-size: 11px; 
    font-weight: 600; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}
.srv-val { 
    font-family: var(--font-head); 
    font-size: 24px; 
    font-weight: 800; 
    color: var(--text-main); 
    line-height: 1.2;
}
.srv-val.orange { color: var(--blue-dark); }

.server-foot { 
    padding: 12px 20px; 
    border-top: 1px solid var(--border); 
    font-size: 12px; 
    color: var(--text-muted); 
    display: flex; 
    justify-content: space-between; 
    background: var(--bg-light); 
    margin-top: auto;
}

/* Badges & Indikatorer */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
    padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
}
.badge-online  { background: var(--green-lt);  color: var(--green);  border: 1px solid rgba(16,185,129,0.2); }
.badge-error   { background: var(--red-lt);    color: var(--red);    border: 1px solid rgba(239,68,68,0.15); }
.badge-loading { background: var(--yellow-lt); color: var(--yellow); border: 1px solid rgba(245,158,11,0.2); }
.badge .bdot   { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-online .bdot { animation: pulse 1.8s infinite; box-shadow: 0 0 6px var(--green); }

.live-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    background: var(--white); color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 999px; padding: 6px 14px;
    box-shadow: var(--shadow-sm);
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 6px var(--red); animation: pulse 1.5s infinite; }

.error-box {
    background: var(--red-lt); border: 1px solid rgba(239,68,68,0.15);
    border-radius: var(--radius-md); padding: 14px 18px;
    font-size: 13px; color: var(--red); font-weight: 500;
}

/* -- DNS KORT (ANSLUT) -- */
.dns-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; margin-bottom: 32px; }
.dns-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); 
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.dns-icon-wrap { width: 42px; height: 42px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.dns-icon-wrap.south { background: rgba(2, 132, 199, 0.08); color: var(--blue-dark); }
.dns-icon-wrap.north { background: rgba(14, 165, 233, 0.08); color: #0EA5E9; }

.dns-host {
    font-family: var(--font-mono);
    font-size: 14px; font-weight: 600;
    color: var(--blue-dark);
    background: #F1F5F9; 
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
    margin: 16px 0 14px;
}
.copy-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-light); padding: 4px;
    border-radius: 4px; font-size: 14px;
    transition: color 0.12s;
}
.copy-btn:hover { color: var(--blue-dark); }
.dns-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
    font-size: 11px; padding: 4px 10px; border-radius: 999px;
    background: #E2E8F0; color: var(--text-muted);
    border: 1px solid var(--border); font-weight: 500;
}

/* Guidens fliksystem */
.guide-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 32px; overflow-x: auto; gap: 4px; }
.gtab {
    padding: 12px 20px; font-size: 14px; font-weight: 500;
    color: var(--text-muted); cursor: pointer;
    border-bottom: 2px solid transparent; white-space: nowrap;
    background: none; border-top: none; border-left: none; border-right: none;
    transition: all 0.12s;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.gtab:hover { color: var(--text-main); background: rgba(15, 23, 42, 0.04); }
.gtab.active { color: var(--blue-dark); border-bottom-color: var(--blue-dark); font-weight: 600; background: var(--white); }

/* Stegförklaringar */
.steps { display: flex; flex-direction: column; gap: 20px; }
.step {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.step-hdr {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-light);
}
.step-num {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--blue-soft); color: var(--blue-dark);
    font-size: 13px; font-weight: 700; font-family: var(--font-head);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step-title { font-size: 15px; font-weight: 700; color: var(--text-main); }
.step-body  { padding: 20px; font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.step-body p { margin-bottom: 12px; }
.step-body p:last-child { margin-bottom: 0; }

/* Kodblock */
.code-block {
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    padding: 16px 20px; margin: 14px 0;
    font-family: var(--font-mono); font-size: 13px;
    line-height: 1.8; color: #E2E8F0;
    overflow-x: auto; white-space: pre;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: var(--shadow-md);
}
.code-block .cmt { color: #64748B; font-style: italic; }
.code-block .key { color: #7DD3FC; }
.code-block .val { color: #34D399; }
.code-block .hl  { color: var(--blue-primary); font-weight: 600; }
.copy-code-btn {
    position: absolute; top: 10px; right: 10px;
    font-size: 11px; font-weight: 600; color: var(--text-light);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px; padding: 4px 12px;
    cursor: pointer; font-family: var(--font-sans);
    transition: all 0.12s;
}
.copy-code-btn:hover { color: #fff; background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }

/* Info & Tabeller */
.info-box {
    display: flex; align-items: flex-start; gap: 12px;
    background: rgba(2, 132, 199, 0.05); border: 1px solid rgba(2, 132, 199, 0.15);
    border-radius: var(--radius-md);
    padding: 14px 18px; margin: 14px 0;
    font-size: 13px; color: var(--blue-dark); line-height: 1.6;
}
.info-box i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.warn-box {
    display: flex; align-items: flex-start; gap: 12px;
    background: var(--yellow-lt); border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--radius-md);
    padding: 14px 18px; margin: 14px 0;
    font-size: 13px; color: #B45309; line-height: 1.6;
}
.warn-box i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.param-table, .tg-table {
    width: 100%; border-collapse: collapse; font-size: 13px; margin: 16px 0;
}
.param-table th, .tg-table th {
    text-align: left; padding: 10px 14px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    background: var(--bg-light);
}
.param-table td, .tg-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    color: var(--text-main);
}
.param-table tr:last-child td, .tg-table tr:last-child td { border-bottom: none; }
code {
    font-family: var(--font-mono); font-size: 12px;
    background: #F1F5F9; padding: 2px 6px;
    border-radius: 4px; color: #0F172A; border: 1px solid var(--border);
}
.req-badge  { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--red-lt);   color: var(--red);   border: 1px solid rgba(239,68,68,0.2); }
.opt-badge  { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg-light); color: var(--text-muted); border: 1px solid var(--border); }

/* -- SUPPORT / CTA -- */
.support-banner {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 20px;
    margin-top: 40px;
    box-shadow: var(--shadow-sm);
}
.support-banner h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--text-main); }
.support-banner p  { font-size: 14px; color: var(--text-muted); }

.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600;
    background: var(--blue-dark); color: #fff !important;
    border: none; border-radius: var(--radius-md);
    padding: 12px 24px; cursor: pointer; text-decoration: none;
    transition: background 0.15s;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--blue-hover); text-decoration: none; }

.btn-outline {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600;
    background: var(--white); color: var(--text-main);
    border: 1px solid var(--border-md); border-radius: var(--radius-md);
    padding: 12px 24px; cursor: pointer; text-decoration: none;
    transition: all 0.15s;
    box-shadow: var(--shadow-sm);
}
.btn-outline:hover { background: var(--bg-light); border-color: var(--text-muted); text-decoration: none; }

.btn-refresh {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 8px 16px;
    cursor: pointer; transition: all 0.12s;
    box-shadow: var(--shadow-sm);
}
.btn-refresh:hover { background: var(--bg-light); color: var(--text-main); border-color: var(--border-md); }
.btn-refresh.spinning i { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -- FOOTER -- */
.site-footer {
    background: #060913; color: var(--text-light);
    padding: 56px 40px; text-align: center;
    font-size: 14px; line-height: 1.8;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.site-footer .footer-logo { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 8px; letter-spacing: -0.02em; }
.site-footer .footer-logo span { color: var(--blue-primary); }
.site-footer a { color: var(--blue-primary); text-decoration: none; font-weight: 500; }
.site-footer a:hover { text-decoration: underline; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.3); margin-top: 24px; }

/* -- RESPONSIV DESIGN -- */
@media (max-width: 768px) {
    .site-nav { padding: 0 20px; height: 60px; }
    .nav-links { display: none; }
    .hero { padding: 64px 20px 64px; }
    .hero h1 { font-size: 34px; }
    .hero-stats { gap: 24px; }
    .section { padding: 40px 20px; }
    .connect-banner { padding: 24px; }
    .stats-bar { padding: 16px 20px; gap: 20px; }
    .dns-grid, .server-grid, .stat-grid { grid-template-columns: 1fr; }
}


/* Dölj alla guide-paneler som standard */
.guide-panel {
    display: none;
}

/* Visa bara den panel som är aktiv */
.guide-panel.active {
    display: block;
}

/* Valfritt: Visuell indikation på vilken menyknapp som är aktiv */
.gtab.active {
    background-color: #007bff; /* Exempel på färg */
    color: white;
}

