:root {
    --bg-color: #080914;
    --text-primary: #ffffff;
    --text-secondary: #8e92a8;
    --border-color: rgba(255, 255, 255, 0.06);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-bg-hover: rgba(255, 255, 255, 0.05);
    --card-blur: 16px;
    --font-main: 'Outfit', sans-serif;
    --accent-glow: rgba(99, 102, 241, 0.15);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Gradients */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 50%),
        #05060b;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.subtitle {
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-size: 1.05rem;
    font-weight: 300;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

#update-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Switch styling */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.toggle-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3b82f6;
    border-color: #2563eb;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Section Titles */
.section-title, .category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-title i, .category-header i {
    color: #818cf8;
    width: 24px;
    height: 24px;
}

.section-title h2, .category-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Stats Section */
.stats-section {
    margin-bottom: 3.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    backdrop-filter: blur(var(--card-blur));
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
    background: var(--card-bg-hover);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(0,0,0,0.5);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-icon i {
    width: 22px;
    height: 22px;
}

.stat-icon.cpu { color: #818cf8; background: rgba(129, 140, 248, 0.1); }
.stat-icon.temp { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.stat-icon.ram { color: #34d399; background: rgba(52, 211, 153, 0.1); }
.stat-icon.disk { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.stat-icon.docker { color: #22d3ee; background: rgba(34, 211, 238, 0.1); }
.stat-icon.uptime { color: #a78bfa; background: rgba(167, 139, 250, 0.1); }

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-info p {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 0.15rem;
    color: #ffffff;
}

/* Service Category Block */
.category-block {
    margin-bottom: 3.5rem;
}

.category-header i {
    color: #c084fc;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.service-card {
    display: block;
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(var(--card-blur));
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glow Effect */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, var(--card-color), transparent 60%);
    opacity: 0.02;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover {
    background: var(--card-bg-hover);
    border-color: var(--card-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.7), 0 0 15px -5px var(--card-color);
}

.service-card:hover .card-glow {
    opacity: 0.12;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.service-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--card-color);
    transition: all 0.3s ease;
}

.service-logo i {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-logo {
    background: var(--card-color);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255,255,255,0.1);
}

.service-card:hover .service-logo i {
    transform: scale(1.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3b82f6; /* Checking status */
}

.status-dot.online {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-dot.offline {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.service-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1.25rem;
    height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.port-badge {
    display: inline-block;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.02em;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-card:hover .port-badge {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Footer & Active Stacks list */
.footer-stats {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    backdrop-filter: blur(var(--card-blur));
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-header i {
    color: #10b981;
}

.footer-header h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
}

.footer-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.badge-dot.green {
    background-color: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* Network Badge styling */
.network-badge {
    display: inline-block;
    font-size: 0.78rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.network-badge.lan {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.network-badge.vpn {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.network-badge.public {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-controls {
        align-self: stretch;
        justify-content: space-between;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .footer-stats {
        flex-direction: column;
        align-items: flex-start;
    }
}
