:root {
    --bg-dark: #050505;
    --bg-panel: #111111;
    --border-color: #333;
    --text-main: #eee;
    --text-muted: #888;

    /* 顏色定義 - 兔兔雲儲藍色系 */
    --accent-cyan: #69c0ff;
    /* 淺藍色 (ID Tag) */
    --accent-green: #1e90ff;
    /* 兔兔藍 (表單框線/按鈕 - 原本的綠色位) */
    --accent-red: #ff4757;
    /* 危險紅 (刪除) */
    --btn-gray: #444;
    /* 編輯按鈕背景 */
}

body.matrix-admin {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================== Header ================== */
.matrix-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #222;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    /* font-family: 'JetBrains Mono', monospace; */
    /* 齒輪 icon 不需要 monospace */
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

/* ================== Layout ================== */
.matrix-container {
    flex: 1;
    display: grid;
    grid-template-columns: 350px 1fr;
    /* 左側固定，右側自適應 */
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.panel-icon {
    font-size: 1.2rem;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ================== Left Panel (Node List) ================== */
.node-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.node-card {
    background: #181818;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.node-card:hover {
    background: #202020;
}

.node-card:nth-child(1) {
    border-left-color: var(--accent-cyan);
}

.node-card:nth-child(n+2) {
    border-left-color: rgba(255, 255, 255, 0.2);
}

.node-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.node-id-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-cyan);
    /* 淺藍色文字 */
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
}

.node-name {
    font-size: 0.85rem;
    color: #ccc;
    margin-left: 2px;
}

.node-actions {
    display: flex;
    gap: 6px;
}

.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: filter 0.2s;
}

.btn-lock {
    background: var(--accent-green);
    color: #fff;
}

/* 鎖頭背景改為藍色，文字改為白色比較清楚 */
.btn-edit {
    background: var(--btn-gray);
    color: #fff;
}

.btn-delete {
    background: var(--accent-red);
    color: #fff;
}

.btn-action:hover {
    filter: brightness(1.2);
}

/* ================== Right Panel (Form) ================== */
.node-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row.two-col>* {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.row-center {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.row-center label {
    white-space: nowrap;
    color: #aaa;
}

.row-center select {
    flex: 1;
}


/* Input Styles */
.input-dark,
.select-dark {
    background: transparent;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px 12px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.input-dark:focus,
.select-dark:focus {
    border-color: var(--accent-green);
}

/* Input with Label Box */
.input-with-label {
    border: 1px solid var(--accent-green);
    /* 藍色框線 */
    background: rgba(30, 144, 255, 0.05);
    /* 藍色半透明背景 */
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-with-label label {
    font-size: 0.8rem;
    color: #aaa;
}

.input-with-label input {
    border: none;
    background: transparent;
    padding: 5px 0;
    color: white;
    font-size: 1rem;
    border-bottom: 1px solid #444;
}

.input-with-label input:focus {
    border-bottom-color: var(--accent-green);
}

/* Info Box */
.info-box {
    border: 1px solid var(--accent-green);
    background: rgba(30, 144, 255, 0.05);
    /* 藍色半透明背景 */
    padding: 10px;
    border-radius: 6px;
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    color: #bbb;
    align-items: flex-start;
}

.info-icon {
    font-size: 1rem;
}

.info-box p {
    margin: 0;
    line-height: 1.4;
}

.highlight {
    color: var(--accent-green);
    font-weight: 600;
}

/* Buttons */
.btn-bonus {
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent-green);
    color: #aaa;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-bonus:hover {
    background: rgba(30, 144, 255, 0.1);
    /* 藍色 hover */
    color: var(--accent-green);
}

.btn-create {
    width: 100%;
    background: transparent;
    border: 1px solid #fff;
    /* 白色框 */
    color: white;
    padding: 10px;
    border-radius: 20px;
    /* 圓角更明顯 */
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-create:hover {
    background: white;
    color: black;
}

.btn-return {
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    /* 淺藍色框 */
    color: var(--accent-cyan);
    padding: 10px;
    border-radius: 20px;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
    transition: all 0.2s;
}

.btn-return:hover {
    background: var(--accent-cyan);
    color: #000;
}