:root {
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --secondary-color: #5d6d7e;
  --accent-color: #1abc9c;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --text-color: #333;
  --light-text: #f8f9fa;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 0.5rem;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-color);
  background-color: #f5f7fa;
  line-height: 1.6;
}

/* 用户顶部栏样式 */
.user-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--dark-color);
  color: var(--light-text);
  z-index: 1100;
  box-shadow: var(--shadow);
  height: 40px;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.user-bar-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  width: 100%;
}

.user-info {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.welcome-text {
  margin-right: 0.25rem;
  color: rgba(255, 255, 255, 0.8);
}

.user-name {
  font-weight: 600;
  margin-right: 1rem;
}

.user-actions {
  display: flex;
  align-items: center;
}

.user-action-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.85rem;
}

.user-action-link:hover {
  color: #fff;
  text-decoration: none;
}

.separator {
  margin: 0 0.5rem;
  color: rgba(255, 255, 255, 0.4);
}

.login-register-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn-user-action {
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-login {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-login:hover {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color);
}

.btn-register {
  background-color: var(--primary-color);
  color: white !important;
  border: 1px solid var(--primary-color);
}

.btn-register:hover {
  background-color: var(--primary-dark);
  color: white !important;
}

.btn-register:after, .btn-login:after, .btn-user:after, .btn-logout:after {
  display: none;
}

.btn-user {
  background-color: var(--accent-color);
  color: white !important;
  border: 1px solid var(--accent-color);
}

.btn-user:hover {
  background-color: #16a085;
  color: white !important;
}

.btn-logout {
  background-color: transparent;
  color: #e74c3c;
  border: 1px solid #e74c3c;
}

.btn-logout:hover {
  background-color: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

/* 响应式调整 */
@media (max-width: 576px) {
  .user-info {
    font-size: 0.8rem;
  }
  
  .user-action-link, .btn-user-action {
    font-size: 0.75rem;
  }
  
  .btn-user-action {
    padding: 0.2rem 0.5rem;
  }
  
  .welcome-text {
    display: none;
  }
}

/* 现代化导航栏 */
#page-header {
  background-color: #fff;
  box-shadow: var(--shadow);
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.content-header .fs-4 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.5rem;
}

.logo-link i {
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-item {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}

.nav-item:hover {
  color: var(--primary-color);
}

.nav-item:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-item:hover:after {
  width: 100%;
}

.btn-alt-secondary {
  background-color: #eaecf0;
  color: var(--secondary-color);
  border: none;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.btn-alt-secondary:hover {
  background-color: #d8dce2;
}

/* 响应式侧边栏 */
#sidebar {
  background-color: #fff;
  box-shadow: var(--shadow);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100%;
  z-index: 1000;
  transition: left 0.3s ease;
}

#sidebar.active {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: flex-end;
  padding: 1rem;
}

.nav-main-link {
  color: var(--secondary-color);
  border-radius: var(--border-radius);
  margin: 0.25rem 0.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.nav-main-link:hover, .nav-main-link.active {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color);
}

.nav-main-link-icon {
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

.nav-main-link-name {
  font-weight: 500;
}

.nav-main-heading {
  color: var(--secondary-color);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1.25rem 1rem 0.5rem;
}

/* 主内容区域 */
#main-container {
  padding: 2rem 1rem;
}

.hero-section {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  overflow: hidden;
}

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero-section .lead {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

.stats-badge .badge {
  font-size: 0.9rem;
  font-weight: 500;
}

.block {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  border: none;
}

.block:hover {
  box-shadow: var(--hover-shadow);
}

.block-content {
  padding: 1.5rem;
}

/* 搜索框 */
.input-group {
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.input-group input {
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

.input-group input:focus {
  box-shadow: none;
}

.input-group button {
  background-color: var(--primary-color);
  border: none;
  padding: 0 1.5rem;
}

.input-group button:hover {
  background-color: var(--primary-dark);
}

/* API卡片 */
.api-card {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow);
  height: 100%;
  background-color: #fff;
  transition: all 0.3s ease;
}

.api-card:hover {
  box-shadow: var(--hover-shadow);
  transform: translateY(-5px);
}

.api-card .card-body {
  padding: 1.5rem;
}

.api-card .card-title {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.2rem;
}

.api-card .badge {
  font-weight: 500;
  padding: 0.4rem 0.8rem;
}

.api-card .card-text {
  color: var(--secondary-color);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.api-card .stats {
  display: flex;
  align-items: center;
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.api-card .stats i {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

.api-card .btn-primary {
  background-color: var(--primary-color);
  border: none;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.api-card .btn-primary:hover {
  background-color: var(--primary-dark);
}

/* 空状态 */
.empty-state {
  padding: 3rem;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.empty-state i {
  font-size: 4rem;
  color: #d1d9e6;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-weight: 600;
  color: var(--dark-color);
}

.empty-state p {
  color: var(--secondary-color);
}

/* 页脚 */
#page-footer {
  background-color: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
  margin-top: 2rem;
}

.fw-semibold.text-muted {
  color: var(--secondary-color);
  transition: all 0.3s ease;
}

.fw-semibold.text-muted:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* 访问计数器和运行时间 */
#visit-count, #timeDifference {
  margin-top: 1rem;
  padding: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
}

#visit-count {
  color: var(--primary-color);
}

#timeDifference {
  color: var(--accent-color);
}

/* 欢迎弹窗 */
.modal-content {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: none;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.modal-header, .modal-footer {
  border: none;
}

.modal-title {
  font-weight: 700;
  color: var(--light-text);
}

.modal-body {
  padding: 2rem;
  color: var(--light-text);
}

.btn-primary {
  background-color: var(--accent-color);
  border: none;
  border-radius: var(--border-radius);
  padding: 0.5rem 1.5rem;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: var(--border-radius);
  padding: 0.5rem 1.5rem;
  color: var(--light-text);
}

.btn-primary:hover {
  background-color: #16a085;
}

.btn-close {
  color: #fff;
  opacity: 0.8;
}

.btn-close:hover {
  opacity: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .content-header {
    padding: 0.75rem;
  }
  
  #main-container {
    padding: 1rem 0.5rem;
  }
  
  .block-content {
    padding: 1rem;
  }
  
  .input-group input {
    padding: 0.75rem 1rem;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section .lead {
    font-size: 1rem;
  }
}

/* 动画效果 */
.animated {
  animation-duration: 0.5s;
}

.fadeIn {
  animation-name: fadeIn;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 导航按钮样式 */
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  margin-left: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-btn i {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

/* 侧边栏按钮样式 */
.sidebar-btn {
  margin: 5px 10px;
  border-radius: 8px !important;
  padding: 12px 15px !important;
  transition: all 0.3s ease;
}

.sidebar-login {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color) !important;
  border: 1px solid var(--primary-color);
}

.sidebar-login:hover {
  background-color: var(--primary-color);
  color: white !important;
}

.sidebar-register {
  background-color: var(--primary-color);
  color: white !important;
}

.sidebar-register:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-user {
  background-color: var(--accent-color);
  color: white !important;
}

.sidebar-user:hover {
  background-color: #16a085;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-logout {
  background-color: rgba(231, 76, 60, 0.1);
  color: #e74c3c !important;
  border: 1px solid #e74c3c;
}

.sidebar-logout:hover {
  background-color: #e74c3c;
  color: white !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .content-header {
    padding: 0.75rem;
  }
  
  #main-container {
    padding: 1rem 0.5rem;
  }
  
  .block-content {
    padding: 1rem;
  }
  
  .input-group input {
    padding: 0.75rem 1rem;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section .lead {
    font-size: 1rem;
  }
}

/* 顶部按钮样式 */
.header-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-btn i {
  margin-right: 8px;
  font-size: 1.2rem;
}

.login-btn {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

.register-btn {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

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

.user-btn {
  background-color: var(--accent-color);
  color: white;
  border: 2px solid var(--accent-color);
}

.user-btn:hover {
  background-color: #16a085;
  color: white;
}

.logout-btn {
  background-color: transparent;
  color: #e74c3c;
  border: 2px solid #e74c3c;
}

.logout-btn:hover {
  background-color: #e74c3c;
  color: white;
}

/* 按钮动画效果 */
.header-btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: -100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  z-index: 1;
}

.header-btn:hover::after {
  left: 100%;
}

.header-btn span {
  position: relative;
  z-index: 2;
}

.header-btn i {
  position: relative;
  z-index: 2;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .content-header {
    padding: 0.75rem;
  }
  
  #main-container {
    padding: 1rem 0.5rem;
  }
  
  .block-content {
    padding: 1rem;
  }
  
  .input-group input {
    padding: 0.75rem 1rem;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section .lead {
    font-size: 1rem;
  }
}

/* 移动端按钮样式 */
.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 15px;
}

.mobile-btn {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-btn i {
  margin-right: 10px;
  font-size: 1.3rem;
}

.mobile-login {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.mobile-login:hover, .mobile-login:active {
  background-color: var(--primary-color);
  color: white;
}

.mobile-register {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

.mobile-register:hover, .mobile-register:active {
  background-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.mobile-user {
  background-color: var(--accent-color);
  color: white;
  border: 2px solid var(--accent-color);
}

.mobile-user:hover, .mobile-user:active {
  background-color: #16a085;
  box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
}

.mobile-logout {
  background-color: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 2px solid #e74c3c;
}

.mobile-logout:hover, .mobile-logout:active {
  background-color: #e74c3c;
  color: white;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* 动画效果 */
