:root {
    --bg-base: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --glass-blur: blur(12px);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-base);
    background-image: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.15), transparent 25%);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
}

.glass {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

h1, h2, h3, h4 { font-weight: 600; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}
.nav-brand svg { color: var(--primary); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-primary, .btn-secondary, .btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    font-size: 0.875rem;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: var(--text-main); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.2); }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.75rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}
.pulse-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.panel { border-radius: 1rem; padding: 1.5rem; margin-bottom: 2rem; }
.panel-header { margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.75rem; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid transparent;
    transition: all 0.2s;
}
.link-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.link-card.highlight { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); }
.link-card.highlight:hover { background: rgba(16, 185, 129, 0.2); border-color: var(--success); }
.link-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}
.link-icon img, .link-icon svg { width: 100%; height: 100%; object-fit: contain; border-radius: 0.5rem; }
.link-info h4 { margin: 0; font-size: 1rem; }
.link-info span { font-size: 0.75rem; color: var(--text-muted); }

.containers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem; }
.container-card {
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s ease;
}
.container-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.2); }
.c-header { display: flex; justify-content: space-between; align-items: flex-start; }
.c-title { display: flex; flex-direction: column; }
.c-name { font-size: 1.125rem; font-weight: 600; word-break: break-all; }
.c-image { font-size: 0.75rem; color: var(--text-muted); }
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.status-up { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.status-down { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.status-other { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.status-badge::before {
    content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background-color: currentColor;
}
.c-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; background: rgba(0, 0, 0, 0.2); padding: 1rem; border-radius: 0.75rem; }
.stat-box { display: flex; flex-direction: column; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-val { font-size: 1.25rem; font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.c-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.c-ports { font-size: 0.75rem; color: var(--text-muted); max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); }
.modal.active { display: flex; align-items: center; justify-content: center; }
.modal-content { width: 95%; max-width: 1400px; height: 85vh; border-radius: 1rem; display: flex; flex-direction: column; overflow: hidden; animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; background: rgba(0, 0, 0, 0.2); }
.close-btn { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: color 0.2s; }
.close-btn:hover { color: var(--text-main); }
.modal-body { flex: 1; padding: 1rem; overflow: hidden; display: flex; }
.logs-container { flex: 1; background: #000; color: #a3be8c; font-family: 'JetBrains Mono', monospace; font-size: 0.875rem; padding: 1rem; border-radius: 0.5rem; overflow-y: auto; white-space: pre-wrap; word-break: break-all; }

.login-body { display: flex; align-items: center; justify-content: center; }
.login-container { width: 100%; max-width: 400px; padding: 2rem; }
.login-container .glass-panel { background: var(--bg-panel); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--border-color); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); border-radius: 1rem; padding: 2rem; text-align: center; }
.login-container h2 { margin: 1rem 0 2rem; }
.logo { display: inline-flex; padding: 1rem; background: rgba(59, 130, 246, 0.1); border-radius: 1rem; color: var(--primary); }
.input-group { text-align: left; margin-bottom: 1.5rem; }
.input-group label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--text-muted); }
.input-group input { width: 100%; padding: 0.75rem 1rem; border-radius: 0.5rem; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.2); color: white; font-family: inherit; transition: all 0.2s; }
.input-group input:focus { outline: none; border-color: var(--primary); background: rgba(0, 0, 0, 0.3); }
.login-container button { width: 100%; padding: 0.75rem; font-size: 1rem; margin-top: 0.5rem; }
.error-msg { background: rgba(239, 68, 68, 0.1); color: var(--danger); padding: 0.75rem; border-radius: 0.5rem; margin-bottom: 1.5rem; font-size: 0.875rem; }
