:root {
    /* 浅色模式变量 */
    --primary-color: #1a73e8;
    --primary-hover: #1557b0;
    --bg-color: #f0f2f5;
    --text-color: #202124;
    --text-secondary: #5f6368;
    
    /* 修改：增加透明度 (0.85 -> 0.7) */
    --card-bg: rgba(255, 255, 255, 0.7);
    
    --input-bg: #f1f3f4;
    --input-border: transparent;
    --input-focus: #1a73e8;
    --border-color: #dadce0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --navbar-height: 64px;
}

[data-theme="dark"] {
    /* 深色模式变量 */
    --primary-color: #8ab4f8;
    --primary-hover: #aecbfa;
    --bg-color: #202124;
    --text-color: #e8eaed;
    --text-secondary: #9aa0a6;
    
    /* 修改：增加透明度 (0.85 -> 0.75) */
    --card-bg: rgba(32, 33, 36, 0.75);
    
    --input-bg: #303134;
    --input-border: transparent;
    --input-focus: #8ab4f8;
    --border-color: #5f6368;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* 全局重置与视口修复 */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Roboto', sans-serif; 
    transition: background-color 0.3s, color 0.3s; 
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* 禁止横向滚动 */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    position: relative;
}

/* 导航栏样式 */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--navbar-height);
    background: var(--card-bg);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; z-index: 1000;
    box-shadow: 0 1px 3px var(--shadow-color);
}

.nav-left, .nav-right { display: flex; align-items: center; gap: 16px; }
.brand-logo { font-size: 22px; font-weight: 700; color: var(--text-color); text-decoration: none; letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 24px; }
.nav-link { color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 16px; }
.nav-link:hover { color: var(--primary-color); }

.icon-btn {
    background: transparent; border: none; cursor: pointer;
    color: var(--text-color); padding: 8px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: rgba(0,0,0,0.05); }

/* Material Icons 修正 */
.material-icons-round { vertical-align: middle; }

/* 侧边栏样式 */
.sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1100;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed; top: 0; left: 0; height: 100%; width: 280px;
    background: var(--bg-color); z-index: 1200;
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 16px rgba(0,0,0,0.1);
    display: flex; flex-direction: column;
}
.sidebar.active { transform: translateX(0); }
.sidebar-header {
    height: var(--navbar-height); display: flex; align-items: center;
    justify-content: space-between; padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-menu { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.sidebar-item {
    display: flex; align-items: center; gap: 16px;
    padding: 12px 16px; color: var(--text-color); text-decoration: none;
    border-radius: 8px; font-weight: 500;
}
.sidebar-item:hover { background: rgba(0,0,0,0.05); }
.sidebar-item .material-icons-round { color: var(--text-secondary); }

/* 响应式 */
.mobile-only { display: none; }
@media (max-width: 768px) {
    .desktop-only { display: none; }
    .mobile-only { display: flex; }
    .navbar { padding: 0 16px; }
}

/* 通知与验证码样式 */
.notification { position: fixed; bottom: 16px; right: 16px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); z-index: 2000; width: 300px; height: 48px; backdrop-filter: blur(10px); transform: translateX(calc(100% + 32px)); overflow: hidden; background: rgba(255,255,255,0.9); }
[data-theme="dark"] .notification { background: rgba(30,30,30,0.9); }
.notification.show { transform: translateX(0); }
.notification-wrapper { width: 100%; height: 100%; display: flex; align-items: center; }
.notification-content { flex: 1; padding: 0 16px; z-index: 2; height: 100%; display: flex; align-items: center; }
.notification-content p { margin: 0; padding: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; }
[data-theme="dark"] .notification-content p { color: #eee; }
.notification-icon { width: 48px; display: flex; align-items: center; justify-content: center; z-index: 1; height: 100%; }
.notification-icon .material-icons-round { font-size: 20px; color: white; }
.notification.error .notification-icon { background: #ff4d4f; }
.notification.error .notification-content p { color: #cf1322; }
[data-theme="dark"] .notification.error .notification-content p { color: #ff7875; }
.notification.success .notification-icon { background: #52c41a; }
.notification.success .notification-content p { color: #389e0d; }
[data-theme="dark"] .notification.success .notification-content p { color: #73d13d; }
.notification.warning .notification-icon { background: #faad14; }
.notification.warning .notification-content p { color: #d48806; }
[data-theme="dark"] .notification.warning .notification-content p { color: #ffc53d; }

.captcha-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 3000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s;
}
.captcha-overlay.active { opacity: 1; visibility: visible; }
.captcha-box {
    background: var(--bg-color); padding: 20px; border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
