/* ==========================================================================
   经典红色平面广告与素材门户网站样式表
   ========================================================================== */

/* 基础重置 & 全局变量 */
:root {
  --color-primary: #d9232e;        /* 昵图红 / 中国红 主色调 */
  --color-primary-hover: #b8141f;  /* 鼠标悬停暗红 */
  --color-gold: #ff9900;           /* 辅助高亮色 */
  --color-gold-hover: #e68a00;
  --color-dark: #222222;           /* 深色文字 */
  --color-gray-dark: #555555;      /* 次级文字 */
  --color-gray-light: #888888;     /* 辅助文字 */
  --color-border: #e2e8f0;         /* 边框灰 */
  --color-border-dark: #cbd5e1;
  --color-bg: #f4f6f9;             /* 全局浅灰背景 */
  --color-card-bg: #ffffff;        /* 白色卡片 */
  --container-width: 1200px;       /* 门户标准宽度 */
  --font-portal: "Microsoft YaHei", "PingFang SC", "SimSun", sans-serif;
}

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

body {
  font-family: var(--font-portal);
  font-size: 13px;
  color: var(--color-dark);
  background-color: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #333;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-primary);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* 门户版心容器 */
.container {
  width: var(--container-width);
  margin: 0 auto;
  padding: 0 10px;
}

/* ==========================================================================
   1. 顶部通栏 & 头部搜索 (Header & Top Bar)
   ========================================================================== */

/* 顶部灰色小条 */
.top-bar {
  background-color: #2e353d;
  color: #aeb9c6;
  font-size: 12px;
  height: 32px;
  line-height: 32px;
  border-bottom: 1px solid #23282f;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a {
  color: #c8d3e0;
  margin: 0 8px;
}

.top-bar a:hover {
  color: #ffffff;
}

.top-bar .welcome-msg span {
  color: var(--color-gold);
  font-weight: bold;
}

.top-bar .nav-right a.highlight {
  color: #ff9900;
  font-weight: bold;
}

/* 头部 Logo & 搜索框 */
.main-header {
  background-color: #ffffff;
  padding: 18px 0;
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

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

/* Logo 样式 */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-badge {
  background: linear-gradient(135deg, var(--color-primary), #a3111b);
  color: #fff;
  font-weight: 900;
  font-size: 24px;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(217, 35, 46, 0.3);
}

.logo-text h1 {
  font-size: 22px;
  color: var(--color-primary);
  font-weight: bold;
  line-height: 1.1;
  letter-spacing: 1px;
}

.logo-text p {
  font-size: 11px;
  color: #777;
  margin-top: 3px;
}

/* 经典搜索框大栏 */
.header-search {
  flex: 1;
  max-width: 580px;
  margin: 0 30px;
}

.search-box-wrap {
  display: flex;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  background-color: #fff;
}

.search-type-select {
  background-color: #f7f9fa;
  border-right: 1px solid #e2e8f0;
  padding: 0 10px;
  font-size: 12px;
  color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
  user-select: none;
  min-width: 90px;
  justify-content: space-between;
}

.search-type-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 110px;
  background: #fff;
  border: 1px solid var(--color-border-dark);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: none;
  z-index: 1000;
}

.search-type-dropdown div {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
}

.search-type-dropdown div:hover {
  background-color: #fff5f5;
  color: var(--color-primary);
}

.search-input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  color: #333;
}

.search-btn {
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0 24px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.hot-keywords {
  margin-top: 6px;
  font-size: 12px;
  color: #888;
  display: flex;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.hot-keywords span {
  color: #999;
}

.hot-keywords a {
  color: #666;
}

.hot-keywords a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* 顶部快捷操作按钮 */
.header-actions {
  display: flex;
  gap: 10px;
}

.btn-upload-nav {
  background: linear-gradient(to bottom, #ff4d4f, #d9232e);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(217, 35, 46, 0.3);
}

.btn-upload-nav:hover {
  background: #b8141f;
}

.btn-vip-nav {
  background: linear-gradient(to bottom, #ffc107, #ff9900);
  color: #333 !important;
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(255, 153, 0, 0.3);
}

.btn-vip-nav:hover {
  background: #e68a00;
  color: #000 !important;
}

/* ==========================================================================
   2. 主导航栏 (Primary Navigation)
   ========================================================================== */

.nav-bar {
  background-color: #1e252d;
  border-bottom: 2px solid var(--color-primary);
}

.nav-bar .container {
  display: flex;
}

.nav-item {
  color: #e2e8f0;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
  position: relative;
  transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
  background-color: var(--color-primary);
  color: #ffffff;
}

.nav-item .badge-hot {
  position: absolute;
  top: 2px;
  right: 4px;
  background-color: #ff9900;
  color: #000;
  font-size: 9px;
  padding: 0 4px;
  border-radius: 3px;
  font-weight: normal;
}

/* ==========================================================================
   3. 经典侧边分类 + 幻灯片区 (Hero Grid Section)
   ========================================================================== */

.hero-section {
  margin-top: 15px;
  margin-bottom: 20px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 15px;
}

/* 左侧多级分类菜单 */
.category-sidebar {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.category-sidebar-header {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--color-primary);
}

.cat-group {
  border-bottom: 1px solid #f1f5f9;
  padding: 14px 15px;
  transition: background-color 0.2s;
}

.cat-group:last-child {
  border-bottom: none;
}

.cat-group:hover {
  background-color: #fafafa;
}

.cat-group-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cat-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background-color: #fff0f0;
  font-size: 14px;
}

.cat-group-title a {
  color: #1e293b;
  transition: color 0.2s;
}

.cat-group-title a:hover {
  color: var(--color-primary);
}

.secondary-category-row {
  padding: 7px 12px;
}

.secondary-category-row .cat-group-title {
  margin-bottom: 0;
}

.secondary-category-row .cat-icon-badge {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  font-size: 12px;
}

.secondary-category-row .cat-group-title a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-count {
  margin-left: auto;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 400;
}

.cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  padding-left: 34px;
}

.cat-tags a {
  color: #64748b;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  display: inline-block;
}

.cat-tags a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background-color: #fff5f5;
  text-decoration: none;
}

/* 中间轮播Banner */
.hero-slider {
  position: relative;
  background-color: #111;
  border-radius: 4px;
  overflow: hidden;
  height: 385px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.slide-item {
  width: 100%;
  height: 100%;
  position: relative;
  display: none;
}

.slide-item.active {
  display: block;
}

.slide-img-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  padding: 20px;
  color: #fff;
}

.slide-overlay h2 {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.slide-overlay p {
  font-size: 13px;
  color: #ddd;
}

.slider-dots {
  position: absolute;
  bottom: 12px;
  right: 15px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  background-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.dot.active {
  background-color: var(--color-primary);
  transform: scale(1.2);
}

/* 右侧公告 & 统计榜单 */
.notice-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-card {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.panel-title {
  font-size: 13px;
  font-weight: bold;
  color: #2c3e50;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 6px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title .more {
  font-size: 11px;
  font-weight: normal;
  color: #888;
}

.notice-list {
  font-size: 12px;
}

.notice-list li {
  padding: 5px 0;
  border-bottom: 1px dotted #eee;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

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

.notice-list a {
  color: #444;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-list .date {
  color: #aaa;
  font-size: 11px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  text-align: center;
  margin-top: 6px;
}

.stat-item {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 8px 4px;
}

.stat-item .num {
  font-size: 15px;
  font-weight: bold;
  color: var(--color-primary);
}

.stat-item .lbl {
  font-size: 11px;
  color: #777;
}

/* ==========================================================================
   4. 素材分类块与经典卡片 (Category Block & Card Grid)
   ========================================================================== */

.category-block {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  overflow: hidden;
}

.block-header {
  background-color: #f8fafc;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.block-title h2 {
  font-size: 16px;
  color: #1e293b;
  font-weight: bold;
}

.block-title .icon-tag {
  background-color: var(--color-primary);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.block-subnav {
  display: flex;
  gap: 15px;
  font-size: 12px;
}

.block-subnav a {
  color: #64748b;
  padding: 2px 6px;
  border-radius: 3px;
}

.block-subnav a:hover, .block-subnav a.active {
  background-color: var(--color-primary);
  color: #fff;
}

.block-more {
  font-size: 12px;
  color: #64748b;
}

.block-more:hover {
  color: var(--color-primary);
}

/* 素材卡片网格布局 */
.material-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  padding: 16px;
}

/* 经典昵图网风格卡片 */
.material-card {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.material-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 6px 16px rgba(217, 35, 46, 0.15);
  transform: translateY(-3px);
}

/* 缩略图容器 */
.card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background-color: #f1f5f9;
  overflow: hidden;
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.material-card:hover .card-thumb-wrap img {
  transform: scale(1.05);
}

/* 软件格式色彩角标 (PSD / CDR / AI / JPG) */
.badge-format {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 2px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 2;
}

.badge-format.psd { background-color: #20639b; }
.badge-format.cdr { background-color: #27ae60; }
.badge-format.ai  { background-color: #e67e22; }
.badge-format.max { background-color: #8e44ad; }
.badge-format.jpg { background-color: #7f8c8d; }

/* DPI 标签 */
.badge-dpi {
  position: absolute;
  top: 6px;
  right: 6px;
  background-color: rgba(0,0,0,0.7);
  color: #ffc107;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 2px;
  z-index: 2;
}

/* 悬停快捷预览遮罩 */
.card-overlay-btn {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 3;
}

.material-card:hover .card-overlay-btn {
  opacity: 1;
}

.btn-quick-preview {
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.btn-quick-preview:hover {
  background-color: #b8141f;
}

/* 卡片文本内容 */
.card-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.card-title {
  font-size: 12px;
  font-weight: normal;
  color: #333;
  line-height: 1.4;
  height: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}

.card-title:hover {
  color: var(--color-primary);
}

.card-specs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #888;
  border-top: 1px dotted #eee;
  padding-top: 6px;
  margin-top: auto;
}

.card-price {
  color: var(--color-gold);
  font-weight: bold;
}

.card-downloads {
  color: #94a3b8;
}

/* ==========================================================================
   5. 多条件筛选框 (List Page Filter Box)
   ========================================================================== */

.filter-panel {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.filter-row {
  display: flex;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dotted #e2e8f0;
  font-size: 12px;
}

.filter-row:last-child {
  border-bottom: none;
}

.filter-label {
  width: 90px;
  color: #64748b;
  font-weight: bold;
  padding-top: 3px;
  flex-shrink: 0;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.filter-opt {
  padding: 3px 10px;
  border-radius: 3px;
  color: #334155;
  transition: all 0.15s;
}

.filter-opt:hover {
  background-color: #f1f5f9;
  color: var(--color-primary);
}

.filter-opt.active {
  background-color: var(--color-primary);
  color: #ffffff !important;
  font-weight: bold;
}

/* 排序与展示条 */
.sort-bar {
  background-color: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 8px 15px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.sort-options {
  display: flex;
  gap: 15px;
}

.sort-item {
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sort-item.active {
  color: var(--color-primary);
  font-weight: bold;
}

.result-count span {
  color: var(--color-primary);
  font-weight: bold;
}

/* 经典分页控件 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 30px 0;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  background-color: #fff;
  color: #333;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
}

.page-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.page-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: bold;
}

.page-btn.disabled {
  color: #ccc;
  cursor: not-allowed;
  border-color: #eee;
}

.page-ellipsis {
  padding: 0 2px;
  color: #999;
}

/* ==========================================================================
   6. 素材详情页 layout (Detail Page Layout)
   ========================================================================== */

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-top: 15px;
}

.detail-main {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.detail-title {
  font-size: 18px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 12px;
  line-height: 1.4;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  color: #64748b;
  padding-bottom: 15px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.detail-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 水印保护大图预览 */
.watermark-preview-wrap {
  position: relative;
  background-color: #f1f5f9;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 20px;
  text-align: center;
  overflow: hidden;
}

.detail-image-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  vertical-align: top;
}

.watermark-preview-wrap img {
  max-height: 600px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 经典网状水印文字 */
.watermark-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 60px,
    rgba(217, 35, 46, 0.04) 60px,
    rgba(217, 35, 46, 0.04) 120px
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.watermark-text {
  font-size: 32px;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.12);
  transform: rotate(-30deg);
  user-select: none;
  letter-spacing: 4px;
  white-space: nowrap;
}

.watermark-corner {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  min-width: 180px;
  max-width: 70%;
  min-height: 44px;
  padding: 8px 14px;
  background-color: rgba(217, 35, 46, 0.94);
  color: #fff;
  pointer-events: none;
  text-align: left;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

.watermark-corner strong,
.watermark-corner span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watermark-corner strong {
  font-size: 13px;
  line-height: 1.35;
}

.watermark-corner span {
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.25;
  opacity: 0.9;
}

/* 右侧属性表与下载面板 */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.download-box {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.download-price-tag {
  background-color: #fff5f5;
  border: 1px dashed var(--color-primary);
  border-radius: 4px;
  padding: 12px;
  text-align: center;
  margin-bottom: 15px;
}

.price-score {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-primary);
}

.btn-download-big {
  width: 100%;
  background: linear-gradient(to bottom, #e12d38, #c8161d);
  color: #fff;
  border: none;
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(217, 35, 46, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-download-big:hover {
  background: #b8141f;
  transform: translateY(-1px);
}

.btn-fav-big {
  width: 100%;
  background-color: #f8fafc;
  border: 1px solid var(--color-border);
  color: #475569;
  padding: 10px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-fav-big:hover {
  background-color: #f1f5f9;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* 参数规格表格 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 15px;
}

.spec-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.spec-table td.lbl {
  color: #64748b;
  width: 90px;
  background-color: #f8fafc;
}

.spec-table td.val {
  color: #1e293b;
  font-weight: bold;
}

/* 设计师信息卡 */
.designer-card {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.designer-avatar {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-primary);
  background-color: #fff;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  text-align: center;
}

.designer-info {
  min-width: 0;
}

.designer-info h4 {
  font-size: 14px;
  font-weight: bold;
  color: #1e293b;
  line-height: 1.5;
}

.designer-info p {
  font-size: 11px;
  color: #64748b;
  line-height: 1.7;
}

/* ==========================================================================
   7. 作品发布页 (Upload Page)
   ========================================================================== */

.form-panel {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 25px 30px;
  margin-top: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.form-header {
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.form-header h2 {
  font-size: 18px;
  font-weight: bold;
  color: #1e293b;
}

.form-group {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: flex-start;
  gap: 15px;
}

.form-label {
  font-size: 13px;
  font-weight: bold;
  color: #475569;
  text-align: right;
  padding-top: 8px;
}

.form-label .required {
  color: var(--color-primary);
  margin-right: 4px;
}

.form-control {
  width: 100%;
  max-width: 600px;
  padding: 8px 12px;
  border: 1px solid var(--color-border-dark);
  border-radius: 4px;
  font-size: 13px;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--color-primary);
}

/* 拖拽上传框 */
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 6px;
  padding: 30px;
  text-align: center;
  background-color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
  max-width: 600px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--color-primary);
  background-color: #fff5f5;
}

.dropzone-icon {
  font-size: 36px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

/* ==========================================================================
   8. 会员中心 (User Center Page)
   ========================================================================== */

.user-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  margin-top: 15px;
}

.user-sidebar {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.user-menu-head {
  background-color: #2b323b;
  color: #fff;
  padding: 15px;
  text-align: center;
}

.user-menu-head h3 {
  font-size: 15px;
  margin-top: 8px;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: #475569;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.15s;
}

.user-menu-item:hover, .user-menu-item.active {
  background-color: #fff5f5;
  color: var(--color-primary);
  border-left: 3px solid var(--color-primary);
  font-weight: bold;
}

.user-content-panel {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 20px;
  min-height: 500px;
}

/* 经典数据表格 */
.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 15px;
}

.portal-table th {
  background-color: #f8fafc;
  color: #475569;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid #e2e8f0;
}

.portal-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

/* ==========================================================================
   9. 登录与注册页 (Login / Register Page)
   ========================================================================== */

body[data-page="auth"] {
  min-width: 0;
  background-color: #eef1f5;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-wide {
  width: min(100% - 48px, 1880px);
  margin: 0 auto;
}

.auth-utility {
  min-height: 52px;
  background-color: #2b323a;
  color: #b9c4d2;
  border-bottom: 1px solid #20262d;
  font-size: 12px;
}

.auth-utility .auth-wide {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-utility nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.auth-utility a {
  color: #c5cfdb;
}

.auth-utility a:hover {
  color: #fff;
}

.auth-brand-header {
  min-height: 126px;
  background-color: #fff;
  border-bottom: 1px solid #dbe1e8;
}

.auth-brand-header .auth-wide {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-brand-header .logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  font-size: 24px;
  box-shadow: 0 3px 6px rgba(217, 35, 46, 0.3);
}

.auth-brand-header .logo-text h1 {
  font-size: 22px;
}

.auth-brand-header .logo-text p {
  margin-top: 3px;
  font-size: 11px;
  color: #777;
}

.auth-service {
  color: #64748b;
  font-size: 13px;
}

.auth-service strong {
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
}

.auth-stage {
  flex: 1;
  padding: 64px 24px;
  background-color: #eef1f5;
}

.auth-container {
  width: min(100%, 1440px);
  min-height: 660px;
  margin: 0 auto;
  background-color: #fff;
  border: 1px solid #e1e6ed;
  border-radius: 10px;
  display: grid;
  grid-template-columns: minmax(430px, 43%) minmax(0, 57%);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(35, 43, 53, 0.08);
}

.auth-banner {
  background-color: #65141f;
  color: #fff;
  padding: 78px 48px;
  display: flex;
  align-items: center;
}

.auth-banner-content {
  width: 100%;
}

.auth-banner h2 {
  font-size: 26px;
  line-height: 1.35;
  margin-bottom: 44px;
}

.auth-banner p {
  max-width: 490px;
  font-size: 14px;
  color: #f2dde1;
  line-height: 1.85;
}

.auth-feature-list {
  margin-top: 44px;
  padding: 28px 0 0 22px;
  border-top: 1px solid rgba(255,255,255,0.25);
  list-style: disc;
}

.auth-feature-list li {
  margin-top: 15px;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
}

.auth-form-wrap {
  padding: 62px 56px;
}

.auth-tabs {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  border-bottom: 2px solid #edf0f4;
  margin-bottom: 36px;
  overflow-x: auto;
}

.auth-tab-btn {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  font-size: 16px;
  font-weight: bold;
  color: #63738d;
  padding: 0 0 14px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.auth-tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.auth-tab-btn:disabled {
  color: #9aa5b4;
  cursor: not-allowed;
}

.auth-form-panel[hidden],
.auth-form-panel .auth-field[hidden] {
  display: none !important;
}

.auth-field {
  margin-bottom: 20px;
}

.auth-field label {
  display: block;
  margin-bottom: 9px;
  color: #52627a;
  font-size: 13px;
}

.auth-field .form-control {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 5px;
  font-size: 14px;
}

.auth-form-tip {
  min-height: 22px;
  color: #8290a3;
  font-size: 13px;
  line-height: 1.7;
}

.auth-form-panel .form-status {
  min-height: 24px;
  margin-top: 4px;
  color: var(--color-primary);
}

.auth-form-panel .auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  padding: 12px 24px;
  justify-content: center;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 7px 14px rgba(217, 35, 46, 0.18);
}

.auth-footer {
  min-height: 136px;
  border-top: 4px solid var(--color-primary);
  background-color: #222831;
  color: #718098;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  text-align: center;
  font-size: 12px;
}

/* ==========================================================================
   10. 页脚 (Portal Footer)
   ========================================================================== */

.main-footer {
  background-color: #222831;
  color: #94a3b8;
  font-size: 12px;
  margin-top: 40px;
  border-top: 3px solid var(--color-primary);
  padding-top: 30px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 25px;
  border-bottom: 1px solid #334155;
}

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 12px;
  border-left: 3px solid var(--color-primary);
  padding-left: 8px;
}

.footer-col ul li {
  margin-bottom: 6px;
}

.footer-col a {
  color: #94a3b8;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  color: #64748b;
}

/* 模态弹窗与 Toast 消息 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.6);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-card {
  background-color: #fff;
  border-radius: 6px;
  max-width: 500px;
  width: 90%;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

.toast-msg {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: none;
  font-size: 13px;
}

/* 仅在窄屏收紧传统固定版心，桌面端样式保持原门户布局。 */
@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .container { width: 100%; min-width: 0; padding-left: 12px; padding-right: 12px; }
  .top-bar { height: auto; line-height: 1.6; padding: 7px 0; }
  .top-bar .container, .main-header .container { flex-wrap: wrap; gap: 10px; }
  .main-header { padding: 12px 0; }
  .header-search { order: 3; width: 100%; max-width: none; margin: 0; }
  .header-actions { margin-left: auto; }
  .nav-bar .container { overflow-x: auto; padding-left: 0; padding-right: 0; }
  .nav-item { white-space: nowrap; padding-left: 13px; padding-right: 13px; }
  .hero-layout, .detail-layout, .user-layout, .auth-container { grid-template-columns: 1fr; }
  .hero-layout { gap: 12px; }
  .category-sidebar, .hero-notice { width: 100%; }
  .hero-slider { min-height: 190px; }
  .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filter-row { align-items: flex-start; flex-wrap: wrap; }
  .filter-row > strong { width: 100%; }
  .list-toolbar, .sort-bar { flex-wrap: wrap; gap: 10px; }
  .detail-layout { margin-top: 10px; }
  .detail-main, .detail-sidebar, .user-content-panel, .auth-form-wrap { padding: 15px; }
  .watermark-preview-wrap { padding: 10px; }
  .watermark-corner { min-width: 130px; min-height: 38px; padding: 6px 10px; }
  .watermark-corner strong { font-size: 12px; }
  .form-group { grid-template-columns: 1fr; gap: 6px; }
  .form-label { text-align: left; padding-top: 0; }
  .form-row { display: block; }
  .auth-wide { width: min(100% - 28px, 1880px); }
  .auth-utility { font-size: 12px; }
  .auth-utility nav { gap: 14px; }
  .auth-brand-header,
  .auth-brand-header .auth-wide { min-height: 94px; }
  .auth-brand-header .logo-badge { width: 44px; height: 44px; font-size: 22px; }
  .auth-brand-header .logo-text h1 { font-size: 20px; }
  .auth-brand-header .logo-text p { font-size: 11px; }
  .auth-service { display: none; }
  .auth-stage { padding: 20px 12px; }
  .auth-container { margin: 0; min-height: 0; }
  .auth-banner { padding: 28px 22px; }
  .auth-banner h2 { font-size: 24px; margin-bottom: 16px; }
  .auth-banner p { font-size: 14px; }
  .auth-feature-list { margin-top: 20px; padding: 12px 0 0 18px; }
  .auth-feature-list li { font-size: 13px; margin-top: 8px; }
  .auth-form-wrap { padding: 28px 22px; }
  .auth-tabs { gap: 20px; margin-bottom: 26px; }
  .auth-tab-btn { font-size: 15px; }
  .auth-field .form-control { height: 48px; }
  .auth-footer { min-height: 100px; font-size: 12px; }
  .footer-links-grid { grid-template-columns: 1fr 1fr; }
}

.site-context {
  display: none !important;
}

.footer-bottom a {
  color: inherit;
}
