/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部背景 */
.header-bg {
  background-image: url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=Minecraft%20cherry%20blossom%20landscape%20with%20river%20and%20trees%20in%20spring%20season&image_size=landscape_16_9');
  background-size: cover;
  background-position: center;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 40px;
  min-height: 300px;
}

.header-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
}

.header-content-bg {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 20px;
}

.header-content-bg h1 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-content-bg p {
  font-size: 18px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 头部 */
header {
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

/* 个人主页头部 */
body.profile-page header {
  position: relative;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  color: #333;
  gap: 12px;
}

.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  align-items: center;
}

nav ul li a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 8px 15px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

nav ul li a:hover {
  background-color: rgba(33, 150, 243, 0.1);
  transform: translateY(-2px);
  color: #2196F3;
}

/* 主内容 */
main {
  padding: 60px 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f5f5 0%, #e3f2fd 100%);
}

/* 卡片 */
.card {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 30px;
  margin-bottom: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card h2 {
  margin-bottom: 25px;
  color: #1a1a2e;
  font-size: 24px;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card h2 i {
  color: #2196F3;
  font-size: 20px;
}

.card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #2196F3 0%, #0b7dda 100%);
  border-radius: 2px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

/* 个人资料卡片 */
.profile-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
  color: #1e293b;
  border: 1px solid rgba(33, 150, 243, 0.2);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
  border-radius: 50%;
}

.profile-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(33, 150, 243, 0.05) 100%);
  border-radius: 50%;
}

.profile-card h2::after {
  background: linear-gradient(90deg, #2196F3 0%, #8b5cf6 100%);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
}

.avatar-wrapper {
  position: relative;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2196F3 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 700;
  color: white;
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
  position: relative;
  z-index: 1;
  border: 4px solid rgba(255, 255, 255, 0.9);
}

.avatar-glow {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.3) 0%, rgba(139, 92, 246, 0.2) 100%);
  opacity: 0.4;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.4;
  }
}

.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nickname {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.user-details {
  display: flex;
  gap: 20px;
  margin: 0;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
}

.detail-item span {
  font-weight: 500;
}

.balance-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.balance-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.balance-amount {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #2196F3 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 角色容器 */
.roles-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.role-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.role-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.role-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.role-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 3px;
}

.role-level {
  font-size: 14px;
  color: #666;
}

.default-badge {
  margin-left: auto;
  padding: 4px 12px;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.role-details {
  padding-top: 15px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: #666;
  font-size: 14px;
}

.detail-row i {
  color: #2196F3;
}

/* 订单容器 */
.orders-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.order-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.order-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: rgba(33, 150, 243, 0.3);
}

.order-header {
  margin-bottom: 15px;
}

.order-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-no {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  font-family: 'Courier New', monospace;
}

.status-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: white;
}

.status-paid {
  background: linear-gradient(135deg, #2196F3 0%, #0b7dda 100%);
  color: white;
}

.status-processing {
  background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
  color: white;
}

.status-completed {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
}

.status-canceled {
  background: linear-gradient(135deg, #607D8B 0%, #546E7A 100%);
  color: white;
}

.status-refund-pending {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
}

.order-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  margin-bottom: 15px;
}

.order-price {
  text-align: center;
}

.order-price .label {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 5px;
}

.order-price .amount {
  font-size: 20px;
  font-weight: 700;
  color: #2196F3;
}

.order-time {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #999;
}

.order-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, #2196F3 0%, #0b7dda 100%);
  color: white;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1976D2 0%, #0b7dda 100%);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 15px;
  color: #ddd;
}

.empty-state p {
  font-size: 16px;
  margin-bottom: 8px;
}

.empty-state .hint {
  font-size: 14px;
  color: #bbb;
}

/* 订单详情样式 */
.order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  margin-bottom: 24px;
}

.order-detail-header .order-no {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.detail-section {
  background: #fafafa;
  border-radius: 12px;
  padding: 20px;
}

.detail-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.detail-section h3 i {
  color: #2196F3;
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-item .label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.detail-item .value {
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
}

.detail-item .value.price {
  font-size: 16px;
  font-weight: 600;
  color: #2196F3;
}

/* 商品列表 */
.products-section {
  background: #fafafa;
  border-radius: 12px;
  padding: 20px;
}

/* 公告样式 */
.announcements-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.announcement-item {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 10px;
  padding: 20px;
  border-left: 4px solid #2196F3;
  transition: all 0.3s ease;
}

.announcement-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.announcement-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
  flex: 1;
  margin-right: 15px;
}

.announcement-time {
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
  padding: 4px 10px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 15px;
}

.announcement-content {
  color: #64748b;
  line-height: 1.7;
  font-size: 14px;
  margin: 0;
  white-space: pre-line;
  word-wrap: break-word;
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.product-name {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
}

.product-price {
  font-size: 14px;
  color: #2196F3;
  font-weight: 600;
}

/* 表格 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

th, td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.3s ease;
}

th {
  background-color: #2196F3;
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

tr:hover td {
  background-color: #f5f5f5;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  background-color: #0b7dda;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.btn-secondary {
  background-color: #2196F3;
  box-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
}

.btn-secondary:hover {
  background-color: #0b7dda;
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.btn-danger {
  background-color: #f44336;
  box-shadow: 0 2px 10px rgba(244, 67, 54, 0.3);
}

.btn-danger:hover {
  background-color: #da190b;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

/* 表单 */
form {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.form-group:hover {
  transform: translateY(-2px);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
  font-size: 14px;
  transition: all 0.3s ease;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
  transform: translateY(-1px);
}

/* 模态框动画 */
.modal {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  transform: translateY(-50px);
  transition: all 0.3s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav ul {
    margin-top: 10px;
    gap: 15px;
  }
  
  nav ul li {
    margin-left: 0;
    margin-right: 10px;
  }
  
  nav ul li a {
    padding: 6px 10px;
    font-size: 14px;
  }
  
  /* 响应式表格 */
  .card {
    padding: 20px;
  }
  
  .card h2 {
    font-size: 24px;
  }
  
  table {
    font-size: 12px;
    overflow-x: auto;
    display: block;
  }
  
  th, td {
    padding: 6px;
    min-width: 80px;
  }
  
  /* 头部背景 */
  .header-bg {
    height: 300px;
  }
  
  .header-content-bg h1 {
    font-size: 36px;
  }
  
  .header-content-bg p {
    font-size: 16px;
  }
  
  /* 按钮 */
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  /* 主内容 */
  main {
    padding: 40px 0;
  }
  
  /* 底部 */
  footer {
    padding: 15px 0;
    font-size: 14px;
  }
  
  main {
    padding-bottom: 70px;
  }
  
  /* 隐藏移动端的管理员登录按钮 */
  nav ul li a.admin-login {
    display: none;
  }
}

/* 页脚 */
footer {
  background-color: #333;
  color: white;
  padding: 20px 0;
  text-align: center;
  position: fixed;
  bottom: 0;
  width: 100%;
  left: 0;
}

/* 主内容区添加底部 padding，避免被固定底栏遮挡 */
main {
  padding-bottom: 80px;
}

/* 状态标签 */
.status-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.status-pending {
  background-color: #ffc107;
  color: #333;
}

.status-processing {
  background-color: #2196F3;
  color: white;
}

.status-completed {
  background-color: #2196F3;
  color: white;
}

.status-canceled {
  background-color: #f44336;
  color: white;
}

/* 导航栏激活状态 */
nav ul li a.active {
  background-color: rgba(33, 150, 243, 0.2);
  color: #2196F3;
}

/* 管理员登录入口样式 */
nav ul li a.admin-login {
  background-color: #2196F3;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

nav ul li a.admin-login:hover {
  background-color: #0b7dda;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

/* 评论表单样式 */
.comment-form {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.comment-form h3 {
  color: #2196F3;
  margin-bottom: 15px;
  font-size: 20px;
}

/* 评论列表样式 */
.comment-list {
  margin-top: 20px;
}

.comment-item {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #2196F3;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comment-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comment-item .comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comment-item .comment-username {
  font-weight: 600;
  color: #2196F3;
  font-size: 16px;
}

.comment-item .comment-time {
  font-size: 12px;
  color: #999;
}

.comment-item .comment-content {
  line-height: 1.6;
  color: #333;
}

/* 无评论提示 */
.no-comments {
  text-align: center;
  padding: 40px 0;
  color: #999;
  font-size: 16px;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-top: 20px;
}

/* 文本域样式 */
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  resize: vertical;
  min-height: 100px;
}