:root {
  --space-xs: 4px;
  --space-sm: 8px;
  --space: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-primary: #ff7043;
  --bg-secondary: #fff;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --primary: #ff7043;
  --primary-light: #ff8a65;
  --primary-pale: #fff3e0;
  --success: #4caf50;
  --warning: #ff9800;
  --danger: #f44336;
  --radius: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 4px 20px rgba(255, 112, 67, 0.2);
  --primary-gradient: linear-gradient(135deg, #ff7043, #ff8a65);
}

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

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ========== 顶部区域 ========== */
.top-header {
  background: linear-gradient(to right, #87CEEB, #E0F6FF);
  padding: 15px 0;
}

.top-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  width: 80px;
  height: 60px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.logo-text h1 {
  font-size: 28px;
  color: #d32f2f;
  font-weight: bold;
}

.logo-text p {
  font-size: 14px;
  color: #555;
}

.search-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-box {
  display: flex;
  gap: 5px;
}

.search-box input {
  width: 280px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.search-box select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-box button {
  padding: 8px 20px;
  background: #d32f2f;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.hot-search {
  font-size: 12px;
  color: #666;
}

.hot-search span {
  color: #d32f2f;
}

.auth-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.auth-link {
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.auth-link:hover {
  color: #d32f2f;
  text-decoration: underline;
}

.auth-divider {
  margin: 0 8px;
  color: #999;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.user-info .username {
  color: #d32f2f;
  font-weight: bold;
}

.user-info a {
  color: #333;
  text-decoration: none;
}

.user-info a:hover {
  color: #d32f2f;
  text-decoration: underline;
}

/* ========== 导航栏 ========== */
.main-nav {
  background: linear-gradient(to right, #ff7043, #ff8a65);
  height: 42px;
}

.main-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.nav-links {
  display: flex;
  gap: 5px;
}

.nav-links a {
  display: block;
  padding: 0 18px;
  line-height: 42px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a.active,
.nav-links a:hover {
  background: #fff;
  color: #ff7043;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-right .auth-link {
  color: #333;
  font-size: 14px;
  text-decoration: none;
}

.nav-right .auth-link:hover {
  text-decoration: underline;
}

.nav-right .auth-divider {
  color: #ffccbc;
  margin: 0;
}

.nav-right .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #fff;
}

.nav-right .user-info .username {
  color: #ffeb3b;
  font-weight: bold;
}

.nav-right .user-info a {
  color: #fff;
  text-decoration: none;
}

.nav-right .user-info a:hover {
  text-decoration: underline;
}

.quick-nav {
  background: #fff;
  padding: 5px 15px;
  border-radius: 4px;
  font-size: 13px;
  color: #ff7043;
}

/* ========== 广告横幅 ========== */
.ad-banner {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  background: #fff;
}

.ad-item {
  flex: 1;
  background: linear-gradient(135deg, #ffeb3b, #ffc107);
  padding: 15px 10px;
  text-align: center;
  border-radius: 4px;
  position: relative;
}

.ad-item span:first-child {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: #d32f2f;
}

.ad-item small {
  position: absolute;
  right: 5px;
  bottom: 5px;
  font-size: 12px;
  color: #666;
}

/* ========== 主要内容区 ========== */
.main-content {
  padding: 15px 0;
  background: #f5f5f5;
}

.main-content .container {
  display: flex;
  gap: 15px;
}

/* ========== 左侧侧边栏 ========== */
.sidebar-left {
  width: 260px;
  flex-shrink: 0;
}

.ad-box-large {
  background: #ffd700;
  height: 320px;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #000;
  margin-bottom: 15px;
}

.ad-label {
  position: absolute;
  bottom: 35px;
  left: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 5px 15px;
  font-size: 14px;
}

.ad-nums {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
}

.ad-nums span {
  width: 24px;
  height: 24px;
  background: #666;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 12px;
}

.ad-nums span.active {
  background: #ff7043;
}

/* 推荐信息区域 */
.recommend-section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.recommend-section h3 {
  padding: 12px 15px;
  background: #fff3e0;
  border-bottom: 1px solid #ddd;
  font-size: 15px;
}

.recommend-list {
  padding: 10px 15px;
}

.rec-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dotted #eee;
  text-decoration: none;
}

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

.rec-image {
  width: 65px;
  height: 65px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
}

.rec-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rec-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  opacity: 0.5;
}

.rec-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.rec-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-item:hover .rec-title {
  color: #d32f2f;
}

.rec-cat {
  font-size: 12px;
  color: #999;
}

.rec-empty {
  padding: 30px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* ========== 中间内容区 ========== */
.content-center {
  flex: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
}

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

.hot-tag {
  display: inline-block;
  background: #d32f2f;
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.section-date {
  font-size: 13px;
  color: #666;
}

.info-card {
  border: 1px solid #ddd;
  border-left: 4px solid #4caf50;
  padding: 12px 15px;
  margin-bottom: 10px;
}

.info-title {
  font-size: 15px;
  color: #d32f2f;
  margin-bottom: 8px;
}

.info-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

/* ========== 分类区域 ========== */
.categories-section {
  background: #fff;
  padding: 15px 0;
}

.section-header-inner {
  text-align: center;
  margin-bottom: 15px;
}

.section-title-inner {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.section-subtitle-inner {
  font-size: 14px;
  color: #666;
}

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

.category-card {
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 20px 15px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.category-card:hover {
  border-color: #ff7043;
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.category-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.category-card p {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

.ad-row {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.ad-col {
  flex: 1;
}

.ad-placeholder {
  height: 100px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #666;
}

.info-list {
  margin-top: 15px;
}

.info-item {
  padding: 8px 0;
  border-bottom: 1px dotted #ddd;
  font-size: 14px;
}

.info-tag {
  color: #4caf50;
  margin-right: 8px;
}

.info-item a {
  color: #333;
}

.info-item a:hover {
  color: #d32f2f;
}

.info-city {
  float: right;
  color: #999;
  font-size: 12px;
}

/* ========== 文字信息列表 ========== */
.text-info-section {
  background: #fff;
  padding: 15px;
  margin-bottom: 15px;
}

.text-info-section .section-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff7043;
}

.text-info-section .section-title-inner {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.view-more {
  font-size: 13px;
  color: #d32f2f;
}

.view-more:hover {
  text-decoration: underline;
}

.text-info-list {
  display: flex;
  flex-direction: column;
}

.text-info-item {
  padding: 10px 0;
  border-bottom: 1px dashed #e0e0e0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.info-num {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #ff7043, #ff8a65);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}

.info-title-link {
  flex: 1;
  min-width: 200px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-title-link:hover {
  color: #d32f2f;
  text-decoration: underline;
}

.info-category {
  font-size: 12px;
  color: #fff;
  background: #4caf50;
  padding: 2px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.info-preview {
  width: 100%;
  font-size: 13px;
  color: #888;
  margin-top: 6px;
  padding-left: 30px;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-tip {
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 14px;
}

/* ========== 产品展示 ========== */
.section-header-products {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff7043;
}

.section-title-products {
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: #ff7043;
  color: #fff;
}

.btn:hover {
  background: #e64a19;
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #ff7043, #ff8a65);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 112, 67, 0.3);
}

.btn-outline {
  background: transparent;
  color: #ff7043;
  border: 2px solid #ff7043;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: #ff7043;
  color: #fff;
}

/* 登录卡片 */
.auth-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 24px;
  color: #333;
  font-size: 20px;
}

/* 表单样式 */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #ff7043;
  box-shadow: 0 0 0 2px rgba(255, 112, 67, 0.1);
}

/* 管理表格 */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.admin-table th {
  background: #fff3e0;
  font-weight: 600;
  color: #333;
}

.admin-table tr:hover {
  background: #fafafa;
}

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

.empty-state h3 {
  font-size: 16px;
  font-weight: normal;
}

/* 标签页 */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 10px 20px;
  border: 1px solid #e0e0e0;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.category-tab:hover {
  border-color: #ff7043;
  color: #ff7043;
}

.category-tab.active {
  background: linear-gradient(135deg, #ff7043, #ff8a65);
  color: #fff;
  border-color: #ff7043;
}

/* Placeholder样式 */
::placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

:-ms-input-placeholder {
  color: #999 !important;
}

::-ms-input-placeholder {
  color: #999 !important;
}

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

.random-product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
}

.random-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #ff7043;
  text-decoration: none;
}

.random-product-image {
  width: 100%;
  height: 160px;
  background: #f5f5f5;
  overflow: hidden;
}

.random-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.random-product-image .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: 0.3;
}

.random-product-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.random-product-title {
  color: #333;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.random-product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #666;
}

.random-product-category {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.random-product-desc {
  color: #666;
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 右侧侧边栏 ========== */
.sidebar-right {
  width: 300px;
  flex-shrink: 0;
}

.category-nav {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
}

.category-nav h3 {
  font-size: 15px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff7043;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fff8f0;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s;
}

.cat-item:hover {
  background: #ffe4c4;
  transform: translateX(5px);
}

.cat-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
}

.cat-item span:last-child {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.ad-box-right {
  background: #f5f5f5;
  height: 160px;
  border-radius: 4px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #666;
  border: 1px solid #ddd;
}

/* 右侧信息区域 */
.info-section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
}

.info-header {
  padding: 12px 15px;
  background: #fff3e0;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.info-list {
  padding: 10px 15px;
}

.side-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dotted #eee;
}

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

.side-num {
  width: 18px;
  height: 18px;
  background: #ff7043;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  flex-shrink: 0;
}

.side-title {
  flex: 1;
  font-size: 13px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-title:hover {
  color: #d32f2f;
}

.side-views {
  font-size: 11px;
  color: #999;
  flex-shrink: 0;
}

.side-empty {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.hot-section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.hot-header {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  background: #fff3e0;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

.hot-header a {
  color: #d32f2f;
}

/* ========== 底部 ========== */
.footer {
  background: #f5f5f5;
  padding: 30px 0;
  border-top: 3px solid #ff7043;
  margin-top: 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 20px;
}

.footer-section h3 {
  font-size: 14px;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.footer-section p,
.footer-section a {
  font-size: 12px;
  color: #666;
  line-height: 2;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  font-size: 12px;
  color: #666;
}

.footer-bottom a {
  color: #1976d2;
}

/* ========== 页面通用样式 ========== */
.page-header {
  background: #fff3e0;
  padding: 20px 0;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 14px;
  color: #666;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
  .main-content .container {
    flex-direction: column;
  }
  
  .sidebar-left,
  .sidebar-right {
    width: 100%;
  }
  
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .random-products-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-header .container {
    flex-direction: column;
    gap: 15px;
  }
  
  .search-box input {
    width: 200px;
  }
  
  .nav-links {
    flex-wrap: wrap;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .random-products-list {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .ad-banner {
    flex-wrap: wrap;
  }
  
  .ad-item {
    flex: 1 1 calc(50% - 4px);
  }
  
  .logo-text h1 {
    font-size: 20px;
  }
  
  .search-box input {
    width: 150px;
  }
}
