/* 同步主题后的笔记应用样式 */
:root {
    /* 黑金主题变量 */
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --gold-primary: #c6a467;
    --gold-secondary: #d4bc80;
    --gold-accent: #f1d28f;
    --text-light: #f0f0f0;
    --text-gray: #aaaaaa;
    --card-bg: #1a1207;
    --border-color: rgba(198, 164, 103, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.4);
    
    /* 浅色主题变量 */
    --light-bg: #f5f3f0;
    --lighter-bg: #faf9f7;
    --light-primary: #b08d57;
    --light-secondary: #c9b17e;
    --light-accent: #dcc895;
    --text-dark: #2c2c2c;
    --text-medium: #666666;
    --light-card-bg: #ffffff;
    --light-border: #e8e1d4;
    --light-shadow: rgba(140, 120, 83, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    transition: all 0.4s ease;
    margin: 0;
    padding: 0;
}
.nav-links {
            display: flex;
            list-style: none;
            gap: 1.8rem;
        }
        .nav-links a {
            font-weight: 500;
            position: relative;
            padding: 0.5rem 0;
        }
        .gold-theme .nav-links a {
            color: var(--text-light);
        }
        .light-theme .nav-links a {
            color: var(--text-dark);
        }
        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 1px;
            transition: width 0.3s ease;
        }
        .gold-theme .nav-links a::after {
            background: var(--gold-primary);
        }
        .light-theme .nav-links a::after {
            background: var(--light-primary);
        }
        .nav-links a:hover::after {
            width: 100%;
        }
        .nav-links a:hover {
            opacity: 0.8;
        }
.gold-theme {
    color: var(--text-light);
    background-color: var(--dark-bg);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(198, 164, 103, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(198, 164, 103,  0.03) 0%, transparent 25%);
}

.light-theme {
    color: var(--text-dark);
    background-color: var(--light-bg);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(176, 141, 87, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(201, 177, 126, 0.05) 0%, transparent 25%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 主题切换器样式 */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 50px;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-wrap: wrap;
    max-width: 300px;
    justify-content: center;
}

.gold-theme .theme-switcher {
    background: rgba(26, 18, 7, 0.8);
    box-shadow:  0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.light-theme .theme-switcher {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px var(--light-shadow);
    border: 1px solid var(--light-border);
}

.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.theme-btn.active {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.gold-theme .theme-btn.active {
    border-color: var(--gold-primary);
}

.light-theme .theme-btn.active {
    border-color: var(--light-primary);
}

.theme-gold { 
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1207 100%);
}

.theme-light { 
    background: linear-gradient(135deg, #f5f3f0 0%, #e8e1d4 100%);
    color: #333;
}

/* 统一的头部样式 */
header {
            padding: 1.2rem 0;
            box-shadow: 0 4px 20px var(--shadow-color);
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(10px);
            margin-bottom: 2rem;
        }

.gold-theme header {
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.98), rgba(26, 18, 7, 0.9));
    border-bottom: 1px solid var(--border-color);
}

.light-theme header {
    background: linear-gradient(to bottom, rgba(245, 243, 240, 0.98), rgba(234, 229, 218, 0.9));
    border-bottom: 1px solid var(--light-border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.logo {
    margin-left: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
}

.gold-theme .logo {
    background: linear-gradient(to right, #c6a467, #d4bc80, #f1d28f);
    background-clip: text;
    color: transparent;
}

.light-theme .logo {
    background: linear-gradient(to right, #b08d57, #c9b17e, #dcc895);
    background-clip: text;
    color: transparent;
}

/* 导航样式 */
.navigation {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navigation a {
    position: relative;
    font-size: 1em;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gold-theme .navigation a {
    color: var(--text-light);
}

.light-theme .navigation a {
    color: var(--text-dark);
}

.navigation a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    border-radius: 5px;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.gold-theme .navigation a::after {
    background: var(--gold-primary);
}

.light-theme .navigation a::after {
    background: var(--light-primary);
}

.navigation a:hover::after {
    transform-origin: right;
    transform: scaleX(1);
}

.navigation a:hover {
    opacity: 0.8;
}

/* 认证按钮样式 */
.auth-buttons {
    display: flex;
    gap: 10px;
}

.auth-buttons button {
    padding: 8px 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn {
    background-color: transparent;
    border: 1px solid !important;
}

.gold-theme .login-btn {
    color: var(--gold-primary);
    border-color: var(--gold-primary) !important;
}

.light-theme .login-btn {
    color: var(--light-primary);
    border-color: var(--light-primary) !important;
}

.register-btn, .create-note-header-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.gold-theme .register-btn,
.gold-theme .create-note-header-btn {
    background: var(--gold-primary);
    color: var(--dark-bg);
}

.light-theme .register-btn,
.light-theme .create-note-header-btn {
    background: var(--light-primary);
    color: white;
}

.auth-buttons button:hover,
.create-note-header-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    font-weight: 500;
}

.logout-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.gold-theme .logout-btn {
    background-color: rgba(234, 67, 53, 0.8);
    color: white;
}

.light-theme .logout-btn {
    background-color: #ea4335;
    color: white;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gold-theme .menu-toggle {
    color: var(--text-light);
}

.light-theme .menu-toggle {
    color: var(--text-dark);
}

/* 主内容区 */
.main-content {
    display: flex;
    gap: 20px;
    margin-top: 90px; /* 为固定头部留出空间 */
    transition: all 0.4s ease;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.4s ease;
}

.gold-theme .sidebar {
    background: var(--card-bg);
    box-shadow: 0 8px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.light-theme .sidebar {
    background: var(--light-card-bg);
    box-shadow: 0 8px 30px var(--light-shadow);
    border: 1px solid var(--light-border);
}

.search-box {
    margin-bottom: 20px;
}

.search-box.hidden {
    display: none;
}

.search-box input {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.gold-theme .search-box input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.light-theme .search-box input {
    background: white;
    border: 1px solid var(--light-border);
    color: var(--text-dark);
}

.gold-theme .search-box input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.light-theme .search-box input:focus {
    outline: none;
    border-color: var(--light-primary);
}

.tags-section h3, .notes-list h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.gold-theme .tags-section h3,
.gold-theme .notes-list h3 {
    color: var(--gold-primary);
}

.light-theme .tags-section h3,
.light-theme .notes-list h3 {
    color: var(--light-primary);
}

.tag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gold-theme .tag {
    background-color: rgba(198, 164, 103, 0.1);
    color: var(--gold-secondary);
    border: 1px solid var(--border-color);
}

.light-theme .tag {
    background-color: rgba(176, 141, 87, 0.1);
    color: var(--light-secondary);
    border: 1px solid var(--light-border);
}

.tag:hover, .tag.active {
    transform: translateY(-2px);
}

.gold-theme .tag:hover,
.gold-theme .tag.active {
    background-color: var(--gold-primary);
    color: var(--dark-bg);
}

.light-theme .tag:hover,
.light-theme .tag.active {
    background-color: var(--light-primary);
    color: white;
}

.note-item {
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gold-theme .note-item {
    border-bottom: 1px solid var(--border-color);
}

.light-theme .note-item {
    border-bottom: 1px solid var(--light-border);
}

.note-item:hover {
    transform: translateX(5px);
}

.gold-theme .note-item:hover {
    background-color: rgba(198, 164, 103, 0.05);
}

.light-theme .note-item:hover {
    background-color: rgba(176, 141, 87, 0.05);
}

.note-item:last-child {
    border-bottom: none;
}

.note-item-title {
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item-date {
    font-size: 12px;
}

.gold-theme .note-item-date {
    color: var(--text-gray);
}

.light-theme .note-item-date {
    color: var(--text-medium);
}

/* 笔记编辑器 */
.note-editor, .create-note-page {
    flex: 1;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
}

.gold-theme .note-editor,
.gold-theme .create-note-page {
    background: var(--card-bg);
    box-shadow: 0 8px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.light-theme .note-editor,
.light-theme .create-note-page {
    background: var(--light-card-bg);
    box-shadow: 0 8px 30px var(--light-shadow);
    border: 1px solid var(--light-border);
}

.note-title-input {
    font-size: 24px;
    font-weight: 600;
    border: none;
    padding: 10px 0;
    margin-bottom: 20px;
    width: 100%;
    background: transparent;
    transition: all 0.3s ease;
}

.gold-theme .note-title-input {
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.light-theme .note-title-input {
    color: var(--text-dark);
    border-bottom: 1px solid var(--light-border);
}

.note-title-input:focus {
    outline: none;
}

.gold-theme .note-title-input:focus {
    border-bottom-color: var(--gold-primary);
}

.light-theme .note-title-input:focus {
    border-bottom-color: var(--light-primary);
}

.note-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag-input {
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
}

.gold-theme .tag-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.light-theme .tag-input {
    background: white;
    border: 1px solid var(--light-border);
    color: var(--text-dark);
}

.gold-theme .tag-input:focus {
    border-color: var(--gold-primary);
}

.light-theme .tag-input:focus {
    border-color: var(--light-primary);
}

.note-content-textarea {
    flex: 1;
    border: none;
    resize: none;
    font-size: 16px;
    line-height: 1.6;
    padding: 10px 0;
    min-height: 300px;
    background: transparent;
    transition: all 0.3s ease;
}

.gold-theme .note-content-textarea {
    color: var(--text-light);
}

.light-theme .note-content-textarea {
    color: var(--text-dark);
}

.note-content-textarea:focus {
    outline: none;
}

.note-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    transition: all 0.3s ease;
}

.gold-theme .note-actions {
    border-top: 1px solid var(--border-color);
}

.light-theme .note-actions {
    border-top: 1px solid var(--light-border);
}

.delete-btn, .cancel-btn, .save-btn, .confirm-btn, .back-to-list-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.delete-btn, .cancel-btn {
    background-color: rgba(234, 67, 53, 0.8);
    color: white;
}

.save-btn, .confirm-btn {
    background-color: rgba(52, 168, 83, 0.8);
    color: white;
}

.back-to-list-btn {
    background-color: rgba(108, 117, 125, 0.8);
    color: white;
}

.delete-btn:hover, .cancel-btn:hover, .save-btn:hover, .confirm-btn:hover, .back-to-list-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* 创建笔记页面样式 */
.create-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.gold-theme .create-note-header {
    border-bottom: 1px solid var(--border-color);
}

.light-theme .create-note-header {
    border-bottom: 1px solid var(--light-border);
}

.create-note-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.gold-theme .create-note-title {
    color: var(--gold-primary);
}

.light-theme .create-note-title {
    color: var(--light-primary);
}

/* 创建按钮 */
.create-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.gold-theme .create-btn {
    background: var(--gold-primary);
    color: var(--dark-bg);
}

.light-theme .create-btn {
    background: var(--light-primary);
    color: white;
}

.create-btn:hover {
    opacity: 0.9;
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-color);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.gold-theme .modal {
    background-color: rgba(0, 0, 0, 0.7);
}

.light-theme .modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    transition: all 0.4s ease;
}

.gold-theme .modal-content {
    background: var(--card-bg);
    box-shadow: 0 8px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.light-theme .modal-content {
    background: var(--light-card-bg);
    box-shadow: 0 8px 30px var(--light-shadow);
    border: 1px solid var(--light-border);
}

.modal-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
}

.gold-theme .modal-title {
    color: var(--gold-primary);
}

.light-theme .modal-title {
    color: var(--light-primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.gold-theme .form-group label {
    color: var(--text-light);
}

.light-theme .form-group label {
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.gold-theme .form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.light-theme .form-group input {
    background: white;
    border: 1px solid var(--light-border);
    color: var(--text-dark);
}

.gold-theme .form-group input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.light-theme .form-group input:focus {
    outline: none;
    border-color: var(--light-primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    border-radius: 12px;
    transition: all 0.4s ease;
}

.gold-theme .empty-state {
    background: var(--card-bg);
    color: var(--text-gray);
    border: 1px solid var(--border-color);
}

.light-theme .empty-state {
    background: var(--light-card-bg);
    color: var(--text-medium);
    border: 1px solid var(--light-border);
}

.empty-state h2 {
    margin-bottom: 15px;
    font-size: 24px;
}

.gold-theme .empty-state h2 {
    color: var(--gold-primary);
}

.light-theme .empty-state h2 {
    color: var(--light-primary);
}

.empty-state p {
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
        margin-top: 80px;
    }
     .nav-links {
                margin-top: 1rem;
                flex-wrap: wrap;
                justify-content: center;
            }
    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .navigation {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 15px;
        backdrop-filter: blur(10px);
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        pointer-events: none;
        border-radius: 0 0 20px 20px;
    }
    
    .gold-theme .navigation {
        background: linear-gradient(to bottom, rgba(26, 18, 7, 0.95), rgba(10, 10, 10, 0.9));
        border-bottom: 1px solid var(--border-color);
    }
    
    .light-theme .navigation {
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(245, 243, 240, 0.9));
        border-bottom: 1px solid var(--light-border);
    }
    
    .navigation.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    
    .create-note-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .create-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .note-actions, .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .note-actions button, .modal-actions button {
        width: 100%;
    }
    
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-state h2 {
        font-size: 20px;
    }
    
    .theme-switcher {
        position: relative;
        top: unset;
        right: unset;
        margin: 1rem auto;
        max-width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    header {
        padding: 0 15px;
        height: 60px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .main-content {
        margin-top: 70px;
    }
    
    .create-btn {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .note-editor, .create-note-page {
        padding: 15px;
    }
    
    .theme-switcher {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .theme-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
     .nav-links {
                gap: 1rem;
            }
            .nav-links li {
                margin: 0;
            }
}