* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', sans-serif;
    color: #f0f3fc;
    padding: 1.5rem 2rem 2rem;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0f 0%, #0d1117 50%, #010409 100%);
    z-index: -2;
}
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.bg-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(76, 154, 255, 0.6);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}
@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}
.bg-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(76, 154, 255, 0.03), transparent, rgba(168, 85, 247, 0.03), transparent);
    animation: rotate 60s linear infinite;
    z-index: -1;
}
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(76, 154, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(76, 154, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
}
.dashboard {
    max-width: 98%;
    width: 100%;
    margin: 0 auto;
    padding: 80px 1rem 0;
}
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(8, 18, 30, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(64, 128, 255, 0.3);
    padding: 0.6rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.logo h1 {
    font-size: 1.7rem;
    background: linear-gradient(135deg, #fff, #4ba9ff, #8a6eff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.logo p {
    font-size: 0.7rem;
    color: #8aa3d0;
}
.nav-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.nav-btn {
    background: rgba(64, 128, 255, 0.2);
    border: 1px solid rgba(64, 128, 255, 0.4);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8ac4ff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}
.nav-btn:hover {
    background: rgba(64, 128, 255, 0.35);
    color: white;
    transform: scale(1.05);
}
#globalPinBtn.pinned {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 0 16px rgba(255, 215, 0, 0.4);
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
    animation: glow-pulse 2s ease-in-out infinite;
}
#globalPinBtn.pinned:hover {
    background: rgba(255, 215, 0, 0.25);
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 215, 0, 1), 0 0 24px rgba(255, 215, 0, 0.6);
}
#globalPinBtn .pin-empty-nav {
    color: #4a6080;
    opacity: 0.5;
}
.config-panel {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.gh-config {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.5);
    border-radius: 48px;
    padding: 0.3rem 1rem;
}
.gh-config input {
    background: #111a2a;
    border: 1px solid #2f4b7c;
    color: white;
    padding: 8px 12px;
    border-radius: 32px;
    font-size: 0.8rem;
    width: 190px;
}
.btn {
    background: rgba(30, 45, 75, 0.9);
    border: 1px solid #2e6b9e;
    border-radius: 40px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    font-size: 0.8rem;
    color: #eef5ff;
    cursor: pointer;
    transition: 0.2s;
}
.add-group-btn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.2s;
    z-index: 1000;
}
.add-group-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}
.btn-primary {
    background: linear-gradient(135deg, #1e4b9e, #0e2a6b);
    border: none;
    box-shadow: 0 2px 8px rgba(0,160,255,0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2f60c0, #143b8c);
}
.btn-danger {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border: none;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}
.grid-stack {
    background: transparent;
    overflow: hidden;
    position: relative;
}
.grid-stack-item {
    transition: all 0.2s ease;
}
.grid-stack-item-content {
    background: rgba(12, 22, 40, 0.78);
    backdrop-filter: blur(14px);
    border-radius: 28px;
    border: 1px solid rgba(64, 128, 255, 0.45);
    box-shadow: 0 12px 28px -8px rgba(0,0,0,0.5);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.grid-stack-item-content::-webkit-scrollbar {
    width: 6px;
}
.grid-stack-item-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}
.grid-stack-item-content::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
}
.grid-stack-item-content:hover {
    border-color: #6eb0ff;
    box-shadow: 0 18px 35px -12px rgba(0, 120, 255, 0.4);
    scrollbar-color: #3b6fa5 rgba(0, 0, 0, 0.2);
}
.grid-stack-item-content:hover::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
}
.grid-stack-item-content:hover::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b6fa5, #2a5a8a);
}
.grid-stack-item-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4a8dc5, #3a6a9a);
}
.group-widget {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0.9rem 1rem 1rem;
}
.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
    cursor: grab;
    background: rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 0.4rem 0.7rem;
    transition: 0.1s;
}
.group-header:active { cursor: grabbing; }

.group-header:hover .icon-btn {
    opacity: 1;
}
.group-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.group-title {
    font-weight: 800;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #ffffff, #9bc5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.tag-count {
    font-size: 0.55rem;
    background: #1f3b66;
    border-radius: 40px;
    padding: 0.15rem 0.5rem;
    font-weight: 500;
}
.group-actions {
    display: flex;
    gap: 6px;
}
.icon-btn {
    background: none;
    border: none;
    color: #b0cbff;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    opacity: 0;
}
.icon-btn:hover {
    background: rgba(255,255,255,0.12);
    color: white;
}
.icon-btn.pinned {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 0 16px rgba(255, 215, 0, 0.4);
    animation: glow-pulse 2s ease-in-out infinite;
}
.pin-empty {
    color: #6b8bb8;
    -webkit-text-stroke: 1px currentColor;
    text-stroke: 1px currentColor;
    color: transparent;
    background-color: transparent;
}
.icon-btn.pinned:hover {
    background: rgba(255, 215, 0, 0.25);
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 215, 0, 1), 0 0 24px rgba(255, 215, 0, 0.6);
}
@keyframes glow-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}
.tag-list-area {
    display: none;
}

.group-content-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.group-content-area::-webkit-scrollbar {
    width: 6px;
}

.group-content-area::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.group-content-area::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
}

.group-widget:hover .group-content-area {
    scrollbar-color: #3b6fa5 rgba(0, 0, 0, 0.2);
}
.group-widget:hover .tag-list-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
}
.group-widget:hover .tag-list-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b6fa5, #2a5a8a);
}
.group-widget:hover .tag-list-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4a8dc5, #3a6a9a);
}
.content-body::-webkit-scrollbar {
    width: 8px;
}
.content-body::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 4px;
    margin: 8px 0;
}
.content-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4c9aff, #6366f1);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
    box-shadow: 0 0 8px rgba(76, 154, 255, 0.3);
}
.content-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #60a5fa, #818cf8);
    box-shadow: 0 0 12px rgba(76, 154, 255, 0.5);
}
.content-body::-webkit-scrollbar-corner {
    background: transparent;
}
.tag-item {
    border-radius: 12px !important;
    margin-bottom: 6px;
    padding: 0.4rem 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    cursor: grab;
    background: rgba(18, 32, 55, 0.7);
    backdrop-filter: blur(4px);
    border-left: 3px solid;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.tag-item:hover {
    transform: translateX(3px);
    filter: brightness(1.05);
    border-radius: 12px;
}

.tag-item:active {
    border-radius: 12px;
    transform: translateX(3px);
    filter: brightness(0.95);
}

.tag-item:hover .action-icon {
    opacity: 1;
}

.action-icon.pin-btn.pinned {
    opacity: 1;
}
.tag-info {
    flex: 1;
    overflow: hidden;
    margin-right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tag-name {
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    color: #e8eef8;
}
.tag-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tag-url {
    display: none;
    font-size: 0.65rem;
    color: #a0bbec;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.tag-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}
.action-icon {
    background: rgba(0,0,0,0.35);
    border-radius: 30px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    border: none;
    color: #c8ddff;
    font-size: 0.62rem;
    opacity: 0;
}
.action-icon:hover {
    background: #2f5b8c;
    color: white;
    transform: scale(1.05);
}
.pin-btn.pinned {
    color: #ffbb4a;
    text-shadow: 0 0 3px #ffaa33;
}
.open-btn {
    background: #2a4d7a;
    border-radius: 30px;
    padding: 0.2rem 0.7rem;
    font-size: 0.65rem;
    border: none;
    color: white;
    cursor: pointer;
}
.add-tag-row {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    background: rgba(0,0,0,0.35);
    border-radius: 48px;
    padding: 6px 10px;
}
.add-tag-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}
.add-tag-form input {
    flex: 1;
    background: #0f1a2c;
    border: 1px solid #2f6080;
    border-radius: 40px;
    padding: 0.5rem 0.8rem;
    color: white;
    font-size: 0.7rem;
}
.add-tag-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.add-tag-btn:hover {
    background: rgba(59, 130, 246, 0.6);
    border-color: rgba(59, 130, 246, 0.8);
    color: white;
    transform: scale(1.1);
}
.small-btn {
    background: #2b5590;
    border: none;
    border-radius: 40px;
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    cursor: pointer;
    color: white;
}
.empty-tips {
    text-align: center;
    color: #7b98cf;
    font-size: 0.75rem;
    padding: 20px 0;
}
.custom-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.modal-card {
    background: linear-gradient(145deg, #16213e, #0a0f20);
    border-radius: 42px;
    width: 400px;
    max-width: 90%;
    padding: 1.8rem;
    border: 1px solid rgba(80, 160, 255, 0.6);
    box-shadow: 0 30px 50px rgba(0,0,0,0.7);
    animation: fadeUp 0.2s ease;
}
@keyframes fadeUp {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
.modal-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.3rem;
    text-align: center;
    font-weight: 700;
}
.modal-card input, .modal-card select {
    width: 100%;
    background: #0f182b;
    border: 1px solid #2c6a96;
    border-radius: 48px;
    padding: 12px 16px;
    margin-bottom: 1rem;
    color: white;
    font-size: 0.9rem;
}
.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}
.color-preview {
    width: 44px;
    height: 32px;
    border-radius: 20px;
    margin-bottom: 8px;
    border: 1px solid #aaa;
}
.color-picker-pop {
    position: fixed;
    background: #1a2742;
    border-radius: 28px;
    padding: 8px;
    display: flex;
    gap: 8px;
    z-index: 30000;
    border: 1px solid #578fff;
    box-shadow: 0 8px 20px black;
}
.color-opt {
    width: 28px;
    height: 28px;
    border-radius: 28px;
    cursor: pointer;
    border: 1px solid white;
    transition: all 0.2s;
}

.color-opt:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.color-opt.selected {
    border: 3px solid white;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3), 0 4px 12px rgba(0,0,0,0.3);
    transform: scale(1.1);
}

/* Sheet 颜色选择器专用样式 */
.sheet-edit-modal .color-opt {
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sheet-edit-modal .color-opt:hover {
    transform: scale(1.15);
    border-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sheet-edit-modal .color-opt.selected {
    border: 3px solid white;
    transform: scale(1.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
}
.toast-msg {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e334f;
    border-left: 5px solid #4c9aff;
    border-radius: 40px;
    padding: 8px 24px;
    font-size: 0.85rem;
    z-index: 50000;
    backdrop-filter: blur(10px);
}
.settings-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.settings-container {
    display: flex;
    width: 900px;
    max-width: 95%;
    height: 600px;
    max-height: 90vh;
    background: #1a1f2e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(64, 128, 255, 0.3);
}
.settings-sidebar {
    width: 180px;
    background: linear-gradient(180deg, #1a1f2e, #151a26);
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-header h2 {
    font-size: 1.1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.sidebar-menu {
    flex: 1;
    padding: 8px 0;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    color: #8aa3d0;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.menu-item:hover {
    background: rgba(64, 128, 255, 0.1);
    color: #b0cbff;
}
.menu-item.active {
    background: rgba(64, 128, 255, 0.15);
    color: #fff;
    border-left-color: #4c9aff;
}
.menu-item i {
    width: 16px;
    font-size: 0.9rem;
}
.settings-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #161b28;
}
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.2);
}
.content-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #fff;
    font-weight: 500;
}
.close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #8aa3d0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.close-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}
.content-panel {
    display: block;
}
.section {
    margin-bottom: 32px;
}
.section h4 {
    font-size: 0.9rem;
    color: #6b8bb8;
    margin-bottom: 16px;
    padding-left: 4px;
}
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 8px;
    transition: background 0.2s;
}
.setting-row:hover {
    background: rgba(64, 128, 255, 0.08);
}
.setting-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e8eef8;
    font-size: 0.85rem;
}
.setting-label i {
    color: #6eb0ff;
    font-size: 0.9rem;
}
.info-icon {
    margin-left: 8px;
    cursor: help;
    color: #8ab4f8;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.info-icon:hover {
    opacity: 1;
}
.setting-action {
    background: rgba(64, 128, 255, 0.15);
    border: 1px solid rgba(64, 128, 255, 0.3);
    border-radius: 4px;
    padding: 6px 14px;
    color: #8ac4ff;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}
.setting-action:hover {
    background: rgba(64, 128, 255, 0.25);
    color: #fff;
}
.setting-action.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: #fff;
}
.setting-action.primary:hover {
    background: linear-gradient(135deg, #4a90ff, #357ded);
}
.setting-input {
    flex: 1;
    max-width: 300px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(64, 128, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: #e8eef8;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-left: 16px;
}
.setting-input:focus {
    outline: none;
    border-color: #4c9aff;
    box-shadow: 0 0 0 3px rgba(76, 154, 255, 0.15);
    background: rgba(15, 23, 42, 1);
}
.setting-input::placeholder {
    color: #5a7090;
}
.setting-value {
    flex: 1;
    max-width: 300px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(64, 128, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: #8ac4ff;
    font-size: 0.75rem;
    font-family: 'Consolas', 'Monaco', monospace;
    margin-left: 16px;
    word-break: break-all;
}
.setting-select {
    flex: 1;
    max-width: 180px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(64, 128, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: #e8eef8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 16px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b8bb8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}
.setting-select:focus {
    outline: none;
    border-color: #4c9aff;
    box-shadow: 0 0 0 3px rgba(76, 154, 255, 0.15);
}

.setting-row-inline {
    display: flex;
    align-items: center;
}
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}
.color-input {
    width: 36px;
    height: 30px;
    border: 1px solid rgba(64, 128, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}
.color-input::-webkit-color-swatch-wrapper {
    padding: 2px;
}
.color-input::-webkit-color-swatch {
    border-radius: 4px;
    border: none;
}
.color-hex {
    width: 80px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(64, 128, 255, 0.3);
    border-radius: 6px;
    padding: 4px 8px;
    color: #4c9aff;
    font-size: 0.75rem;
    font-family: monospace;
    text-align: center;
}
.toggle-switch {
    width: 44px;
    height: 24px;
    background: #3a4a5c;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}
.toggle-switch[data-enabled="true"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.toggle-track {
    width: 100%;
    height: 100%;
    position: relative;
}
.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch[data-enabled="true"] .toggle-thumb {
    transform: translateX(20px);
}


.github-info {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    font-size: 0.75rem;
    color: #6b8bb8;
}
.github-info span {
    color: #8ac4ff;
}
.about-section {
    text-align: center;
    padding: 40px 0;
}
.about-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
}
.about-section h4 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 8px;
}
.version {
    font-size: 0.8rem;
    color: #6b8bb8;
    margin-bottom: 8px;
}
.description {
    font-size: 0.85rem;
    color: #8aa3d0;
    margin-bottom: 16px;
}
.copyright {
    font-size: 0.75rem;
    color: #5a7090;
}
.dashboard {
    max-width: 98%;
    width: 100%;
    margin: 0 auto;
    padding: 80px 1rem 0;
    position: relative;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.sheet-container {
    background: rgba(25, 35, 55, 0.6);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: center;  /* 标题居中 */
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(var(--sheet-color-rgb, 59, 130, 246), 0.25);  /* 纯色背景 */
    position: relative;
}

.sheet-name {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
    text-align: center;  /* 标题文字居中 */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 右侧颜色指示器 */
.sheet-color-indicator {
    position: absolute;
    right: 14px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sheet-grid {
    min-height: 200px;
    border-radius: 12px;
}

.sheet-grid.grid-stack {
    min-height: 200px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

/* 确保拖拽时有视觉反馈 */
.sheet-grid.grid-stack.drag-over {
    background: rgba(16, 185, 129, 0.15) !important;
    outline: 2px dashed #10b981;
}

/* 点击导航定位时的高亮效果 */
.sheet-container.sheet-highlight {
    animation: sheet-pulse-highlight 1.5s ease-out;
}

@keyframes sheet-pulse-highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Sheet 导航拖拽排序样式 */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

.sortable-drag {
    opacity: 1 !important;
    transform: rotate(3deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Sheet选择对话框样式 */
.sheet-select-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 16px 0;
    padding-right: 8px;
}

/* Sheet选择列表滚动条样式 */
.sheet-select-list::-webkit-scrollbar {
    width: 6px;
}

.sheet-select-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.sheet-select-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4c9aff, #6366f1);
    border-radius: 3px;
}

.sheet-select-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #60a5fa, #818cf8);
}

.sheet-select-list::-webkit-scrollbar-corner {
    background: transparent;
}

.sheet-select-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: rgba(30, 45, 75, 0.9);
    border-left: 5px solid;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

.sheet-select-item:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sheet-select-item span {
    font-size: 0.95rem;
    color: #dfe8ff;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 未分配分组的容器 */
.ungrouped-container {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 16px;
    padding: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ungrouped-title {
    font-weight: 500;
    font-size: 13px;
    color: #94a3b8;
    padding-left: 8px;
}

/* ========================================
   Sheet 导航栏样式
   ======================================== */
.sheet-nav-bar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 9998;
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.sheet-nav-bar.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
}

.sheet-nav-bar.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-8px);
}

/* 悬停显示模式 */
.sheet-nav-bar.hover-mode {
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
}

.sheet-nav-bar.hover-mode:hover,
.sheet-nav-bar.hover-mode.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-8px);
}

.sheet-nav-inner {
    background: rgba(12, 22, 40, 0.94);
    backdrop-filter: blur(20px);
    border-radius: 16px 0 0 16px;
    border: 1px solid rgba(64, 128, 255, 0.3);
    border-right: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.sheet-nav-inner::-webkit-scrollbar {
    display: none;
}

.sheet-add-btn {
    width: 30px;
    height: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.18);
    border: 1px dashed rgba(59, 130, 246, 0.45);
    color: #6eb0ff;
    cursor: pointer;
    transition: all 0.18s;
    font-size: 0.8rem;
}

.sheet-add-btn:hover {
    background: rgba(59, 130, 246, 0.35);
    border-color: rgba(59, 130, 246, 0.8);
    color: white;
}

.sheet-add-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.sheet-item {
    width: 30px;
    height: 70px;
    min-height: 70px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s;
    writing-mode: vertical-rl;
    text-orientation: upright;
    position: relative;
    border: 2px solid transparent;
    overflow: hidden;
}

.sheet-item:hover {
    filter: brightness(1.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.sheet-item.active {
    filter: brightness(1.3);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.sheet-item.drag-over {
    filter: brightness(1.4) saturate(1.5);
    border-color: #10b981;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}

.sheet-label {
    font-size: 0.72rem;
    color: #dfe8ff;
    font-weight: 500;
    text-align: center;
    letter-spacing: 1px;
    line-height: 1.1;
    padding: 14px 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 竖排文字，最多显示5个汉字 */
    writing-mode: vertical-rl;
    text-orientation: upright;
    height: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sheet-item:hover .sheet-label {
    color: #fff;
}

.sheet-item.active .sheet-label {
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* 拖拽时的提示 */
.sheet-drag-hint {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 99999;
    white-space: nowrap;
}

.sheet-drag-hint.visible {
    opacity: 1;
}

/* 拖拽分组到 Sheet 的样式 */
.grid-stack-item.dragging-to-sheet {
    opacity: 0.5 !important;
    filter: grayscale(30%);
}

.sheet-item.drop-ready {
    border-style: dashed;
    border-color: rgba(59, 130, 246, 0.6) !important;
    animation: pulse-drop-ready 1s infinite;
}

@keyframes pulse-drop-ready {
    0%, 100% { border-color: rgba(59, 130, 246, 0.4); }
    50% { border-color: rgba(59, 130, 246, 0.8); }
}

/* 布局区域拖放高亮 */
.sheet-region-header.drop-highlight {
    background: rgba(16, 185, 129, 0.15) !important;
    outline: 2px dashed #10b981;
    outline-offset: -2px;
    border-radius: 8px;
    transition: all 0.15s;
}

/* 拖拽手柄 */
.sheet-drop-handle {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 10;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(30, 45, 75, 0.85);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #6eb0ff;
    cursor: grab;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: all 0.15s;
}

.grid-stack-item:hover .sheet-drop-handle {
    display: flex;
}

.sheet-drop-handle:hover {
    background: rgba(59, 130, 246, 0.4);
    color: white;
    border-color: rgba(59, 130, 246, 0.8);
    transform: scale(1.1);
}

.sheet-drop-handle:active {
    cursor: grabbing;
}

/* 抽屉面板样式 */
.drawer-panel {
    position: fixed;
    top: 70px;
    width: 320px;
    height: calc(100vh - 70px);
    background: rgba(12, 22, 40, 0.98);
    border: 1px solid rgba(64, 128, 255, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.drawer-panel.from-right {
    right: 0;
    border-left: none;
    border-radius: 16px 0 0 16px;
    transform: translateX(100%);
}

.drawer-panel.from-left {
    left: 0;
    border-right: none;
    border-radius: 0 16px 16px 0;
    transform: translateX(-100%);
}

.drawer-panel.open {
    transform: translateX(0) !important;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(64, 128, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
}

.drawer-back-btn {
    background: none;
    border: none;
    color: #8ac4ff;
    font-size: 1rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.drawer-back-btn:hover {
    background: rgba(64, 128, 255, 0.15);
    color: white;
}

.drawer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e8eef8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-close-btn {
    background: none;
    border: none;
    color: #8ac4ff;
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.drawer-content {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
}

.drawer-section-title {
    font-size: 0.8rem;
    color: #6b8bb8;
    margin-bottom: 10px;
    margin-top: 16px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-section-title:first-child {
    margin-top: 0;
}

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

.drawer-action-btn {
    background: rgba(64, 128, 255, 0.1);
    border: 1px solid rgba(64, 128, 255, 0.3);
    border-radius: 8px;
    padding: 6px 10px;
    color: #8ac4ff;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.drawer-action-btn:hover {
    background: rgba(64, 128, 255, 0.2);
    color: white;
}

.drawer-action-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.drawer-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: white;
}

/* 文件夹项样式 */
.folder-item {
    border-radius: 12px !important;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    cursor: pointer;
    background: rgba(18, 32, 55, 0.7);
    backdrop-filter: blur(4px);
    border-left: 3px solid;
    user-select: none;
    -webkit-user-select: none;
}

.folder-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.folder-wrapper.depth-1 .folder-item {
    border-left-color: #3b82f6;
}

.folder-wrapper.depth-2 {
    padding-left: 16px;
}

.folder-wrapper.depth-2 .folder-item {
    border-left-color: #8b5cf6;
}

.folder-wrapper.depth-3 {
    padding-left: 32px;
}

.folder-wrapper.depth-3 .folder-item {
    border-left-color: #f59e0b;
}

.folder-item:hover {
    transform: translateX(3px);
    filter: brightness(1.05);
    background: rgba(59, 130, 246, 0.15);
    border-radius: 12px;
}

.folder-item:active {
    transform: translateX(3px);
    filter: brightness(0.95);
    border-radius: 12px;
}

.folder-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.folder-icon {
    font-size: 1rem;
}

.folder-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: #e8eef8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    -webkit-user-select: none;
}

.folder-count {
    font-size: 0.65rem;
    color: #6b8bb8;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    user-select: none;
    -webkit-user-select: none;
}

.folder-item:hover .folder-actions {
    opacity: 1;
}

.folder-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.folder-action-icon {
    background: rgba(0,0,0,0.35);
    border-radius: 30px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    border: none;
    color: #c8ddff;
    font-size: 0.65rem;
}

.folder-action-icon:hover {
    background: #2f5b8c;
    color: white;
    transform: scale(1.05);
}

/* 拖拽状态 */
.folder-item.drag-over {
    background: rgba(16, 185, 129, 0.2);
    border-left-style: dashed;
    border-radius: 12px;
}

.tag-item.drag-over {
    background: rgba(16, 185, 129, 0.2);
    border-left-style: dashed;
    border-radius: 12px;
}

/* 文件夹展开内容样式 */
.folder-content {
    display: none;
    flex-direction: column;
    gap: 6px;
}

.folder-content.expanded {
    display: flex;
}

@media (max-width: 780px) {
    body { padding: 1rem; padding-top: 70px; }
    .gh-config input { width: 100px; }
    .header-bar { padding: 0.5rem 1rem; }
}