/* Inheriting your color palette */
:root {
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --text-main: #e5e5e5;
    --text-muted: #a3a3a3;
    --accent-green: #4caf50;
    --accent-red: #f44336;
    --border-light: rgba(255, 255, 255, 0.1);
    --card-glass: rgba(30, 30, 30, 0.7);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    display: flex;
    height: 100vh;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* Updated Navbar Styles */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.9), transparent);
}

.nav-brand {
    font-size: 0.8rem;
    font-weight: 700; /* Ensuring it's bold like the main page */
    letter-spacing: 0.2rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.dot-accent {
    color: var(--accent-green);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-light);
}

/* Add these to your :root */
:root {
    --accent-green: #4caf50;
    --text-muted: #a3a3a3;
    --border-light: rgba(255, 255, 255, 0.1);
    --card-glass: rgba(30, 30, 30, 0.7);
}

/* Updated Navbar Styles */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.9), transparent);
}

.nav-brand {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    color: var(--text-muted);
}

.dot-accent {
    color: var(--accent-green);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-light);
}

/* Adjust layout since Sidebar is gone */
.monitor-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 80px auto 0; /* Space for fixed navbar */
    padding: 20px;
    gap: 20px;
}

.node-card {
    background: var(--card-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
}

/* Main Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nodes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.node-card {
    padding: 24px;
    transition: transform 0.2s ease;
}

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

.node-identity {
    display: flex;
    gap: 15px;
    align-items: center;
}

.node-identity i {
    font-size: 1.8rem;
    color: var(--text-muted);
}

.node-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.stat-value {
    font-family: monospace;
    color: var(--text-main);
}

/* Sidebar Time Styling */
.system-time {
    margin-top: auto;
    /* Pushes to bottom of sidebar */
    padding: 15px;
    border-top: 1px solid var(--border-color);
    font-family: 'Courier New', Courier, monospace;
    /* Monospace for alignment */
}

.time-meta {
    font-size: 0.6rem;
    color: var(--accent-green);
    letter-spacing: 2px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.time-main {
    display: flex;
    align-items: baseline;
    color: var(--text-main);
}

#live-clock {
    font-size: 1.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    text-shadow: 0 0 10px rgba(229, 227, 227, 0.2);
}

.time-ms {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-left: 4px;
}

.time-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* --- SELECTIVE IP PRIVACY --- */
.privacy-blur {
    filter: blur(5px);
    transition: filter 0.3s ease, color 0.3s ease, background 0.3s ease;
    cursor: help;
    user-select: none;
    padding: 0 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
}

/* Reveal only when the specific IP item is hovered */
.ctx-item:has(.privacy-blur):hover .privacy-blur {
    filter: blur(0);
    color: var(--text-main);
    background: transparent;
    user-select: text;
}

/* Subtle indicator for the other items */
.ctx-item:not(:has(.privacy-blur)) {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.ctx-item:not(:has(.privacy-blur)):hover {
    opacity: 1;
}

/* Mobile tap to reveal */
.privacy-blur:active {
    filter: blur(0);
}

/* Animations */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.online {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

.offline {
    background: var(--accent-red);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.visitor-context {
    margin-top: auto;
    padding: 15px;
    display: flex;
    justify-content: space-around;
    font-size: 0.75rem;
    color: var(--text-muted);
}