/**
 * Toka - 虛擬商品銷售平台主題
 * 現代化設計，專注於用戶體驗和視覺效果
 */

/* 全局變量與重置 */
:root {
  --primary-color: #ff3e3e;
  --primary-dark: #d32f2f;
  --primary-light: #ff6659;
  --secondary-color: #2c2c2c;
  --accent-color: #ffeb3b;
  --text-primary: #212121;
  --text-secondary: #757575;
  --text-light: #ffffff;
  --bg-light: #ffffff;
  --bg-dark: #121212;
  --bg-card: #ffffff;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 8px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --font-main: 'Segoe UI', 'Microsoft JhengHei', Arial, sans-serif;
  --card-radius: 8px; /* 默認卡片圓角 */
}

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

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: #f5f5f5;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.02);
  z-index: -1;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.col-3 {
  width: 25%;
  padding: 0 10px;
}

.col-9 {
  width: 75%;
  padding: 0 10px;
}

.col-12 {
  width: 100%;
  padding: 0 10px;
}

/* 導航欄 */
.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 5px 0;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
}

.navbar-left {
  display: flex;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.navbar-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
  box-shadow: var(--shadow-sm);
}

.site-logo {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 20px;
  color: #555;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.navbar-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.navbar-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.nav-link {
  color: var(--text-secondary);
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  margin: 0 5px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(255, 62, 62, 0.05);
  transform: translateY(-2px);
}

.nav-link i {
  margin-right: 6px;
}

.balance-display {
  background: linear-gradient(45deg, var(--success-color), #26c6da);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  margin-left: 10px;
  font-size: 16px;
}

/* 內容區域 */
.content-wrapper {
  padding-top: 65px;
    padding-bottom: 15px;
}

/* 卡片樣式 */
.card {
  background-color: rgba(255, 255, 255, var(--card-opacity));
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 15px;
  overflow: hidden;
  border: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(248, 248, 248, var(--card-opacity));
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.card-title i {
  margin-right: 8px;
  color: var(--text-primary);
}

.card-block {
  padding: 0;
}

/* 商品列表卡片特殊樣式 */
.shop-html .card-block {
  padding: 0;
}

.category-list .card-block {
  padding: 10px;
}

/* 公告區域 */
.notice-html .card-block {
  line-height: 1.8;
}

/* 搜索區域 */
.input-group {
  display: flex;
  width: 100%;
}

.commodity-search {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  outline: none;
}

.commodity-search:focus {
  border-color: #ccc;
}

.search-btn {
  background-color: #ff3e3e;
  color: white;
  border: none;
  padding: 6px 15px;
  border-radius: 0 4px 4px 0;
    cursor: pointer;
  font-weight: 500;
    font-size: 14px;
}

.search-btn:hover {
  background-color: #ff2525;
}

/* 分類列表 */
.category-list {
  max-height: 600px;
  overflow-y: auto;
}

.category-list::-webkit-scrollbar {
  width: 6px;
}

.category-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.category-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 10px;
}

.category-list::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

.category-list table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.category-list .category {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  border-radius: calc(var(--card-radius) * 0.5); /* 使用卡片圓角變量 */
  transition: all 0.3s ease;
  margin-bottom: 5px;
  background-color: rgba(249, 249, 249, var(--card-opacity));
}

.category-list .category:hover {
  background-color: rgba(255, 62, 62, 0.05);
  transform: translateX(5px);
}

.category-list .category.checked {
  background-color: rgba(255, 62, 62, 0.1);
  color: var(--primary-color);
  font-weight: 600;
  position: relative;
  padding-left: 15px;
}

.category-list .category.checked::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* 分類圖標樣式 */
.category-list .commodity-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border-radius: 4px;
  object-fit: cover;
}

/* 商品列表 */
.shop-content {
  max-height: 600px;
  overflow-y: auto;
}

.shop-content::-webkit-scrollbar {
  width: 6px;
}

.shop-content::-webkit-scrollbar-track {
  background: #f1f1f1;
    border-radius: 10px;
}

.shop-content::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 10px;
}

.shop-content::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

/* 表格樣式 */
.layui-table {
  width: 100%;
  background-color: transparent;
  color: var(--text-primary);
  margin: 0;
  border: none;
  border-collapse: separate; /* 分離邊框模式 */
  border-spacing: 0 8px; /* 增加行間距，從4px改為8px */
}

/* 表頭樣式 */
.layui-table .head {
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

.layui-table .head th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 500;
  color: #333;
  border: none;
}

.layui-table .head th:first-child {
  padding-left: 15px;
  text-align: left;
}

.layui-table .head th:nth-child(2) {
  text-align: center;
}

.layui-table .head th:nth-child(3) {
  text-align: center;
}

/* 商品行樣式 */
.layui-table .item {
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 4px; /* 增加行之間的間隔 */
}

.layui-table .item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.layui-table .item td {
  padding: 14px 10px; /* 增加垂直內邊距，從12px改為14px */
  vertical-align: middle;
  border: none;
}

.layui-table .item:hover {
  background-color: #fafafa;
}

.layui-table .item td:first-child {
  display: flex;
  align-items: center;
  padding-left: 15px;
}

.layui-table .item td:nth-child(2) {
  color: #ff3e3e;
  text-align: center;
  font-weight: 500;
}

.layui-table .item td:nth-child(3) {
  color: #4caf50;
  text-align: center;
  font-weight: 400;
}

.layui-table .item td:nth-child(4) {
  text-align: center;
}

/* 查詢按鈕 */
.new-view-button {
    position: relative;
  border: none;
  background: none;
  padding: 0;
    cursor: pointer;
  outline: none;
  width: 100px;
  height: 32px;
  overflow: hidden;
}

.new-view-button .button-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #ff3e3e;
  border-radius: calc(var(--card-radius) * 0.5); /* 使用卡片圓角變量 */
  color: white;
  font-weight: 500;
  font-size: 14px;
  z-index: 2;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(255, 62, 62, 0.3);
}

.new-view-button:hover .button-content {
  background-color: #ff2525;
  box-shadow: 0 2px 5px rgba(255, 62, 62, 0.4);
}

.new-view-button .button-content i {
  margin-right: 4px;
  font-size: 14px;
}

.new-view-button:active .button-content {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(255, 62, 62, 0.3),
              inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.new-view-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 3;
  transition: left 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.new-view-button:hover::after {
  left: 100%;
}

/* 歡迎訊息 */
.keguan {
  text-align: center;
  padding: 40px 0;
  font-size: 18px;
  color: var(--text-secondary);
}

/* 彈出窗口樣式 */
.open-commodity, .open-query {
  padding: 30px;
  background-color: #fff;
  position: relative;
}

/* 自定义关闭按钮 */
.custom-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.25s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.custom-close-btn i {
  color: #666;
  font-size: 20px;
  transition: all 0.25s ease;
}

.custom-close-btn:hover {
  background-color: var(--primary-color);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 3px 8px rgba(255, 62, 62, 0.3);
}

.custom-close-btn:hover i {
  color: white;
}

.custom-close-btn:active {
  transform: rotate(90deg) scale(0.95);
}

/* 商品名称样式 */
.commodity_name {
  text-align: center;
  font-weight: 700;
  font-size: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 25px;
  color: var(--text-primary);
  position: relative;
}

.commodity_name::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  border-radius: 3px;
}

/* 分享链接样式 */
.share_url {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share_url:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--primary-color);
}

.share_url i {
  margin-right: 6px;
  color: var(--primary-color);
}

/* 商品描述样式 */
.description {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.7;
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary-color);
}

/* 商品信息行样式 */
.general {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  position: relative;
}

.general::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 50%;
  margin-right: 10px;
  opacity: 0.7;
}

/* 价格样式 */
.price {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 22px !important;
  margin-left: 5px;
}

.price_tips {
  color: var(--primary-color);
  font-size: 14px;
  margin-left: 5px;
  opacity: 0.8;
}

/* 输入框样式 */
.acg-input {
  display: inline-block;
  width: 240px;
  height: 38px;
  background-color: #f8f8f8;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 15px;
  transition: all var(--transition-fast);
  margin-left: 10px;
}

.acg-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 62, 62, 0.1);
  outline: none;
  background-color: #fff;
}

.purchase_num {
  width: 80px !important;
  text-align: center;
  font-weight: 600;
}

/* 库存数量样式 */
.kucun {
  margin-left: 15px;
  font-size: 14px;
  color: var(--text-secondary);
}

.card_count {
  color: var(--success-color);
  font-weight: 600;
  margin-left: 3px;
}

/* 订单金额样式 */
.trade_amount {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 24px;
  margin-left: 10px;
}

/* 支付区域样式 */
.pay-content {
  border-top: 1px solid var(--border-color);
  margin-top: 25px;
  padding-top: 25px;
  position: relative;
}

.pay-content::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  border-radius: 3px;
}

.pay-content label {
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.pay-content label i {
  margin-right: 10px;
  color: var(--primary-color);
}

/* 支付按钮样式 */
.pay-button {
  position: relative;
  margin: 0 12px 12px 0;
  background-color: #f8f8f8;
  font-size: 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  user-select: none;
  cursor: pointer;
  padding: 10px 18px;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  font-weight: 500;
}

.pay-button:hover {
  background-color: rgba(255, 62, 62, 0.08);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.pay-button img {
  height: 24px;
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 4px;
}

/* 弹窗样式 */
.layui-layer[type=page] {
  background-color: rgba(255, 255, 255, var(--card-opacity)) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg), 0 10px 40px rgba(0, 0, 0, 0.1) !important;
  overflow: hidden;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.layui-layer-title {
  background-color: rgba(255, 255, 255, var(--card-opacity)) !important;
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 15px 20px !important;
  font-size: 18px !important;
}

.layui-layer-content {
  color: var(--text-primary) !important;
  overflow: auto !important;
}

/* 客服链接样式 */
.qq-service, .web-service {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: var(--radius-md);
  margin-right: 12px;
  margin-left: 10px;
  transition: all var(--transition-fast);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.qq-service {
  color: #1da1f2;
  background-color: rgba(29, 161, 242, 0.1);
}

.qq-service:hover {
  background-color: rgba(29, 161, 242, 0.2);
  color: #1da1f2;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(29, 161, 242, 0.15);
}

.web-service {
  color: #ff5722;
  background-color: rgba(255, 87, 34, 0.1);
}

.web-service:hover {
  background-color: rgba(255, 87, 34, 0.2);
  color: #ff5722;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 87, 34, 0.15);
}

.qq-service i, .web-service i {
  margin-right: 6px;
  font-size: 16px;
}

/* 服务条款和政策须知样式 */
.terms-policy-container {
  margin-top: 20px;
  border: 1px solid #e0e0e0;
  border-radius: var(--card-radius); /* 使用卡片圓角變量 */
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.terms-policy-header {
  padding: 12px 15px;
  background-color: rgba(242, 242, 242, var(--card-opacity));
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  color: #333;
  font-size: 15px;
  display: flex;
  align-items: center;
}

.terms-policy-header i {
  color: var(--primary-color);
  margin-right: 8px;
  font-size: 16px;
}

.terms-policy-content {
  padding: 15px;
}

.terms-policy-content p {
  margin: 0 0 12px;
  color: #444;
  font-size: 14px;
}

.terms-policy-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 15px;
}

.terms-policy-content li {
  padding: 6px 0;
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: flex-start;
}

.terms-policy-content li i {
  color: var(--success-color);
  margin-right: 8px;
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}

.terms-policy-agreement {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px dashed #e0e0e0;
}

.agreement-wrapper {
  display: flex;
  padding: 5px 0;
}

/* 服务条款同意复选框样式 */
.agreement-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  margin: 5px 0;
  padding: 8px 0;
  width: 100%;
}

.agreement-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  display: inline-block;
  position: relative;
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin-right: 12px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.agreement-checkbox:hover .checkmark {
  border-color: #aaa;
  background-color: #f9f9f9;
}

.agreement-checkbox input:checked + .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.agreement-checkbox:active .checkmark {
  transform: scale(0.9);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 8px;
  top: 4px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.agreement-checkbox input:checked + .checkmark:after {
  display: block;
}

.agreement-text {
  font-size: 14px;
  color: #444;
  font-weight: 500;
  line-height: 1.4;
}

/* 高亮提醒效果 */
@keyframes highlightPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 62, 62, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 62, 62, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 62, 62, 0); }
}

.highlight-terms {
  animation: highlightPulse 1.5s ease-out;
  border-color: var(--primary-color) !important;
}

/* 響應式設計 - 修復語法錯誤 */
@media screen and (max-width: 992px) {
  .navbar-toggle {
    display: block;
  }
  
  .auth-buttons {
    display: none;
  }
  
  .navbar-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    flex-direction: column;
    align-items: flex-start;
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 999;
  }
  
  .navbar-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-left: 0;
  }
  
  .nav-link {
    width: 100%;
    padding: 12px 15px;
    margin: 2px 0;
    border-radius: 6px;
  }
  
  .nav-link:hover {
    transform: none;
    background-color: rgba(0, 0, 0, 0.05);
  }
  
  .navbar-menu .auth-buttons {
    display: flex;
    margin-top: 15px;
    width: 100%;
    justify-content: center;
  }
  
  .col-3, .col-9 {
    width: 100%;
  }
  
  .category-list {
    max-height: 300px;
  }
}

@media screen and (max-width: 576px) {
  .site-logo {
    font-size: 18px;
  }
  
    .open-commodity, .open-query {
        padding: 20px;
    }

    .layui-layer[type=page] {
        border-radius: 0 !important;
    }
}

/* 頁腳樣式 */
.footer {
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
  padding: 25px 0 15px;
  margin-top: 40px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

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

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.footer-logo img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
    margin-right: 8px;
}

.footer-logo .site-logo {
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(45deg, var(--primary-color), #ff6659);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.footer-link {
  color: #555;
  margin-right: 15px;
  font-size: 13px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-social {
  display: flex;
}

.social-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: all var(--transition-fast);
}

.social-icon i {
  color: #555;
  font-size: 14px;
}

.social-icon:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

.social-icon:hover i {
  color: white;
}

.footer-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 15px 0;
}

.content-icp {
  text-align: center;
  color: #666;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
}

.footer-copyright {
  text-align: center;
  color: #666;
  font-size: 12px;
  font-weight: 500;
}

.footer-copyright p {
  margin: 0;
}

@media screen and (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
    margin: 12px 0;
  }
  
  .footer-link {
    margin: 0 8px 8px;
    font-size: 12px;
  }
  
  .footer-social {
    margin-top: 8px;
  }
  
  .social-icon {
    width: 26px;
    height: 26px;
    margin: 0 4px;
  }
  
  .social-icon i {
    font-size: 12px;
  }
  
  .content-icp, .footer-copyright {
    font-size: 11px;
  }
}

/* 種類選擇樣式 */
.race-click {
  margin-right: 10px;
  margin-bottom: 10px;
  padding: 8px 15px;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-block;
  user-select: none;
  transition: all var(--transition-fast);
  background-color: #f5f5f5;
  color: var(--text-secondary);
}

.race-click:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: rgba(255, 62, 62, 0.05);
}

.race-click.checked {
  background-color: rgba(255, 62, 62, 0.1);
  border: 1px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
  font-weight: 600;
}

/* 其他彈窗樣式 */
.delivery_way_hand {
  color: white;
  background: var(--error-color);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-left: 5px;
}

.delivery_way_auto {
  color: white;
  background: var(--success-color);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-left: 5px;
}

/* 这些样式已经在弹窗样式中重新定义，保留此注释以防止样式冲突 */

/* 滾動條樣式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Discord導航項樣式 */
.nav-link.discord-link {
  color: #5865F2;
  font-weight: 600;
}

.nav-link.discord-link:hover {
  background-color: rgba(88, 101, 242, 0.1);
  color: #5865F2;
}

/* 商品表格样式 */
.shop-content {
  max-height: 900px; /* 增加高度，顯示更多商品 */
  overflow-y: auto;
  border: 1px solid #f0f0f0;
  border-radius: var(--card-radius); /* 使用卡片圓角變量 */
  box-shadow: var(--shadow-sm);
  padding: 5px 10px; /* 添加內邊距，讓內容不貼近邊緣 */
}

.shop-content .layui-table {
  border-top: none;
  margin-bottom: 0;
  border-collapse: separate; /* 分離邊框模式 */
  border-spacing: 0 8px; /* 增加行間距，從4px改為8px */
}

/* 表頭樣式 */
.shop-content .layui-table .head {
  background-color: rgba(245, 247, 250, var(--card-opacity));
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  margin-bottom: 10px; /* 增加與第一行商品的間距，從4px改為10px */
  border-radius: calc(var(--card-radius) * 0.75); /* 使用卡片圓角變量 */
}

/* 当表格滚动时，增强表头阴影效果 */
.shop-content.scrolled .layui-table .head {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  background-color: rgba(245, 247, 250, calc(var(--card-opacity) + 0.03));
}

.shop-content .layui-table .head th {
  border-top: none;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  color: #333;
  padding: 12px 12px; /* 增加表頭內邊距 */
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.shop-content .layui-table .head th:first-child {
  padding-left: 20px;
  border-top-left-radius: var(--radius-md);
}

.shop-content .layui-table .head th:last-child {
  border-top-right-radius: var(--radius-md);
  text-align: center;
}

/* 商品行樣式 */
.shop-content .layui-table .item {
  transition: all 0.25s ease;
  margin-bottom: 8px; /* 增加行間距，從4px改為8px */
  border-radius: calc(var(--card-radius) * 0.75); /* 使用卡片圓角變量 */
  background-color: rgba(255, 255, 255, 0.8); /* 增加背景不透明度 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04); /* 增強陰影效果 */
}

.shop-content .layui-table .item:last-child {
  margin-bottom: 8px; /* 確保最後一項也有底部間距 */
}

/* 商品行样式优化 */
.shop-content .layui-table .item td {
  border-bottom: 1px solid #f0f0f0;
  padding: 14px 10px; /* 增加垂直內邊距，從12px改為14px */
  vertical-align: middle;
}

.shop-content .layui-table .item:last-child td {
  border-bottom: none;
}

.shop-content .layui-table .item:hover {
  background-color: rgba(252, 252, 252, 0.95); /* 調整懸停背景色 */
  transform: translateY(-3px); /* 增加懸停時的位移效果 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 增強懸停時的陰影效果 */
}

/* 商品名称单元格样式 */
.shop-content .layui-table .item td:first-child {
  display: flex;
  align-items: center;
  padding-left: 15px;
  padding-top: 14px; /* 增加頂部內邊距，從12px改為14px */
  padding-bottom: 14px; /* 增加底部內邊距，從12px改為14px */
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

/* 商品价格单元格样式 */
.shop-content .layui-table .item td:nth-child(2) {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 15px;
}

/* 库存单元格样式 */
.shop-content .layui-table .item td:nth-child(3) {
  font-weight: 500;
  text-align: center;
  font-size: 13px;
}

/* 操作按钮单元格样式 */
.shop-content .layui-table .item td:nth-child(4) {
  text-align: center;
}

/* 商品图标样式 */
.shop-content .commodity-icon {
  width: 28px;
  height: 28px;
  margin-right: 10px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 库存状态样式 */
.shop-content .layui-table .item td:nth-child(3) {
  position: relative;
}

/* 库存状态指示器 */
.inventory-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: calc(var(--card-radius) * 0.5); /* 使用卡片圓角變量 */
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  min-width: 70px;
}

.inventory-status.out-of-stock {
  background-color: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

.inventory-status.low-stock {
  background-color: rgba(255, 152, 0, 0.1);
  color: #ff9800;
}

.inventory-status.medium-stock {
  background-color: rgba(33, 150, 243, 0.1);
  color: #2196f3;
}

.inventory-status.high-stock {
  background-color: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

/* 查询详情按钮优化 */
.new-view-button {
  width: 90px;
  height: 32px;
}

.new-view-button .button-content {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.new-view-button .button-content i {
  margin-right: 4px;
  font-size: 12px;
}

/* 空状态样式优化 */
.keguan {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
  color: var(--text-secondary);
}

.keguan i {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--primary-color);
  opacity: 0.8;
}

.keguan p {
  font-size: 16px;
  font-weight: 500;
}

/* 隐藏原始的Layui关闭按钮 */
.layui-layer-ico.layui-layer-close.layui-layer-close2 {
  display: none !important;
}

/* 响应式设计 - 修复语法错误 */