@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   Variables & Theme Setup
   ========================================================================== */
:root {
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Elegant corporate dark palette */
    --bg-main: #0b1220; /* Deep blue background */
    --bg-card: #111827; /* Solid dark charcoal panels */
    --border-card: #1e293b; /* Clean, thin borders */
    --border-card-hover: #334155;
    
    /* Brand Colors */
    --color-primary: #1e3a5f;          /* Steel Blue */
    --color-primary-glow: rgba(30, 58, 95, 0.20);
    --color-secondary: #0f172a;        /* Slate dark secondary */
    --color-accent: #d4a64a;           /* Gold corporate from Edesa logo */
    --color-text-main: #f8fafc;        /* Soft White */
    --color-text-muted: #94a3b8;       /* Slate muted gray */
    
    /* Status Colors */
    --color-success: #10b981;          /* Emerald Active */
    --color-success-glow: rgba(16, 185, 129, 0.15);
    --color-warning: #f59e0b;          /* Amber Alert */
    --color-danger: #ef4444;           /* Red Failure */
    
    /* Layout Constants */
    --border-radius: 8px; /* Clean, modern square-ish borders like AWS/Azure */
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 0% 50%, rgba(212, 166, 74, 0.02) 0%, transparent 40%), /* Subtle gold glow on the left */
        linear-gradient(to right, #0b1220 30%, rgba(11, 18, 32, 0.98) 55%, rgba(11, 18, 32, 0.95) 80%, rgba(11, 18, 32, 0.85) 100%), /* Dark gradient overlay to blend real photo on the right */
        url('../images/fondo.jpg'); /* Sourced datacenter photograph on the right */
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--color-text-main);
    font-family: var(--font-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    flex-grow: 1;
    padding: 3rem 0;
}

/* Header & Navigation */
header {
    background: rgba(7, 11, 19, 0.95);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--border-card);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.brand-logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: var(--transition-smooth);
}

.brand-logo-img:hover {
    transform: scale(1.03);
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
}

.brand-text span {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--color-text-main);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    text-align: center;
    padding: 4rem 0 3rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #ffffff 60%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    background: none;
    -webkit-text-fill-color: var(--color-accent);
    color: var(--color-accent);
}

.hero p {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Buttons & CTAs
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #0b1220;
    border: 1px solid var(--color-accent);
}

.btn-primary:hover {
    background-color: #c5973b;
    border-color: #c5973b;
    color: #0b1220;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 166, 74, 0.2);
}

.btn-secondary {
    background-color: var(--color-primary);
    color: var(--color-text-main);
    border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: #254a75;
    border-color: #254a75;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-card);
    color: var(--color-text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-text-muted);
    transform: translateY(-2px);
}

/* ==========================================================================
   Cards & Glassmorphism
   ========================================================================== */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--border-radius);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 2rem;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--border-card-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Quick Access Cards Section */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4.5rem;
}

.quick-card {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Subtle line indicators for cards */
.quick-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    opacity: 0.9;
}

#card-cpanel::before {
    background: var(--color-accent);
}

#card-webmail::before {
    background: var(--color-primary);
}

#card-status::before {
    background: var(--color-success);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--color-accent);
}

.quick-card:nth-child(2) .card-icon {
    color: var(--color-primary);
}

.quick-card:nth-child(3) .card-icon {
    color: var(--color-success);
}

.quick-card h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.quick-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.quick-card .btn {
    width: 100%;
}

/* ==========================================================================
   Public Health / Status Indicators
   ========================================================================== */
.public-status-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--border-radius);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 4.5rem;
}

.status-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-success);
    box-shadow: 0 0 10px var(--color-success-glow);
    display: inline-block;
}

.pulse {
    animation: glow-pulse 2s infinite ease-in-out;
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 4px var(--color-success-glow);
        transform: scale(0.95);
    }
    50% {
        box-shadow: 0 0 12px var(--color-success);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 4px var(--color-success-glow);
        transform: scale(0.95);
    }
}

.status-summary p {
    font-weight: 600;
    font-size: 0.95rem;
}

.status-metrics-row {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.status-metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.status-metric .label {
    color: var(--color-text-main);
    font-weight: 500;
}

/* ==========================================================================
   Sections - Infrastructure & Corporate Features
   ========================================================================== */
.section-title-wrapper {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-container {
    margin-bottom: 5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: rgba(13, 18, 30, 0.25);
    border: 1px solid var(--border-card);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    border-color: var(--border-card-hover);
    background: rgba(13, 18, 30, 0.4);
}

.feature-icon-wrapper {
    color: var(--color-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.feature-card:nth-child(even) .feature-icon-wrapper {
    color: var(--color-secondary);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   Protected Login Area
   ========================================================================== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--color-primary);
    color: var(--color-accent);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    background: rgba(7, 9, 14, 0.6);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    color: white;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 82, 255, 0.15);
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.85rem;
    padding: 0.75rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Dashboard Area
   ========================================================================== */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
}

.db-title-group h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.db-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.db-meta-item {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.db-meta-item strong {
    color: var(--color-text-main);
}

/* Incident status banner (Cloudflare style) */
.incident-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
}

.incident-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.incident-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-success);
}

.incident-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* General Layout Dashboard */
.db-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.75rem;
}

@media (max-width: 968px) {
    .db-grid {
        grid-template-columns: 1fr;
    }
}

.db-col-main {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.db-col-side {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* Visual Dashboard Title */
.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.75rem;
}

.panel-title i {
    color: var(--color-primary);
}

/* Resources Panel (CPU, RAM, Disk) */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.resource-card {
    background: rgba(7, 11, 19, 0.5);
    border: 1px solid var(--border-card);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    text-align: center;
}

.resource-name {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Radial Gauge Indicator CSS */
.gauge-container {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 0.75rem auto;
}

.gauge-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 8;
}

.gauge-bar {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 8;
    stroke-dasharray: 283; /* 2 * pi * 45 */
    stroke-dashoffset: 283;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.ram-bar {
    stroke: #3b82f6;
}

.disk-bar {
    stroke: var(--color-success);
}

.gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    font-weight: 700;
}

.resource-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Linear Progress Bar */
.stat-progress-section {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.progress-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    width: 0%;
    transition: width 1s ease-out;
}

.progress-bar-fill.violet {
    background: #3b82f6;
}

/* Active Services status grid */
.services-status-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.service-status-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-meta h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.service-meta span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.service-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.service-status-indicator.online {
    color: var(--color-success);
}

.service-status-indicator.offline {
    color: var(--color-danger);
}

.service-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-success);
}

.service-status-indicator.offline .service-status-dot {
    background-color: var(--color-danger);
}

.service-status-dot.warning {
    background-color: var(--color-warning);
}

/* Email Infrastructure Section */
.email-infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.email-check-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.email-check-icon {
    color: var(--color-success);
    margin-top: 0.1rem;
}

.email-check-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
}

.email-check-info p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Security list checks */
.security-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
}

.security-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.security-left i {
    color: var(--color-success);
    font-size: 1.1rem;
}

.security-name {
    font-size: 0.88rem;
    font-weight: 500;
}

.security-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
}

/* Maintenance log timeline */
.timeline {
    position: relative;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0.25rem;
    left: 4px;
    width: 2px;
    height: 90%;
    background: rgba(255, 255, 255, 0.06);
}

.timeline-event {
    position: relative;
    margin-bottom: 1.25rem;
}

.timeline-event:last-child {
    margin-bottom: 0;
}

.timeline-event::before {
    content: '';
    position: absolute;
    top: 0.35rem;
    left: -1.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-primary);
    border: 2px solid var(--bg-main);
    z-index: 10;
}

.timeline-event:nth-child(2)::before {
    background-color: var(--color-secondary);
}

.timeline-event:nth-child(3)::before {
    background-color: var(--color-success);
}

.timeline-date {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.15rem;
}

.timeline-title {
    font-size: 0.88rem;
    font-weight: 600;
}

.timeline-desc {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: #04060a;
    border-top: 1px solid var(--border-card);
    padding: 2.5rem 0;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 600;
}

.footer-logo span {
    color: var(--color-accent);
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: var(--color-text-main);
}

/* ==========================================================================
   Network Map Option 3
   ========================================================================== */
.network-map-container {
    position: relative;
    height: 300px;
    background: rgba(7, 9, 14, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-svg {
    width: 100%;
    height: 100%;
    max-height: 280px;
}

/* Map Connection Path animations */
.map-connection {
    stroke: url(#map-gradient);
    stroke-width: 1.5;
    stroke-linecap: round;
    fill: none;
    stroke-dasharray: 8 4;
    animation: flow-packets 35s linear infinite;
}

.map-connection-backup {
    stroke: rgba(212, 166, 74, 0.4);
    stroke-width: 1;
    stroke-linecap: round;
    fill: none;
    stroke-dasharray: 4 4;
    animation: flow-packets-reverse 45s linear infinite;
}

@keyframes flow-packets {
    to {
        stroke-dashoffset: -1000;
    }
}

@keyframes flow-packets-reverse {
    to {
        stroke-dashoffset: 1000;
    }
}

/* Pulsing Nodes */
.map-node {
    animation: pulse-node 3s infinite ease-in-out;
    transform-origin: center;
}

.map-node-vps {
    fill: var(--color-success);
    filter: drop-shadow(0 0 8px var(--color-success));
    animation: pulse-vps 2s infinite ease-in-out;
}

.map-node-cdn {
    fill: var(--color-primary);
    filter: drop-shadow(0 0 6px var(--color-primary));
}

.map-node-edge {
    fill: var(--color-secondary);
    filter: drop-shadow(0 0 6px var(--color-secondary));
}

@keyframes pulse-node {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.8;
    }
}

@keyframes pulse-vps {
    0% {
        r: 6;
        opacity: 0.9;
        filter: drop-shadow(0 0 4px var(--color-success));
    }
    50% {
        r: 9;
        opacity: 1;
        filter: drop-shadow(0 0 12px var(--color-success));
    }
    100% {
        r: 6;
        opacity: 0.9;
        filter: drop-shadow(0 0 4px var(--color-success));
    }
}

/* Map Label details */
.map-overlay-stats {
    position: absolute;
    bottom: 1rem;
    right: 1.25rem;
    background: rgba(13, 18, 30, 0.7);
    border: 1px solid var(--border-card);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    backdrop-filter: blur(8px);
}

.map-stat-row {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
}

.map-stat-val {
    color: var(--color-success);
    font-weight: 600;
}

/* ==========================================================================
   Mail Flow Diagram (Option 2 Visual)
   ========================================================================== */
.mail-flow-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(7, 9, 14, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.mail-flow-step {
    width: 30%;
    background: rgba(13, 18, 30, 0.4);
    border: 1px solid var(--border-card);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
}

.mail-flow-step:hover {
    border-color: var(--border-card-hover);
    transform: translateY(-2px);
}

.flow-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-card);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.flow-step-title {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: white;
}

.flow-step-desc {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.flow-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
    margin-top: 0.75rem;
}

.flow-badge.success {
    background: rgba(16, 185, 129, 0.08);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.flow-dns-preview {
    background: rgba(7, 9, 14, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-family: monospace;
    font-size: 0.68rem;
    color: var(--color-text-muted);
    word-break: break-all;
    margin-top: 0.75rem;
    text-align: left;
    max-height: 48px;
    overflow-y: auto;
    line-height: 1.3;
}

.flow-dns-preview::-webkit-scrollbar {
    width: 4px;
}
.flow-dns-preview::-webkit-scrollbar-track {
    background: transparent;
}
.flow-dns-preview::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.mail-flow-arrow {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flow-arrow-svg {
    width: 60px;
    height: 20px;
}

.arrow-path {
    stroke-dasharray: 6 4;
    animation: flow-arrow-packets 1.5s linear infinite;
}

@keyframes flow-arrow-packets {
    to {
        stroke-dashoffset: -20;
    }
}

/* ==========================================================================
   Terminal Console (Option 1 Visual)
   ========================================================================== */
.terminal-box {
    background: #04060b;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.72rem;
    color: #10b981;
    height: 180px;
    overflow-y: auto;
    line-height: 1.5;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9);
}

.terminal-line {
    margin-bottom: 0.35rem;
    word-break: break-all;
    white-space: pre-wrap;
    opacity: 0.95;
}

.terminal-line span.timestamp {
    color: var(--color-text-muted);
    margin-right: 0.5rem;
}

.terminal-line span.tag-sys {
    color: #a78bfa;
    font-weight: 600;
}

.terminal-line span.tag-sec {
    color: #3b82f6;
    font-weight: 600;
}

.terminal-line span.tag-mail {
    color: #60a5fa;
    font-weight: 600;
}

/* Custom scrollbar for terminal box */
.terminal-box::-webkit-scrollbar {
    width: 6px;
}
.terminal-box::-webkit-scrollbar-track {
    background: transparent;
}
.terminal-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

/* ==========================================================================
   Responsiveness
   ========================================================================== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .header-container {
        height: 70px;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .public-status-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    
    .status-metrics-row {
        width: 100%;
        justify-content: space-between;
        gap: 1rem;
    }

    .mail-flow-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 1rem;
    }
    
    .mail-flow-step {
        width: 100%;
    }
    
    .mail-flow-arrow {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}
