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

html, body {
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.0));
  z-index: 1000;
}

.nav-left { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 36px; }

.nav-center {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  flex: 1;
  justify-content: flex-end;
}

.nav-link {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #f093fb, #f5576c);
  transition: width 0.2s;
}

.nav-link:hover { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: #fff; }

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* 移动端菜单 */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.95);
  flex-direction: column;
  padding: 16px 24px;
  z-index: 999;
}
.nav-mobile-menu.active { display: flex; }
.nav-mobile-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 12px 0;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-mobile-link.active { color: #f5576c; }

/* 主内容 */
.main-container {
  padding: 84px 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 打印机状态卡片 */
.status-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.status-header h2 {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.15);
}
.status-printing { background: #13c2c2; color: #fff; }
.status-idle { background: rgba(255, 255, 255, 0.2); color: #ccc; }
.status-offline { background: #ff4d4f; color: #fff; }
.status-paused { background: #faad14; color: #fff; }

.status-body { display: flex; flex-direction: column; gap: 12px; }

.current-job .no-job {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 20px;
}

.job-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
}

.job-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
}

.job-info h3 { font-size: 16px; margin-bottom: 4px; }
.job-info p { font-size: 13px; color: rgba(255,255,255,0.6); }

.queue-info {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* 打印案例展示 */
.showcase-section {
  margin-bottom: 32px;
}

.showcase-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.showcase-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
}

.showcase-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.showcase-item:hover img { transform: scale(1.05); }

.showcase-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s;
}

.showcase-item:hover .showcase-overlay { opacity: 1; }

.showcase-overlay h4 {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.print-btn {
  padding: 4px 12px;
  border: none;
  border-radius: 6px;
  background: #f5576c;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}
.print-btn:hover { background: #e8445a; }

/* 打印队列 */
.queue-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.empty-queue, .empty-showcase, .loading-placeholder, .error-message {
  text-align: center;
  padding: 32px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
}

.queue-item-info { flex: 1; }
.queue-item-info h4 { font-size: 14px; margin-bottom: 2px; }
.queue-item-info p { font-size: 12px; color: rgba(255,255,255,0.5); }
.queue-item-time { font-size: 11px; }

.queue-item-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  white-space: nowrap;
}
.queue-item-badge.pending { background: rgba(250, 173, 20, 0.2); color: #faad14; }
.queue-item-badge.sent { background: rgba(24, 144, 255, 0.2); color: #1890ff; }
.queue-item-badge.queued { background: rgba(250, 173, 20, 0.2); color: #faad14; }
.queue-item-badge.processing { background: rgba(19, 194, 194, 0.2); color: #13c2c2; }
.queue-item-badge.paused { background: rgba(250, 173, 20, 0.2); color: #faad14; }
.queue-item-badge.completed { background: rgba(82, 196, 26, 0.2); color: #52c41a; }
.queue-item-badge.failed { background: rgba(255, 77, 79, 0.2); color: #ff4d4f; }

/* 提交打印区域 */
.submit-section { margin-bottom: 32px; }
.submit-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.submit-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.submit-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.submit-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(245, 87, 108, 0.5);
  transform: translateY(-2px);
}

.submit-card i {
  font-size: 32px;
  color: #f5576c;
  margin-bottom: 12px;
  display: block;
}

.submit-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.submit-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

/* 响应式 */
@media (max-width: 768px) {
  .nav-center { display: none; }
  .nav-toggle { display: flex; }
  .main-container { padding: 80px 16px 32px; }
  .showcase-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .status-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .submit-cards { grid-template-columns: 1fr; }
  .submit-card { padding: 16px; }
  .submit-card i { font-size: 24px; margin-bottom: 8px; }
}
