/**
 * 现代化高端UI样式
 * 兼容移动端和PC端
 */

/* 基础变量 */
:root {
  --primary-color: #3a7fff;
  --primary-gradient: linear-gradient(135deg, #3a7fff, #6c63ff);
  --secondary-color: #6c63ff;
  --success-color: #36b37e;
  --danger-color: #ff5630;
  --warning-color: #ffab00;
  --info-color: #00b8d9;
  --light-bg: #f5f7fa;
  --dark-bg: #2d3748;
  --white: #ffffff;
  --black: #000000;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #f0f0f0;
  --box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  --box-shadow-hover: 0 10px 20px rgba(0,0,0,0.08);
  --border-radius: 10px;
  --border-radius-sm: 5px;
  --border-radius-lg: 15px;
  --transition: all 0.3s ease;
}

/* 基础样式 */
body.modern-theme {
  background-color: var(--light-bg);
  color: var(--text-primary);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

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

/* 标题和文本样式 */
.section-header {
  margin: 25px 0 15px;
  position: relative;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.section-divider {
  height: 3px;
  width: 40px;
  background: var(--primary-gradient);
  margin-top: 8px;
  border-radius: 2px;
}

.view-all {
  position: absolute;
  right: 0;
  top: 5px;
  color: var(--primary-color);
  font-size: 14px;
  display: flex;
  align-items: center;
}

.view-all i {
  margin-left: 2px;
  font-size: 16px;
}

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

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

/* 图标样式 */
.circle-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--light-bg) 0%, #e4e8f0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  transition: var(--transition);
}

.circle-icon i {
  font-size: 26px;
  color: var(--primary-color);
  transition: var(--transition);
}

.modern-card:hover .circle-icon {
  background: var(--primary-gradient);
}

.modern-card:hover .circle-icon i {
  color: var(--white);
}

/* 按钮样式 */
.modern-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 30px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(58, 127, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(58, 127, 255, 0.4);
}

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

.btn-outline:hover {
  background: rgba(58, 127, 255, 0.05);
}

/* 列表项样式 */
.list-item {
  padding: 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s;
}

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

.list-item:hover {
  background-color: rgba(245, 247, 250, 0.7);
}

.list-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(58, 127, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  transition: var(--transition);
}

.list-icon i {
  font-size: 20px;
  color: var(--primary-color);
  transition: var(--transition);
}

.list-item:hover .list-icon {
  background: var(--primary-gradient);
}

.list-item:hover .list-icon i {
  color: var(--white);
}

.list-content {
  flex-grow: 1;
}

.list-title {
  font-size: 15px;
  margin-bottom: 3px;
  color: var(--text-primary);
  font-weight: 500;
}

.list-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.list-arrow {
  color: var(--text-muted);
}

.list-arrow i {
  font-size: 20px;
}

/* 栅格系统 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

/* 首页特定样式 */
.hero-banner {
  position: relative;
  margin-top: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-radius: var(--border-radius);
}

.banner-item {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.banner-item:hover .banner-img {
  transform: scale(1.05);
}

.banner-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  color: white;
}

.banner-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 5px;
}

.banner-content p {
  font-size: 14px;
  opacity: 0.9;
}

/* 头部样式增强 */
.header {
  background: var(--primary-gradient);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-l .site-name {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.header-r .layui-icon {
  font-size: 18px;
  height: 50px;
  line-height: 50px;
}

/* 用户中心特定样式 */
.user-profile {
  background: var(--primary-gradient);
  padding: 25px 20px;
  color: white;
  position: relative;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.user-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.3);
  margin: 0 auto 15px;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  text-align: center;
}

.user-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.user-id {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 10px;
}

.user-level {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 12px;
}

.user-stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
}

.stat-item {
  padding: 0 10px;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
}

.stat-label {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

/* 空数据样式 */
.empty-data {
  text-align: center;
  padding: 30px 0;
  color: var(--text-muted);
}

.empty-data i {
  font-size: 30px;
  margin-bottom: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
