/* ============================================
   CTphotos 企业招聘系统 - 全局样式
   主色: #0F66CE 高铁科技蓝
   模仿阿里云招聘风格
   ============================================ */

/* CSS Variables */
:root {
    --primary: #0F66CE;
    --primary-dark: #0a4f9e;
    --primary-light: #e8f2ff;
    --primary-gradient: linear-gradient(135deg, #0F66CE 0%, #1a8cff 50%, #00d4ff 100%);
    --secondary: #ff6b35;
    --success: #2e7d32;
    --danger: #e53935;
    --warning: #f9a825;
    --info: #0288d1;
    --dark: #1a1a2e;
    --gray-900: #212121;
    --gray-700: #616161;
    --gray-500: #9e9e9e;
    --gray-300: #e0e0e0;
    --gray-100: #f5f5f5;
    --white: #ffffff;
    --bg: #f8fafc;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--gray-900); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; outline: none; }

/* ============ 导航栏 ============ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: var(--transition);
}
.navbar.scrolled { background: rgba(255,255,255,0.98); box-shadow: var(--shadow); }
.navbar-inner {
    max-width: 1400px; margin: 0 auto; padding: 0 40px;
    display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.navbar-logo { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; color: var(--primary); }
.navbar-logo svg { width: 36px; height: 36px; }
.navbar-logo span { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.navbar-menu { display: flex; gap: 8px; }
.navbar-menu a {
    padding: 8px 20px; border-radius: 20px; font-size: 15px; font-weight: 500;
    color: var(--gray-700); transition: var(--transition);
}
.navbar-menu a:hover, .navbar-menu a.active { color: var(--primary); background: var(--primary-light); }
.navbar-actions { display: flex; gap: 12px; align-items: center; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 28px; border-radius: 24px; font-size: 15px; font-weight: 600;
    border: none; cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--primary-gradient); color: var(--white); box-shadow: 0 4px 15px rgba(15,102,206,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(15,102,206,0.4); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: var(--primary-light); }
.btn-success { background: var(--success); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 40px; font-size: 17px; }
.btn-block { width: 100%; }

/* ============ Hero Section ============ */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    background: var(--primary-gradient); overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}
.hero-particles {
    position: absolute; inset: 0; overflow: hidden;
}
.hero-particle {
    position: absolute; border-radius: 50%; background: rgba(255,255,255,0.1);
    animation: float 6s infinite ease-in-out;
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
    50% { transform: translateY(-30px) rotate(180deg); opacity: 1; }
}
.hero-content {
    position: relative; z-index: 2; max-width: 1400px; margin: 0 auto; padding: 120px 40px 80px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-text { color: var(--white); }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px;
    background: rgba(255,255,255,0.15); border-radius: 20px; font-size: 14px;
    margin-bottom: 24px; backdrop-filter: blur(10px);
}
.hero-title { font-size: 52px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero-title .highlight { color: #00d4ff; }
.hero-subtitle { font-size: 20px; opacity: 0.9; margin-bottom: 36px; line-height: 1.8; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
    display: flex; gap: 40px; margin-top: 48px; padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.hero-stat-item .number { font-size: 36px; font-weight: 800; }
.hero-stat-item .label { font-size: 14px; opacity: 0.8; }
.hero-visual {
    position: relative; display: flex; justify-content: center; align-items: center;
}
.hero-train-icon {
    width: 400px; height: 400px; position: relative;
    background: rgba(255,255,255,0.08); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(20px); border: 2px solid rgba(255,255,255,0.1);
    animation: pulse 4s infinite ease-in-out;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.hero-train-icon svg { width: 200px; height: 200px; fill: white; opacity: 0.9; }

/* ============ Sections ============ */
.section { padding: 100px 0; }
.section-dark { background: var(--dark); color: var(--white); }
.section-gray { background: var(--bg); }
.container { max-width: 1400px; margin: 0 auto; padding: 0 40px; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 36px; font-weight: 700; margin-bottom: 16px; }
.section-header p { font-size: 18px; color: var(--gray-500); max-width: 600px; margin: 0 auto; }
.section-header .line {
    width: 60px; height: 4px; background: var(--primary-gradient);
    margin: 16px auto 0; border-radius: 2px;
}

/* ============ 岗位卡片 ============ */
.positions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 24px; }
.position-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 32px;
    border: 1px solid var(--gray-300); transition: var(--transition); cursor: pointer;
    position: relative; overflow: hidden;
}
.position-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--primary-gradient); transform: scaleX(0); transition: var(--transition);
    transform-origin: left;
}
.position-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.position-card:hover::before { transform: scaleX(1); }
.position-card .dept-tag {
    display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px;
    background: var(--primary-light); color: var(--primary); font-weight: 600; margin-bottom: 12px;
}
.position-card h3 { font-size: 20px; margin-bottom: 8px; color: var(--gray-900); }
.position-card .meta { display: flex; gap: 16px; color: var(--gray-500); font-size: 14px; margin-bottom: 16px; }
.position-card .desc { color: var(--gray-700); font-size: 14px; line-height: 1.7; margin-bottom: 20px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.position-card .card-footer { display: flex; justify-content: space-between; align-items: center; }
.position-card .salary { font-size: 18px; font-weight: 700; color: var(--secondary); }

/* ============ 流程图 ============ */
.process-flow {
    display: flex; justify-content: center; align-items: center; gap: 0;
    flex-wrap: wrap; padding: 40px 0;
}
.process-step {
    display: flex; flex-direction: column; align-items: center; position: relative;
    min-width: 120px; padding: 0 10px;
}
.process-step .step-circle {
    width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; margin-bottom: 12px; transition: var(--transition);
    border: 3px solid var(--gray-300); color: var(--gray-500); background: var(--white);
}
.process-step.completed .step-circle { background: var(--primary); border-color: var(--primary); color: var(--white); }
.process-step.current .step-circle { background: var(--secondary); border-color: var(--secondary); color: var(--white); animation: pulse 2s infinite; }
.process-step.rejected .step-circle { background: var(--danger); border-color: var(--danger); color: var(--white); }
.process-step .step-name { font-size: 13px; color: var(--gray-700); text-align: center; font-weight: 500; }
.process-step.completed .step-name { color: var(--primary); font-weight: 600; }
.process-step.current .step-name { color: var(--secondary); font-weight: 700; }
.process-arrow { font-size: 24px; color: var(--gray-300); margin: 0 4px; padding-bottom: 30px; }
.process-arrow.completed { color: var(--primary); }

/* ============ 企业文化 ============ */
.culture-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.culture-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 40px 32px;
    text-align: center; transition: var(--transition); border: 1px solid var(--gray-300);
}
.culture-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.culture-card .icon {
    width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light); font-size: 32px;
}
.culture-card h3 { font-size: 20px; margin-bottom: 12px; }
.culture-card p { color: var(--gray-700); font-size: 15px; }

/* ============ 表单 ============ */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-label .required { color: var(--danger); }
.form-control {
    width: 100%; padding: 12px 16px; border: 2px solid var(--gray-300); border-radius: var(--radius);
    font-size: 15px; transition: var(--transition); background: var(--white);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,102,206,0.1); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 4px; }

/* ============ 卡片容器 ============ */
.card {
    background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    padding: 20px 28px; border-bottom: 1px solid var(--gray-300);
    display: flex; justify-content: space-between; align-items: center;
}
.card-header h3 { font-size: 18px; font-weight: 600; }
.card-body { padding: 28px; }

/* ============ 表格 ============ */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--gray-300); font-size: 14px; }
th { background: var(--bg); font-weight: 600; color: var(--gray-700); white-space: nowrap; }
tr:hover td { background: var(--primary-light); }

/* ============ 状态标签 ============ */
.badge {
    display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600;
}
.badge-pending { background: #fff3e0; color: #e65100; }
.badge-passed, .badge-hired { background: #e8f5e9; color: #2e7d32; }
.badge-rejected { background: #ffebee; color: #c62828; }
.badge-exam { background: #e3f2fd; color: #1565c0; }
.badge-interview { background: #f3e5f5; color: #7b1fa2; }
.badge-offer { background: #e0f2f1; color: #00695c; }
.badge-contract { background: #fce4ec; color: #ad1457; }

/* ============ 模态框 ============ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--white); border-radius: var(--radius-lg); width: 90%; max-width: 600px;
    max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } }
.modal-header {
    padding: 20px 28px; border-bottom: 1px solid var(--gray-300);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--gray-500); padding: 4px; }
.modal-body { padding: 28px; }
.modal-footer { padding: 16px 28px; border-top: 1px solid var(--gray-300); display: flex; gap: 12px; justify-content: flex-end; }

/* ============ 后台布局 ============ */
.admin-layout { display: flex; min-height: 100vh; padding-top: 72px; }
.sidebar {
    width: 260px; background: var(--dark); color: var(--white); position: fixed;
    top: 72px; left: 0; bottom: 0; overflow-y: auto; z-index: 100;
    transition: var(--transition);
}
.sidebar-menu { padding: 16px 0; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 12px; padding: 12px 24px;
    color: rgba(255,255,255,0.7); font-size: 14px; transition: var(--transition);
}
.sidebar-menu a:hover, .sidebar-menu a.active { color: var(--white); background: rgba(255,255,255,0.1); }
.sidebar-menu a.active { border-left: 3px solid var(--primary); }
.sidebar-menu .menu-group { padding: 8px 24px; font-size: 12px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px; margin-top: 16px; }
.main-content { flex: 1; margin-left: 260px; padding: 30px; background: var(--bg); min-height: calc(100vh - 72px); }

/* ============ 盖章效果 ============ */
.stamp-overlay {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-15deg);
    z-index: 100; pointer-events: none;
}
.stamp {
    width: 220px; height: 220px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; opacity: 0.65;
}
.stamp-rejected { border: 7px double #e53935; color: #e53935; }
.stamp-hired { border: 7px double #2e7d32; color: #2e7d32; }
.stamp-inner { text-align: center; }
.stamp-inner .stamp-title { font-size: 36px; font-weight: 900; letter-spacing: 4px; }
.stamp-inner .stamp-org { font-size: 14px; letter-spacing: 2px; margin-bottom: 4px; }
.stamp-inner .stamp-date { font-size: 12px; margin-top: 4px; }

/* ============ 页脚 ============ */
.footer {
    background: var(--dark); color: rgba(255,255,255,0.7); padding: 60px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { font-size: 24px; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.8; }
.footer h4 { color: var(--white); font-size: 16px; margin-bottom: 16px; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer ul li a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 13px; }

/* ============ 分页 ============ */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination button {
    padding: 8px 14px; border: 1px solid var(--gray-300); border-radius: var(--radius);
    background: var(--white); cursor: pointer; font-size: 14px; transition: var(--transition);
}
.pagination button:hover, .pagination button.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ Toast通知 ============ */
.toast-container { position: fixed; top: 90px; right: 20px; z-index: 9999; }
.toast {
    padding: 14px 24px; border-radius: var(--radius); margin-bottom: 10px;
    color: var(--white); font-size: 14px; min-width: 280px;
    animation: slideIn 0.3s ease; box-shadow: var(--shadow-lg);
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }

/* ============ 加载动画 ============ */
.loading { display: flex; justify-content: center; padding: 40px; }
.spinner {
    width: 40px; height: 40px; border: 4px solid var(--gray-300);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 空状态 ============ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-500); }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 16px; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-visual { display: none; }
    .hero-title { font-size: 36px; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
@media (max-width: 768px) {
    .navbar-menu { display: none; }
    .navbar-inner { padding: 0 20px; }
    .container { padding: 0 20px; }
    .section { padding: 60px 0; }
    .hero { min-height: 80vh; }
    .hero-content { padding: 100px 20px 60px; }
    .hero-title { font-size: 28px; }
    .hero-subtitle { font-size: 16px; }
    .positions-grid { grid-template-columns: 1fr; }
    .culture-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .process-flow { flex-direction: column; }
    .process-arrow { transform: rotate(90deg); }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; position: relative; top: 0; }
    .main-content { margin-left: 0; }
    .modal { width: 95%; }
}

/* ============ 滚动动画 ============ */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.slide-left { opacity: 0; transform: translateX(-30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.slide-left.visible { opacity: 1; transform: translateX(0); }
.slide-right { opacity: 0; transform: translateX(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.slide-right.visible { opacity: 1; transform: translateX(0); }

/* ============ PDF预览容器 ============ */
.pdf-preview-container { width: 100%; height: 80vh; border: 1px solid var(--gray-300); border-radius: var(--radius); overflow: hidden; position: relative; }
.pdf-preview-container iframe { width: 100%; height: 100%; border: none; }

/* ============ 统计卡片 ============ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 24px;
    box-shadow: var(--shadow); transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card .stat-value { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { font-size: 14px; color: var(--gray-500); margin-top: 4px; }
.stat-card .stat-icon { font-size: 24px; float: right; opacity: 0.3; }

/* ============ 用户菜单 ============ */
.user-menu { position: relative; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 2px solid var(--primary); }
.user-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 8px;
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    min-width: 200px; display: none; z-index: 1001;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
    display: block; padding: 12px 20px; color: var(--gray-700); font-size: 14px;
    border-bottom: 1px solid var(--gray-100);
}
.user-dropdown a:hover { background: var(--primary-light); color: var(--primary); }

/* ============ 标签筛选 ============ */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-tab {
    padding: 8px 20px; border-radius: 20px; font-size: 14px; cursor: pointer;
    border: 1px solid var(--gray-300); background: var(--white); transition: var(--transition);
}
.filter-tab:hover, .filter-tab.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
