/* 外包项目服务模板 - 核心样式表 */
:root {
  --bg-darker: #f1f5f9;
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.9);

  --border-subtle: #e2e8f0;
  --border-highlight: #3b82f6;
  --border-cyan: #0ea5e9;

  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-purple: #7c3aed;
  --accent-amber: #d97706;
  --accent-emerald: #059669;
  --accent-rose: #e11d48;

  --text-title: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-dark: #94a3b8;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 16px 32px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  --shadow-glow-cyan: 0 4px 14px rgba(2, 132, 199, 0.15);
  --shadow-glow-purple: 0 4px 14px rgba(124, 58, 237, 0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.05) 0%, transparent 35%),
    radial-gradient(circle at 90% 25%, rgba(124, 58, 237, 0.04) 0%, transparent 40%),
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(15, 23, 42, 0.02) 40px, rgba(15, 23, 42, 0.02) 41px);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

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

/* 页面通用容器 */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 顶部通用导航栏 */
.game-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  transition: all 0.3s ease;
}

.game-navbar .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: 0.5px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0284c7, #2563eb, #7c3aed);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.brand-text span {
  color: var(--accent-blue);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  color: var(--text-title);
  background: #f1f5f9;
}

.nav-item.active {
  color: var(--accent-blue);
  background: #eff6ff;
  font-weight: 700;
  border-bottom: 2px solid var(--accent-blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 按钮规范 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-publish {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.25);
}

.btn-publish:hover {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--text-body);
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: var(--text-title);
}

.btn-outline-cyan {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
}

.btn-outline-cyan:hover {
  background: #ccfbf1;
  border-color: #5eead4;
  color: #115e59;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

/* 引擎标签与分类徽章 */
.engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.engine-ue5 {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #1e293b;
}

.engine-unity {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.engine-cocos {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.engine-godot {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.tag-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-recruiting {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.status-bidding {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status-working {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.status-closed {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* 卡片基类 */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-card-hover);
}

.card-highlight-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0284c7, #2563eb, #7c3aed);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-card:hover .card-highlight-top {
  opacity: 1;
}

/* 价格与预算大字 */
.price-tag {
  font-size: 22px;
  font-weight: 800;
  color: #d97706;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.price-tag small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

/* 通用输入框 */
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-title);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #ffffff;
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-dark);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-title);
  margin-bottom: 8px;
}

.form-label span.req {
  color: var(--accent-rose);
  margin-left: 4px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 里程碑进度组件 */
.milestone-track {
  display: flex;
  align-items: center;
  position: relative;
  margin: 30px 0;
}

.milestone-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
}

.step-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.milestone-step.completed .step-node {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #fff;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.3);
}

.milestone-step.active .step-node {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.35);
}

.step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
}

.step-percent {
  font-size: 11px;
  color: var(--text-muted);
}

.milestone-bar-line {
  position: absolute;
  top: 18px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--border-subtle);
  z-index: 1;
}

.milestone-bar-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-blue));
  width: 50%;
  transition: width 0.4s ease;
}

/* 通用模态框 Modal */
.game-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.game-modal {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  position: relative;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-title);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-title);
  background: #f1f5f9;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

/* Toast 提示弹窗 */
#game-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-blue);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  color: var(--text-title);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.3s ease-out;
}

.toast-item.success { border-left-color: var(--accent-emerald); }
.toast-item.warning { border-left-color: var(--accent-amber); }
.toast-item.error { border-left-color: var(--accent-rose); }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 统一底部 Footer */
.game-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-title {
  color: var(--text-title);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--accent-blue);
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--accent-blue);
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dark);
}

/* 响应式调整 */
@media (max-width: 992px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .nav-menu.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
