/* BulkVM Looking Glass — brand overrides for Hybula LG (Bootstrap 5 dark mode) */

body {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #0f0f23 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

[data-bs-theme="dark"] {
    --bs-primary:             #6366f1;
    --bs-primary-rgb:         99, 102, 241;
    --bs-body-bg:             #0f0f23;
    --bs-body-color:          #e2e8f0;
    --bs-secondary-color:     #94a3b8;
    --bs-border-color:        rgba(255,255,255,0.1);
    --bs-card-bg:             rgba(255,255,255,0.05);
    --bs-card-border-color:   rgba(255,255,255,0.1);
    --bs-link-color:          #a78bfa;
    --bs-link-hover-color:    #c4b5fd;
    --bs-code-color:          #34d399;
}

/* Cards — glassmorphism */
.card {
    background: rgba(255,255,255,0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 4px 32px rgba(0,0,0,0.4) !important;
}

.card-title {
    color: #ffffff;
}

/* Header separator */
header.border-bottom {
    border-color: rgba(255,255,255,0.1) !important;
}

/* Form controls */
.form-control,
.form-select {
    background-color: rgba(255,255,255,0.07) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #e2e8f0 !important;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255,255,255,0.1) !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2) !important;
    color: #ffffff !important;
}

.form-control[readonly] {
    color: #94a3b8 !important;
}

.input-group-text {
    background-color: rgba(99,102,241,0.15) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #a78bfa !important;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border: none !important;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #5254cc 0%, #7c3aed 100%) !important;
    box-shadow: 0 0 16px rgba(99,102,241,0.45) !important;
}

.btn-outline-secondary {
    border-color: rgba(255,255,255,0.2) !important;
    color: #94a3b8 !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.3) !important;
    color: #e2e8f0 !important;
}

/* Dropdowns */
.dropdown-menu {
    background-color: #1a1a2e !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

.dropdown-item {
    color: #e2e8f0 !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(99,102,241,0.2) !important;
    color: #ffffff !important;
}

/* Terminal output card */
#outputCard {
    background-color: #0c0c0c !important;
    border: 1px solid rgba(99,102,241,0.3) !important;
}

#outputContent {
    color: #34d399;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* iPerf command snippets */
code {
    color: #34d399 !important;
    background: rgba(52,211,153,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
}

/* Latency badge */
.input-group-text small {
    color: #34d399;
}

/* Muted labels */
.text-muted,
label.text-muted {
    color: #64748b !important;
}

/* Error alert */
.alert-danger {
    background-color: rgba(239,68,68,0.12) !important;
    border-color: rgba(239,68,68,0.3) !important;
    color: #fca5a5 !important;
}

/* Footer */
footer.border-top {
    border-color: rgba(255,255,255,0.1) !important;
    color: #475569 !important;
}

footer a {
    color: #6366f1 !important;
}

footer a:hover {
    color: #a78bfa !important;
}

/* Scrollbar */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: #0c0c0c; }
::-webkit-scrollbar-thumb  { background: #6366f1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #8b5cf6; }

/* ── Offset content below fixed navbar ─────────────────────────────────────── */
body {
    padding-top: 72px;
}

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.6rem 0;
    background: rgba(12,12,12,0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

@media (min-width: 768px) {
    .navbar { padding: 1rem 0; }
}

.navbar.scrolled {
    background: rgba(12,12,12,0.95);
}

.nav-container {
    width: 100%;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .nav-container {
        padding: 0 20px;
        max-width: 1200px;
        margin: 0 auto;
    }
}

.nav-logo { order: 1; flex-shrink: 0; }
.nav-logo img { height: 26px; width: auto; }

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    order: 2;
    flex-shrink: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

@media (min-width: 768px) {
    .mobile-menu-toggle { display: none; }
}

.nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(12,12,12,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    order: 3;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.nav-menu.nav-menu-hidden {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    visibility: hidden;
}

@media (min-width: 768px) {
    .nav-menu {
        position: static;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-top: none;
        padding: 0;
        box-shadow: none;
        flex-direction: row;
        gap: 2rem;
        align-items: center;
        text-align: left;
        width: auto;
        opacity: 1;
        transform: none;
        visibility: visible;
        pointer-events: auto;
    }
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover { color: #6366f1; }
.nav-link::after { content: none; }

.nav-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 768px) {
    .nav-badges {
        gap: 0.75rem;
        margin-left: 1rem;
        padding-left: 1rem;
        border-left: 1px solid rgba(255,255,255,0.2);
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
}

.nav-badge {
    color: #9ca3af;
    text-decoration: none;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.2s ease, border-color 0.2s ease;
    border: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
}

@media (min-width: 768px) {
    .nav-badge { padding: 0.4rem 0.85rem; font-size: 0.875rem; }
}

.nav-badge:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.25);
}

.nav-badges a:last-child {
    background: #6366f1;
    color: #ffffff;
    border-color: transparent;
    font-weight: 600;
}

.nav-badges a:last-child:hover {
    background: #5254cc;
    box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer {
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 2.5rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 576px) {
    .footer-content { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .footer-content { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

.footer-logo { height: 34px; width: auto; margin-bottom: 0.75rem; }

.footer-description {
    color: #9ca3af;
    line-height: 1.6;
    font-size: 0.875rem;
}

.footer-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 0.4rem; }

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover { color: #6366f1; }

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #6b7280;
    font-size: 0.875rem;
}

/* Hide the Hybula inner footer — attribution moved to footer-bottom */
.main-container > footer {
    display: none;
}
