:root {
    --primary-color: #4e6a6d;
    --secondary-color: #e9e5d7;
    --background-color: #EEEEEE;
    --text-color: #333333;
    --border-radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', 'Source Han Serif SC', '宋体', serif;
    background: var(--background-color);
    min-height: 100vh;
}

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

/* 导航栏样式 */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255,255,255,0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.nav-logo {
    height: 40px;
    margin-right: 40px;
}

.nav-links {
    display: flex;
    gap: 20px;
    margin-right: auto;
}

.nav-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: var(--primary-color);
    color: white;
}

/* 用户部分样式 */
.user-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s;
}

.user-avatar:hover {
    transform: scale(1.1);
}

/* 通用按钮样式 */
.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.btn.secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.btn.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* 通用卡片样式 */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

/* 通用模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

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

.modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .nav-bar {
        padding: 0 10px;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* 通用下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 160px;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    padding: 8px 0;
    z-index: 1001;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    transition: all 0.3s;
}

.dropdown-content a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* 通用加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 通用消息提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 3000;
    display: none;
}

.toast.success {
    background: #4caf50;
    color: white;
}

.toast.error {
    background: #f44336;
    color: white;
}

/* 通用表单样式 */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
} 

/* 返回全部功能（每个分页都有） */
.crumb-back {
  display: inline-block;
  color: #4e6a6d;
  font-size: 14px;
  text-decoration: none;
  padding: 4px 0;
  transition: opacity .15s;
}
.crumb-back:hover { opacity: .7; text-decoration: none; }


/* ══ 极简顶栏（替代原来的深色导航菜单，全站统一由 navbar.js 生成）══ */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #e4e0d4;
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.tb-brand {
  color: #4e6a6d; font-size: 15px; font-weight: 600; letter-spacing: .5px;
  text-decoration: none; white-space: nowrap;
}
.tb-brand:hover { opacity: .75; }
.tb-back {
  color: #4e6a6d; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.tb-back:hover { opacity: .7; }
.tb-sep { color: #c9c4b4; font-size: 13px; }
.tb-cur {
  color: #6b6b62; font-size: 14px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.tb-btn {
  height: 32px; padding: 0 14px; border-radius: 16px;
  border: 1px solid #4e6a6d; background: #4e6a6d; color: #fff;
  font-size: 13px; font-family: inherit; cursor: pointer; transition: .15s;
}
.tb-btn:hover { background: #415a5c; }
.tb-btn.ghost { background: #fff; color: #4e6a6d; }
.tb-btn.ghost:hover { background: #f6f4ee; }

.tb-user { position: relative; }
.tb-user .user-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 1px solid #ddd6c4; cursor: pointer; display: block;
}
.tb-user .dropdown-menu {
  display: none; position: absolute; right: 0; top: 40px;
  background: #fff; border: 1px solid #e4e0d4; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08); min-width: 150px; overflow: hidden; z-index: 1200;
}
.tb-user .dropdown-menu a {
  display: block; padding: 10px 14px; color: #4a4a44; font-size: 14px; text-decoration: none;
}
.tb-user .dropdown-menu a:hover { background: #f6f4ee; color: #4e6a6d; }

@media (max-width: 600px) {
  .topbar-inner { height: 48px; padding: 0 14px; }
  .tb-cur { max-width: 120px; }
}


/* ══ 页脚置底（内容不足一屏时也贴在视口底部）══ */
html { height: 100%; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > .site-footer { margin-top: auto; }

.site-footer {
  border-top: 1px solid #e4e0d4;
  background: #f6f4ee;
  color: #9a9a90;
  font-size: 13px;
  padding: 22px 0;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: flex; gap: 14px; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  line-height: 1.9;
}
.site-footer a { color: #4e6a6d; text-decoration: none; }
.site-footer a:hover { opacity: .75; }

@media (max-width: 640px) {
  .footer-inner { justify-content: flex-start; }
}
