/* 自定义样式表 */
:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --accent-color: #F4A460;
    --light-bg: #FDF5E6;
    --dark-text: #2C1810;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #FDF5E6 0%, #FAEBD7 100%);
    color: var(--dark-text);
    line-height: 1.6;
    padding-top: 76px; /* 为固定导航栏留出空间 */
}

/* 导航栏样式 */
.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 1.5rem;
}

/* 主容器样式 */
.container-main {
    min-height: calc(100vh - 200px);
}

/* 卡片样式优化 */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.5rem;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 25px;
    padding: 10px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

/* 表单样式优化 */
.form-control {
    border-radius: 10px;
    border: 1px solid #ddd;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(244, 164, 96, 0.25);
}

/* 记录卡片样式 */
.record-card {
    background: white;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.record-card:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }
    
    .container-main {
        padding: 0 15px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* 特殊元素样式 */
.bazi-result {
    font-family: 'SimSun', 'NSimSun', serif;
    font-size: 1.2rem;
    color: var(--primary-color);
    background: var(--light-bg);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}
/* 确保导航栏位于最顶层 */
.navbar {
  position: relative; /* 根据您的布局需求，fixed 用于固定顶栏 */
  z-index: 1030; /* Bootstrap 中导航栏的常用 z-index 值，通常足够高 */
  width: 100%;
  /* 确保背景色不透明，才能遮盖下方内容 */
  background-color: #8B4513; /* 您的主题色 */

  /* 如果使用背景图片 */
  /* background-image: url('../images/nav-bg.jpg'); */ /* 路径相对于CSS文件 */
  /* background-size: cover; */
  /* background-repeat: no-repeat; */
}

/* 如果导航栏是固定定位 */
.navbar.fixed-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* 为主内容区域设置上内边距，避免被固定导航栏遮挡 */
body {
  padding-top: 76px; /* 这个值应等于导航栏的高度 */
}

/* 控制注册卡片的层级，确保其在导航栏之下 */
.card {
  position: relative;
  z-index: 5; /* 一个较低的值 */
}
body {
    display: flex;
    justify-content: center;  /* 水平居中 */
    align-items: center;      /* 垂直居中 */
    min-height: 100vh;        /* 确保高度占满整个视口 */
    margin: 0;
}

.login-container {
    width: 100%;
    max-width: 400px; /* 控制登录框最大宽度 */
}
.user-type-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.user-type-admin {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.user-type-user {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}