/* 招聘模板 B - 现代卡片式招聘交互样式库 */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --secondary: #4f46e5;
  --accent-emerald: #059669;
  --accent-emerald-light: #ecfdf5;
  --accent-orange: #ea580c;
  --accent-orange-light: #fff7ed;
  --accent-purple: #7c3aed;
  --accent-purple-light: #f5f3ff;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --border-color: #e2e8f0;
  --border-card: #e2e8f0;
  --border-focus: #3b82f6;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #94a3b8;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 14px 28px rgba(37, 99, 235, 0.12), 0 10px 10px rgba(15, 23, 42, 0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* 导航栏卡片式布局 */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.header-nav.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.98);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.logo-badge {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* 按钮设计规范 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.925rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

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

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-alt);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #047857, #065f46);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* 卡片系统核心类 */
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.bento-card.no-hover:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border-card);
}

.card-gradient-header {
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  border-bottom: 1px solid var(--border-color);
}

/* 标签体系 */
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.tag-blue {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

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

.tag-orange {
  background-color: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
}

.tag-purple {
  background-color: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ede9fe;
}

.tag-slate {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.tag-urgent {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* 薪资高亮文字 */
.salary-text {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.2rem;
  color: #ea580c;
  letter-spacing: -0.01em;
}

.salary-text.lg {
  font-size: 1.65rem;
}

/* 交互式搜索卡片组件 */
.hero-search-box {
  background: white;
  border-radius: var(--radius-xl);
  border: 2px solid var(--border-color);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.hero-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), var(--shadow-lg);
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  padding: 0.5rem 0.75rem;
}

.search-input-group input {
  border: none;
  outline: none;
  font-size: 1rem;
  width: 100%;
  color: var(--text-main);
  background: transparent;
}

.search-divider {
  width: 1px;
  height: 28px;
  background-color: var(--border-color);
}

/* 侧滑抽屉快速预览 */
.job-preview-drawer {
  position: fixed;
  top: 0;
  right: -550px;
  width: 520px;
  max-width: 95vw;
  height: 100vh;
  background: white;
  z-index: 100;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.job-preview-drawer.open {
  right: 0;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* 弹窗通用样式 */
.custom-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.94) translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-card);
}

.custom-modal.active .modal-content {
  transform: scale(1) translateY(0);
}

/* Toast 提示浮窗 */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  background: #0f172a;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-item.success {
  border-left: 4px solid #10b981;
}

.toast-item.info {
  border-left: 4px solid #3b82f6;
}

.toast-item.warning {
  border-left: 4px solid #f59e0b;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 表单控件美化 */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 0.925rem;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* 标签式多选与单选 */
.chip-select-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-item {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--bg-card-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.chip-item:hover {
  border-color: var(--primary-border);
  color: var(--primary);
}

.chip-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

/* 页面底部布局 */
.footer-section {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem 2rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .hero-search-box {
    flex-direction: column;
    padding: 0.75rem;
  }
  .search-divider {
    display: none;
  }
  .search-input-group {
    width: 100%;
  }
}
