:root {
    --bg: #050505;
    --panel: #111111;
    --border: #333333;
    --primary: #00ff88; /* Matrix Green */
    --danger: #ff0055;
    --warning: #ffcc00;
    --text: #e0e0e0;
    --text-muted: #888888;
    --font-mono: 'Courier New', Courier, monospace;
    --font-sans: 'Segoe UI', sans-serif;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    /*height: 100vh;
    overflow: hidden;*/
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.terminal-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.brand {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3rem;
    letter-spacing: -1px;
}

.pulse-status {
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid var(--primary);
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--primary);
}

.pulse-status.error {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(255, 0, 85, 0.05);
}

.beacon {
    width: 10px; height: 10px;
    background: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.menu a {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 0;
    font-size: 0.95rem;
    transition: 0.2s;
}

.menu a:hover, .menu a.active { color: var(--text); }
.footer-info { margin-top: auto; font-size: 0.75rem; color: var(--text-muted); opacity: 0.5; }

/* Dashboard */
.dashboard {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
}

header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: end;
}

h1 { font-weight: 300; letter-spacing: 1px; }
.last-checked { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); }

/* Grid of Cards */
.category-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
    margin-top: 2rem;
    letter-spacing: 1px;
    font-weight: 600;
}

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

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover { border-color: var(--text-muted); transform: translateY(-2px); }

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

.card h3 { font-size: 1rem; font-weight: 600; }
.card p { font-size: 0.85rem; color: var(--text-muted); }

.status-indicator {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: #222;
}

.status-indicator.up { color: var(--primary); background: rgba(0, 255, 136, 0.1); }
.status-indicator.down { color: var(--danger); background: rgba(255, 0, 85, 0.1); }
.status-indicator.loading { color: var(--warning); }

.response-time {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Probe Layout */
.probe-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 1.5rem;
    align-items: flex-start;
}

/* History Panel */
.probe-history {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    font-family: var(--font-mono);
}

.probe-history h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* History List */
.probe-history ul {
    list-style: none;
    max-height: 120px;
    overflow-y: auto;
}

.probe-history li {
    font-size: 0.75rem;
    color: var(--primary);
    padding: 4px 0;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.probe-history li:hover {
    text-decoration: underline;
}

/* Scrollbar (subtle) */
.probe-history ul::-webkit-scrollbar {
    width: 4px;
}
.probe-history ul::-webkit-scrollbar-thumb {
    background: var(--border);
}


/* Mobile */
@media (max-width: 768px) {
    /*.terminal-container { flex-direction: column; overflow: auto; }*/
    .terminal-container {
        flex-direction: column;
        height: auto;
    }
    /*.sidebar { width: 100%; height: auto; padding: 1rem; border-right: none; border-bottom: 1px solid var(--border); }
    .dashboard { padding: 1.5rem; }*/
    .sidebar {
        width: 100%;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .brand {
        margin-bottom: 1rem;
        text-align: center;
    }
    .pulse-status {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .controls-panel {
        justify-content: center;
        margin-bottom: 1rem;
    }
    .btn-scan {
        font-size: 0.9rem;
        padding: 14px;
    }

    .menu {
        display: flex;
        justify-content: space-around;
        margin-top: 1rem;
    }

    .menu a {
        padding: 6px;
        font-size: 0.8rem;
    }
    .dashboard {
        padding: 1.2rem;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    h1 {
        font-size: 1.2rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1.2rem;
    }

    .probe-form {
        flex-direction: column;
    }

    .probe-form button {
        padding: 12px;
        width: 100%;
    }
    .probe-layout {
        grid-template-columns: 1fr;
    }

    .probe-history {
        margin-top: 1rem;
    }
}

button, input {
    touch-action: manipulation;
}

/* ... Keep your existing root variables ... */

/* New Scan Button */
.btn-scan {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px;
    width: 100%;
    font-family: var(--font-mono);
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: 0.3s;
    display: flex; justify-content: center; align-items: center; gap: 10px;
}
.btn-scan:hover { background: rgba(0, 255, 136, 0.1); box-shadow: 0 0 15px rgba(0,255,136,0.2); }
.btn-scan:active { transform: scale(0.98); }

/* Auto Refresh Toggle */
.controls-panel {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 1rem; color: var(--text-muted); font-size: 0.8rem;
}

.toggle-switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333; transition: .4s; border-radius: 20px;
}
.slider:before {
    position: absolute; content: "";
    height: 14px; width: 14px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* Modal Styles */
.modal {
    display: none; position: fixed; z-index: 100;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: var(--panel);
    margin: 10% auto; padding: 2rem;
    border: 1px solid var(--primary);
    width: 90%; max-width: 500px;
    color: var(--text);
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 30px rgba(0,255,136,0.1);
}
.close-modal {
    position: absolute; top: 10px; right: 20px;
    color: var(--text-muted); font-size: 28px; font-weight: bold; cursor: pointer;
}
.close-modal:hover { color: var(--primary); }
.modal h2 { margin-bottom: 1rem; color: var(--primary); }
.modal h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; font-size: 1rem; }
.modal ol { margin-left: 1.5rem; margin-bottom: 1.5rem; color: var(--text-muted); }
.modal li { margin-bottom: 0.5rem; }
.btn-modal {
    display: inline-block; background: var(--primary); color: #000;
    padding: 10px 20px; text-decoration: none; font-weight: bold;
    border-radius: 4px; font-family: var(--font-mono);
}

/* ... Previous CSS ... */

/* Quick Probe Panel */
.quick-probe-panel {
    background: rgba(0, 255, 136, 0.03);
    border: 1px dashed var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.probe-header h3 { font-size: 1rem; color: var(--primary); margin-bottom: 0.2rem; }
.probe-header p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }

.probe-form { display: flex; gap: 10px; }

.probe-form input {
    flex: 1;
    background: #000;
    border: 1px solid var(--border);
    color: var(--primary);
    padding: 10px 15px;
    font-family: var(--font-mono);
    border-radius: 4px;
    outline: none;
}
.probe-form input:focus { border-color: var(--primary); }

.probe-form button {
    background: var(--panel);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s;
}
.probe-form button:hover { background: var(--primary); color: #000; }

.probe-result {
    margin-top: 1rem;
    padding: 10px;
    background: #000;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px;
    border-left: 3px solid transparent;
}
.probe-result.hidden { display: none; }

.probe-result.success { border-color: var(--primary); color: var(--primary); }
.probe-result.error { border-color: var(--danger); color: var(--danger); }
.probe-result.loading { border-color: var(--warning); color: var(--warning); }

