:root {
    --bg: #0a0a0a;
    --bg-card: #111111;
    --bg-input: #1a1a1a;
    --bg-log: #000000;
    --text: #d0d0d0;
    --text-muted: #666666;
    --accent: #00ff41;
    --green: #00ff41;
    --yellow: #f0c000;
    --red: #ff4444;
    --blue: #5588ff;
    --border: #222222;
}

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

body {
    font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: 12px;
}

/* === Title bar === */
header {
    background: var(--bg-card);
    padding: 4px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--accent);
    flex-shrink: 0;
    font-size: 12px;
}

header h1 {
    font-size: 12px;
    color: var(--accent);
    font-weight: normal;
}

header h1::before {
    content: "> ";
    color: var(--text-muted);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.auto-refresh input {
    cursor: pointer;
}

#refreshInterval {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 1px 6px;
    font-size: 11px;
    font-family: inherit;
}

/* === Controls bar === */
.controls {
    background: var(--bg-card);
    padding: 4px 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-group label {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

select, input[type="text"] {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 2px 6px;
    font-size: 11px;
    font-family: inherit;
    outline: none;
}

select:hover, input[type="text"]:hover {
    border-color: var(--accent);
}

select:focus, input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: none;
}

#filterInput {
    width: 180px;
}

.control-buttons {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.btn {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 2px 10px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: none;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--accent);
    background: var(--bg-input);
    color: var(--accent);
}

.btn-copy:hover {
    color: var(--green);
    border-color: var(--green);
    background: var(--bg-input);
}

.btn-clear:hover {
    color: var(--yellow);
    border-color: var(--yellow);
    background: var(--bg-input);
}

/* === Status bar === */
.status-bar {
    background: var(--bg-card);
    padding: 2px 10px;
    display: flex;
    gap: 15px;
    font-size: 10px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    font-family: inherit;
}

#errorInfo {
    color: var(--red);
}

/* === Log output === */
.log-container {
    flex: 1;
    overflow: auto;
    background: var(--bg-log);
    padding: 0;
}

.log-content {
    font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.15;
    padding: 4px 8px;
    white-space: pre-wrap;
    word-break: break-word;
    color: #c0c0c0;
}

.log-content .log-line {
    display: block;
    padding: 0;
}

.log-content .log-line:hover {
    background: rgba(0, 255, 65, 0.08);
}

.log-content .log-line.error {
    color: var(--red);
}

.log-content .log-line.warning {
    color: var(--yellow);
}

.log-content .log-line.info {
    color: var(--blue);
}

.log-content .log-line.success {
    color: var(--green);
}

.log-content .log-line .line-number {
    color: #333333;
    margin-right: 8px;
    user-select: none;
    display: inline-block;
    width: 32px;
    text-align: right;
    font-size: 11px;
}

.log-content .log-line .timestamp {
    color: #555555;
}

/* === Toast === */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-card);
    color: var(--green);
    border: 1px solid var(--green);
    padding: 6px 20px;
    border-radius: 0;
    font-size: 11px;
    font-family: inherit;
    font-weight: normal;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    color: var(--red);
    border-color: var(--red);
}

/* === Scrollbar (thin, terminal-like) === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-log);
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* === Responsive === */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    .control-buttons {
        margin-left: 0;
        justify-content: center;
    }
    #filterInput {
        width: 100%;
    }
    .header-info {
        flex-wrap: wrap;
        gap: 6px;
    }
}
