/* Settings Styles */
:root {
    --bg-app: #f1f5f9;
    --color-sidebar: #0b2a66;
    --column-bg: rgba(255, 255, 255, 0.5);
    --card-bg: rgba(255, 255, 255, 0.9);
    
    --text-main: #1e293b;
    --text-sub: #64748b;
    
    --border-light: rgba(255, 255, 255, 0.6);
    --border-stroke: #e2e8f0;

    --accent: #1d8cf8;   /* 新图标亮蓝 */
    --accent-glow: rgba(29, 140, 248, 0.32);
    --red: #ef4444;
    --orange: #f59e0b;
    --green: #10b981;
    --blue: #3b82f6;
    --purple: #8b5cf6;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--timewhere-bg-image, url('../../shared/images/bg.jpg')) center/cover no-repeat fixed;
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.92) 0%, rgba(226, 232, 240, 0.85) 100%);
    z-index: -1;
}

/* ==================
   1. 布局 (Layout) 
   ================== */
.app-layout {
    display: flex;
    height: 100vh;
    padding: 12px;
    gap: 12px;
}

/* ==================
   2. 导航栏 (Sidebar) 
   ================== */
.sidebar {
    width: 64px;
    background-color: var(--color-sidebar);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-bottom: 32px;
}

.logo-mark {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 10px;
    object-fit: cover;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    align-items: center;
    flex: 1;
}

.nav-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    border-radius: 10px;
    transition: var(--transition);
    text-decoration: none;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
}

/* ==================
   3. 设置容器 (Main Container) 
   ================== */
.main-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow-y: auto;
}

.settings-container {
    width: 100%;
    max-width: 800px;
    background: var(--column-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-stroke);
    background: rgba(255, 255, 255, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    color: var(--text-sub);
    transition: var(--transition);
}

.back-btn:hover {
    color: var(--accent);
    transform: translateX(-2px);
}

.header h1 {
    font-size: 20px;
    font-weight: 700;
}

.save-btn {
    padding: 10px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px var(--accent-glow);
    transition: var(--transition);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--accent-glow);
}

/* Content */
.content {
    padding: 24px;
    overflow-y: auto;
    max-height: 80vh;
}

.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-group {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid white;
    overflow: hidden;
}

.setting-row {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-stroke);
    transition: var(--transition);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-label {
    font-weight: 600;
    font-size: 15px;
}

.setting-desc {
    font-size: 13px;
    color: var(--text-sub);
}

/* Controls */
select, input[type="number"], input[type="text"] {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-stroke);
    background: white;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.toggle-control {
    align-items: center;
    color: var(--text-main);
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    white-space: nowrap;
}

.toggle-control input[type="checkbox"] {
    height: 18px;
    width: 18px;
}

.setting-inline-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.inline-link-control {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.link-setting-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
}

.link-setting-row .setting-info {
    max-width: 720px;
}

.inline-link-control input[type="url"] {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-stroke);
    background: white;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.compact-status-row {
    padding-top: 10px;
    padding-bottom: 10px;
}

.google-sync-status {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
}

.google-sync-status[data-status="connected"] {
    color: #047857;
    background: #d1fae5;
}

.google-sync-status[data-status="syncing"],
.google-sync-status[data-status="queued"],
.google-sync-status[data-status="retry"],
.google-sync-status[data-status="conflict"] {
    color: #92400e;
    background: #fef3c7;
}

.google-sync-status[data-status="failed"],
.google-sync-status[data-status="not_configured"] {
    color: #991b1b;
    background: #fee2e2;
}

.google-sync-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    overflow: visible;
}

.google-sync-card {
    padding: 14px 16px;
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.74);
}

.google-sync-recovery-card {
    border-color: rgba(37, 99, 235, 0.28);
    background: rgba(239, 246, 255, 0.82);
}

.desktop-integration-group {
    padding: 12px;
    overflow: visible;
}

.desktop-bridge-card {
    padding: 14px 16px;
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.74);
}

.desktop-bridge-card-header,
.desktop-bridge-state-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.desktop-bridge-controls {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.2fr);
    gap: 12px;
    margin-bottom: 10px;
}

.desktop-bridge-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sub);
}

.desktop-bridge-field input,
.desktop-bridge-field select {
    width: 100%;
}

.desktop-bridge-status {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
}

.desktop-bridge-status[data-status="connected"] {
    color: #047857;
    background: #d1fae5;
}

.desktop-bridge-status[data-status="waiting"] {
    color: #92400e;
    background: #fef3c7;
}

.desktop-bridge-status[data-status="failed"],
.desktop-bridge-status[data-status="not_connected"],
.desktop-bridge-status[data-status="needs_update"],
.desktop-bridge-status[data-status="rejected"] {
    color: #991b1b;
    background: #fee2e2;
}

.desktop-bridge-version {
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 700;
}

.google-sync-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.google-sync-account-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.google-sync-status-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.google-sync-state-line,
.google-sync-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text-sub);
    font-size: 13px;
}

.google-sync-account {
    max-width: min(360px, 52vw);
    padding: 6px 10px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.86);
    font-weight: 700;
    color: #1d4ed8;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.google-sync-account-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
}

.google-sync-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.google-sync-account-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.google-sync-history-card {
    background: rgba(248, 250, 252, 0.76);
}

.google-sync-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 10px;
}

.google-sync-history-item {
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.86);
}

.google-sync-history-item summary {
    cursor: pointer;
    display: grid;
    grid-template-columns: minmax(100px, 0.9fr) minmax(120px, 1fr) minmax(120px, 1.4fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    font-size: 12px;
}

.google-sync-history-status {
    font-weight: 800;
    color: var(--text-main);
}

.google-sync-history-time,
.google-sync-history-counts {
    color: var(--text-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.google-sync-history-item[data-status="failed"] .google-sync-history-status {
    color: #b91c1c;
}

.google-sync-history-item[data-status="conflict"] .google-sync-history-status,
.google-sync-history-item[data-status="conflict_remaining"] .google-sync-history-status,
.google-sync-history-item[data-status="pending_retry"] .google-sync-history-status {
    color: #b45309;
}

.google-sync-history-item[data-status="synced"] .google-sync-history-status,
.google-sync-history-item[data-status="up_to_date"] .google-sync-history-status,
.google-sync-history-item[data-status="restored"] .google-sync-history-status,
.google-sync-history-item[data-status="force_uploaded"] .google-sync-history-status,
.google-sync-history-item[data-status="resolved"] .google-sync-history-status {
    color: #047857;
}

.google-sync-history-detail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 0 12px 12px;
    font-size: 12px;
}

.google-sync-history-detail div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.google-sync-history-detail span {
    color: var(--text-sub);
}

.google-sync-history-detail strong {
    color: var(--text-main);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.google-sync-conflict-empty {
    padding: 12px 14px;
    border: 1px solid rgba(146, 64, 14, 0.22);
    border-radius: var(--radius-sm);
    background: rgba(255, 251, 235, 0.82);
}

.google-sync-danger-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.google-sync-danger-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-sub);
    margin-right: 4px;
}

.google-sync-conflict-btn {
    margin-top: 12px;
}

.google-sync-preview {
    padding: 16px 20px;
    border-top: 1px solid var(--border-stroke);
    background: rgba(248, 250, 252, 0.72);
}

.google-sync-preview h3 {
    margin-bottom: 10px;
    font-size: 15px;
}

.google-sync-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    margin: 12px 0;
}

.google-sync-preview-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.82);
}

.google-sync-conflict-row {
    align-items: start;
}

.google-sync-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.google-sync-preview-title {
    font-size: 13px;
    font-weight: 700;
}

.google-sync-preview-desc {
    font-size: 12px;
    color: var(--text-sub);
}

.google-sync-conflict-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.google-sync-conflict-side {
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-sm);
    background: rgba(248, 250, 252, 0.9);
    padding: 8px;
    min-width: 0;
}

.google-sync-conflict-side.deleted {
    background: rgba(254, 242, 242, 0.78);
}

.google-sync-conflict-side-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-sub);
    margin-bottom: 4px;
}

.google-sync-conflict-business-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    overflow-wrap: anywhere;
    margin-bottom: 6px;
}

.google-sync-conflict-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.google-sync-conflict-field {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 6px;
    font-size: 11px;
    line-height: 1.35;
}

.google-sync-conflict-field span {
    color: var(--text-sub);
}

.google-sync-conflict-field strong {
    color: var(--text-main);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.google-sync-conflict-field.changed strong {
    color: #b42318;
}

.google-sync-preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 900px) {
    .inline-link-control {
        grid-template-columns: 1fr;
        min-width: 0;
        width: 100%;
    }

    .google-sync-card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .google-sync-history-item summary,
    .google-sync-history-detail {
        grid-template-columns: 1fr;
    }

    .google-sync-preview-row,
    .google-sync-conflict-compare,
    .desktop-bridge-controls {
        grid-template-columns: 1fr;
    }
}

select:focus, input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Switch UI */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Button UI */
.action-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-stroke);
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.action-btn.danger {
    color: var(--red);
}

.action-btn.danger:hover {
    background: #fef2f2;
    border-color: var(--red);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
}

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

.toast-success {
    border-left: 4px solid var(--green);
}

.toast-error {
    border-left: 4px solid var(--red);
}

.toast-info {
    border-left: 4px solid var(--blue);
}

/* Modal Styles */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-stroke);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-sub);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-stroke);
}

.google-sync-danger-modal {
    max-width: 560px;
}

.google-sync-danger-message {
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 14px;
}

.google-sync-risk-block {
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    background: #fef2f2;
    margin-bottom: 16px;
}

.google-sync-risk-block ul {
    margin: 8px 0 0 18px;
    color: #7f1d1d;
    line-height: 1.55;
    font-size: 13px;
}

.google-sync-confirm-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-main);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.color-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--text-main);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--text-sub);
}

/* Layer toggle in settings container modal */
.layer-toggle {
    display: flex;
    gap: 8px;
}
.layer-btn {
    flex: 1;
    padding: 7px 0;
    border: 1px solid var(--border-stroke);
    background: white;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    color: var(--text-sub);
    transition: var(--transition);
}
.layer-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

/* Layer badges in container list */
.layer-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
}
.layer-study { background: #dbeafe; color: #1d4ed8; }
.layer-free  { background: #f3e8ff; color: #7c3aed; }

.init-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    max-width: 320px;
}

.init-option:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.init-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

/* Collapsible Section */
.section.collapsible {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid white;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
}

.section-header:hover {
    background: rgba(255, 255, 255, 0.95);
}

.section-header .section-title {
    margin-bottom: 0;
    cursor: pointer;
}

.expand-icon {
    color: var(--text-sub);
    transition: transform 0.3s ease;
}

.section.collapsible.expanded .expand-icon {
    transform: rotate(180deg);
}

.section.collapsible.expanded .section-header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
}

.section-content {
    background: var(--card-bg);
    border: 1px solid white;
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 24px;
}

/* Import Area */
.import-area {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-md);
    padding: 24px;
}

.import-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.import-label {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.import-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.import-divider::before,
.import-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-stroke);
}

.import-divider span {
    font-size: 12px;
    color: var(--text-sub);
}

.url-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.url-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.file-name {
    font-size: 13px;
    color: var(--green);
    font-weight: 500;
}

.import-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 16px;
}

.import-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.import-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--accent-glow);
}

.import-hint {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 12px;
    text-align: center;
}

/* Container Config */
.container-config {
    margin-top: 24px;
}

.container-config h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.container-manage-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border-stroke);
}

.container-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    transition: var(--transition);
}

.container-item:hover {
    border-color: var(--accent);
}

.container-item .container-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.container-item .container-name {
    font-weight: 600;
    font-size: 14px;
}

.container-item .container-time {
    font-size: 12px;
    color: var(--text-sub);
}

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

.container-item .container-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-sub);
    transition: var(--transition);
}

.container-item .container-actions button:hover {
    color: var(--accent);
}

.container-item .container-actions button.delete:hover {
    color: var(--red);
}

.container-item.disabled {
    opacity: 0.55;
}

.container-item.disabled .container-name {
    text-decoration: line-through;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 20px;
    transition: 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

.empty-state {
    text-align: center;
    padding: 24px;
    color: var(--text-sub);
}

.empty-state .material-symbols-outlined {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin: 0;
}

#containerEmptyState {
    display: none;
}

#containerEmptyState.show {
    display: block;
}

/* Task Config */
.task-config {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-stroke);
    border-radius: var(--radius-md);
    padding: 24px;
}

.task-config h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.config-hint {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 16px;
}
