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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

#app {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
}

.status {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 12px;
}

.status.checking { background: #fff3cd; color: #856404; }
.status.online   { background: #d4edda; color: #155724; }
.status.offline  { background: #f8d7da; color: #721c24; }

/* ====== 诊断面板 ====== */

.debug-panel {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    font-size: 13px;
}

.debug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #181825;
    cursor: pointer;
    user-select: none;
}

.debug-header h3 {
    font-size: 13px;
    font-weight: 500;
    color: #a6adc8;
}

.toggle-btn {
    background: none;
    border: 1px solid #45475a;
    color: #a6adc8;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.toggle-btn:hover { background: #313244; }

.debug-body {
    padding: 12px 16px;
}

.debug-body.collapsed { display: none; }

.debug-table {
    width: 100%;
    border-collapse: collapse;
}

.debug-table td {
    padding: 4px 0;
    vertical-align: top;
}

.debug-table .label {
    color: #6c7086;
    width: 100px;
    white-space: nowrap;
}

.debug-table td:last-child {
    font-family: "SF Mono", "Consolas", monospace;
    word-break: break-all;
}

.debug-table .ok    { color: #a6e3a1; }
.debug-table .err   { color: #f38ba8; }
.debug-table .warn  { color: #f9e2af; }

/* ====== 表单 ====== */

.add-form {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.add-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.add-form input:focus {
    border-color: #4a90d9;
}

.add-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #4a90d9;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.add-form button:hover:not(:disabled) { background: #357abd; }
.add-form button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ====== 列表 ====== */

.list-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.list h2 {
    font-size: 16px;
    font-weight: 500;
    color: #888;
}

.query-info {
    font-size: 12px;
    font-family: "SF Mono", "Consolas", monospace;
    color: #aaa;
}

#todo-list {
    list-style: none;
}

#todo-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

#todo-list li .name {
    font-size: 15px;
}

#todo-list li .delete-btn {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

#todo-list li .delete-btn:hover {
    background: #fde8e8;
}

.hint {
    color: #aaa;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.hidden { display: none; }