
/* 
 * 版本: 1.4.1 - 移动端适配优化
 * 更新: 修复图片按钮可见性问题，优化移动端体验
 */
:root{
  --bg:#0f1115; --card:#151823; --muted:#8aa0b8; --hi:#ffd54a; --green:#00e07b; --red:#ff5470;
  --text:#e6eef8;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;}
.wrap{max-width:1100px;margin:24px auto;padding:0 16px;}
.card{background:var(--card);border-radius:16px;padding:16px;box-shadow:0 4px 20px rgba(0,0,0,.25);}
h1,h2,h3{margin:0 0 12px}
.row{display:grid;grid-template-columns:1fr 360px;gap:16px}
.flex{display:flex;gap:8px;align-items:center}
input,button,textarea{background:#0e1320;color:var(--text);border:1px solid #2a3348;border-radius:10px;padding:8px 10px;font-size:14px;outline:none}
button{cursor:pointer}
hr{border:none;border-top:1px solid #2a3348;margin:12px 0}

.box{height:280px;overflow:auto;background:#0e1320;border-radius:10px;padding:8px;border:1px solid #253047}
.small{opacity:.7;font-size:12px}
.gold{color:var(--hi);font-weight:700}
.t{color:var(--muted);font-family:ui-monospace,Consolas,monospace;font-size:12px}

/* 新的播报行样式 */
.feed-line {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #253047;
  font-size: 13px;
}

.feed-line .time {
  color: var(--muted);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  min-width: 60px;
}

.feed-line .type {
  color: var(--hi);
  font-weight: 600;
  min-width: 60px;
}

.feed-line .content {
  color: var(--text);
  flex: 1;
}

/* 重要播报的金黄色样式 */
.feed-line.important-feed .content {
  color: var(--hi);
  font-weight: 700;
}

.feed-line.important-feed .type {
  color: var(--hi);
  font-weight: 700;
}

/* 出价播报 - 蓝色 */
.feed-line.bid-feed .content {
  color: #1E90FF;
  font-weight: 700;
}

/* 新拍卖发布播报 - 紫色 */
.feed-line.new-auction-feed .content {
  color: #BA55D3;
  font-weight: 700;
}

/* 拍卖结束播报 - 金色 */
.feed-line.auction-end-feed .content {
  color: #FFD700;
  font-weight: 700;
}

#slider{display:block;position:relative}
#slider img{width:100%;height:260px;object-fit:contain;background:#0e1320;border-radius:10px;border:1px solid #253047}
#slider .nav{position:absolute;top:50%;transform:translateY(-50%);width:100%;display:flex;justify-content:space-between}
#slider .nav button{background:rgba(0,0,0,0.35);color:white;border:none;padding:8px 12px;border-radius:4px;cursor:pointer;font-size:18px;font-weight:bold}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
label{font-size:12px;color:var(--muted)}

/* 管理员消息样式 */
.chat-message.admin-message .from.admin {
  color: var(--hi);
  font-weight: 700;
}

.chat-message.admin-message .text {
  color: var(--hi);
  font-weight: 700;
}

/* 图片放大查看模态框样式 */
.image-modal-controls {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1000;
}

.image-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 20px;
}

.modal-nav-btn {
  background: rgba(0,0,0,0.8);
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 15px 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  pointer-events: auto;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.modal-nav-btn:hover {
  background: rgba(0,0,0,0.9);
  color: white;
  border-color: #007bff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
  transform: scale(1.1);
}

.image-modal-info {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  display: flex;
  gap: 10px;
}

.counter-badge, .zoom-badge {
  color: white;
  background: rgba(0,0,0,0.8);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0,0,0,0.8);
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  pointer-events: auto;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.image-modal-close:hover {
  background: rgba(0,0,0,0.9);
  color: white;
  border-color: #dc3545;
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
  transform: scale(1.1);
}

/* 管理端布局样式 */
.admin-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  max-width: none;
  margin: 0;
}

.left-panel {
  flex: 0 0 300px;
  position: sticky;
  top: 20px;
}

.right-panel {
  flex: 1;
  min-width: 0;
}

.right-top {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.right-top .card {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* 拍卖控制台特殊样式 */
.right-top .card:first-child {
  flex: 0 0 45%;
}

.right-top .card:last-child {
  flex: 0 0 55%;
}

/* 确保输入框不会超出容器 */
.right-top .card input,
.right-top .card textarea {
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
}

/* 标签样式优化 */
.right-top .card label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #e0e0e0;
}

/* 控制台文字颜色优化 */
.right-top .card {
  color: #e0e0e0;
}

.right-top .card h3 {
  color: #ffffff;
  border-bottom: 2px solid #007bff;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.right-top .card input,
.right-top .card textarea {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
}

.right-top .card input:focus,
.right-top .card textarea:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.right-top .card input::placeholder,
.right-top .card textarea::placeholder {
  color: #888;
}

.right-top .card hr {
  border: none;
  border-top: 1px solid #444;
  margin: 15px 0;
}

.right-top .card .flex {
  color: #e0e0e0;
}

.right-top .card .flex b {
  color: #ffffff;
  font-weight: 600;
}

.right-top .card .flex span {
  color: #007bff;
  font-weight: 600;
}

/* 输入框组样式 */
.right-top .card .input-group {
  margin-bottom: 20px;
}

.right-top .card .input-group:last-child {
  margin-bottom: 0;
}

/* 状态信息样式 */
.right-top .card .status-info {
  background: #1a1a1a;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #333;
  margin: 15px 0;
}

.right-top .card .status-info .flex {
  margin-bottom: 8px;
}

.right-top .card .status-info .flex:last-child {
  margin-bottom: 0;
}

/* 按钮组样式 */
.right-top .card .button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.right-top .card .button-group button {
  flex: 1;
  min-width: 120px;
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.right-top .card .button-group button:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.right-top .card .button-group button:active {
  transform: translateY(0);
}

/* 特殊按钮样式 */
.right-top .card button#btnLeave {
  background: #dc3545 !important;
  color: white !important;
}

.right-top .card button#btnLeave:hover {
  background: #c82333 !important;
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.right-top .card button#btnAnnounce {
  background: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.right-top .card button#btnAnnounce:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* 公告区域样式 */
.right-top .card .announcement-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #444;
}

.right-top .card .announcement-section h3 {
  color: #ffffff;
  border-bottom: 2px solid #28a745;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.right-top .card .announcement-section .flex {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.right-top .card .announcement-section input[type="number"] {
  width: 100px;
  flex-shrink: 0;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  text-align: center;
}

.right-top .card .announcement-section input[type="number"]:focus {
  border-color: #28a745;
  outline: none;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.right-top .card .announcement-section button {
  flex-shrink: 0;
  min-width: 80px;
}

/* 优化grid2布局 */
.right-top .grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  align-items: start;
}

/* 响应式调整 */
@media (max-width: 1600px) {
  .right-top .grid2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* 屏幕阅读器专用样式 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 在线用户监控样式 */
.online-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stat-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #007bff;
}

.user-list-container {
  margin-top: 15px;
}

.user-list-container h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.user-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: white;
}

.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.2s;
}

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

.user-item:hover {
  background-color: #f8f9fa;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  color: #000;
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

/* 管理员和用户角色样式 */
.user-role.admin-role {
  color: var(--hi);
  font-weight: 600;
}

.user-role.user-role {
  color: var(--muted);
}

/* 管理员头像样式 */
.user-avatar.admin-avatar {
  background: linear-gradient(135deg, var(--hi), #ffb74d);
  color: #000;
  font-weight: 700;
}

/* 用户列表项样式优化 */
.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #253047;
  transition: background-color 0.2s ease;
}

.user-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

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

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

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28a745;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.no-users {
  padding: 30px;
  text-align: center;
  color: #999;
  font-style: italic;
}

/* 响应式设计 */
@media (max-width: 1400px) {
  .right-top {
    flex-direction: column;
  }
  
  .right-top .card {
    width: 100%;
  }
  
  .right-top .card:first-child,
  .right-top .card:last-child {
    flex: none;
  }
}

@media (max-width: 1200px) {
  .admin-layout {
    flex-direction: column;
  }
  
  .left-panel {
    flex: none;
    width: 100%;
    position: static;
  }
  
  .right-panel {
    width: 100%;
  }
  
  .right-top {
    flex-direction: column;
  }
  
  .right-top .card:first-child,
  .right-top .card:last-child {
    flex: none;
  }
}

/* 移动端基础优化 */
@media screen and (max-width: 768px) {
  /* 基础移动端设置 */
  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: 14px;
    line-height: 1.4;
  }
  
  /* 防止双击缩放 */
  * {
    -webkit-tap-highlight-color: transparent;
  }
  
  /* 触摸友好的输入框 */
  input, textarea {
    font-size: 16px;
    min-height: 44px;
  }
  
  /* 触摸友好的按钮 */
  button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* 优化滚动 */
  .box {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
  }
}

/* 移动端标识类 */
.mobile-device {
  /* 移动端专用样式 */
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  button:hover {
    transform: none;
  }
  
  button:active {
    transform: scale(0.95);
  }
}
