/* 迁自 style.css · 系统页（#system-page、指令列表等） */
/* 系统页面样式 */
#system-page {
    background: #f5f5f5;
}

/* 系统头部样式 */
.system-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(247, 247, 247, 0.55);
    background-color: rgba(247, 247, 247, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.system-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
    text-align: center;
}

.system-header-buttons {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.system-header-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.system-header-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* 返回箭头样式 */
.back-arrow {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    display: inline-block;
    line-height: 1;
}

/* 系统内容样式 */
.system-content {
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.system-content::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* 添加系统命令模态框样式 */
.add-command-modal {
    width: 500px;
    height: 400px;
    margin: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.add-command-modal .modal-header {
    flex-shrink: 0;
}

.add-command-modal .modal-body {
    flex: 1;
    overflow-y: auto;
}

.add-command-modal .modal-footer {
    flex-shrink: 0;
}

/* 指令列表样式 */
.command-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.command-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.command-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.command-info {
    flex: 1;
}

.command-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.command-description {
    font-size: 14px;
    color: #666;
}

.command-actions {
    display: flex;
    gap: 8px;
}

.command-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.command-btn.edit {
    background: #007aff;
    color: white;
}

.command-btn.delete {
    background: #ff3b30;
    color: white;
}

.command-btn:hover {
    opacity: 0.8;
}

/* 空状态样式 */
.command-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.command-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.command-empty-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.command-empty-hint {
    font-size: 14px;
    color: #bbb;
}

/* 夜间模式 · 系统页按钮可见性 */
html[data-appearance="dark"] #system-page {
    background: linear-gradient(135deg, #111214 0%, #1c1c1e 100%);
}

html[data-appearance="dark"] .system-header h1 {
    color: var(--dark-btn-text, #f5f5f7);
}

html[data-appearance="dark"] .command-item {
    background: rgba(44, 44, 46, 0.94);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

html[data-appearance="dark"] .command-name {
    color: var(--dark-btn-text, #f5f5f7);
}

html[data-appearance="dark"] .command-description {
    color: var(--dark-btn-text-soft, rgba(235, 235, 245, 0.78));
}

html[data-appearance="dark"] .command-btn.edit {
    background: var(--dark-btn-primary-solid, #0a84ff);
    color: #fff;
}

html[data-appearance="dark"] .command-btn.delete {
    background: rgba(255, 69, 58, 0.85);
    color: #fff;
}

html[data-appearance="dark"] .command-empty,
html[data-appearance="dark"] .command-empty-hint {
    color: var(--dark-btn-text-soft, rgba(235, 235, 245, 0.72));
}

/* ── 系统页 · 指令列表与模态（迁自 style.css 的剩余段落） ── */
.system-section {
    margin-bottom: 24px;
}

.system-section h2 {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.command-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.command-item-tappable {
    cursor: pointer;
}

.command-status {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.command-status.active {
    color: #07c160;
}

.command-btn.activate {
    background: #07c160;
    color: #fff;
}

.command-btn.deactivate {
    background: #ff9500;
    color: #fff;
}

.command-bundled-hint {
    font-size: 12px;
    color: #999;
    padding: 6px 8px;
    white-space: nowrap;
}

.add-command-modal {
    width: min(500px, calc(100vw - 32px));
    max-height: min(400px, calc(100vh - 80px));
}

.add-command-footer {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.add-command-footer .btn-cancel,
.add-command-footer .btn-save {
    flex: 1;
    max-width: 160px;
    min-height: 44px;
}

.command-content-group .resizeable-textarea {
    min-height: 120px;
    resize: vertical;
}

html[data-appearance="dark"] .system-section h2 {
    color: var(--dark-btn-text, #f5f5f7);
}

html[data-appearance="dark"] .command-hint,
html[data-appearance="dark"] .command-bundled-hint {
    color: var(--dark-btn-text-soft, rgba(235, 235, 245, 0.72));
}

html[data-appearance="dark"] .command-status {
    color: rgba(200, 200, 210, 0.72);
}

html[data-appearance="dark"] .command-status.active {
    color: #34d399;
}

html[data-appearance="dark"] .command-btn.activate {
    background: #30d158;
    color: #09120c;
}

html[data-appearance="dark"] .command-btn.deactivate {
    background: #ff9f0a;
    color: #1a1200;
}

html[data-appearance="dark"] .add-command-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}
