/* =============================================
   留学生招聘平台 - 主样式文件
   ============================================= */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

a {
    text-decoration: none;
    color: #1890ff;
}

a:hover {
    color: #40a9ff;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

.btn-outline {
    background: #fff;
    color: #1890ff;
    border-color: #1890ff;
}

.btn-outline:hover {
    background: #f0f8ff;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
    border-color: #ff4d4f;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-text {
    background: none;
    border: none;
    color: #666;
    padding: 8px 12px;
}

.btn-text:hover {
    color: #1890ff;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 头部导航 */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo a {
    font-size: 20px;
    font-weight: bold;
    color: #1890ff;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: #333;
    font-size: 15px;
    padding: 20px 0;
    border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 横幅区域 */
.hero {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 16px;
}

.hero .subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* 搜索框 */
.search-box {
    display: flex;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-box select {
    padding: 12px 16px;
    border: none;
    border-left: 1px solid #eee;
    font-size: 15px;
    outline: none;
    min-width: 120px;
}

.search-box-inline {
    display: flex;
    gap: 12px;
}

.search-box-inline input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 240px;
}

/* 统计数据 */
.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 36px;
    font-weight: bold;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 8px;
}

/* 内容区块 */
.section {
    padding: 60px 0;
}

.section-gray {
    background: #f5f7fa;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
}

.more-link {
    font-size: 14px;
}

/* 职位卡片 */
.job-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.job-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #eee;
}

.job-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.job-title {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.job-salary {
    font-size: 16px;
    color: #ff4d4f;
    font-weight: bold;
}

.job-company {
    color: #666;
    margin-bottom: 8px;
}

.job-info {
    display: flex;
    gap: 12px;
    color: #999;
    font-size: 13px;
}

.job-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.job-tag {
    background: #e6f7ff;
    color: #1890ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.job-time {
    color: #999;
    font-size: 12px;
}

/* 企业卡片 */
.company-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.company-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #eee;
}

.company-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.company-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    border-radius: 8px;
    overflow: hidden;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.company-info {
    font-size: 12px;
    color: #999;
}

.company-jobs {
    font-size: 12px;
    color: #1890ff;
    margin-top: 8px;
}

/* 职位列表页 */
.search-filter {
    background: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    color: #666;
    white-space: nowrap;
}

.filter-input,
.filter-select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-input {
    width: 160px;
}

.filter-select {
    min-width: 120px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.list-header h2 {
    font-size: 20px;
}

.sort-options {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sort-btn {
    color: #666;
    padding: 4px 8px;
}

.sort-btn.active {
    color: #1890ff;
    font-weight: 500;
}

/* 职位列表 */
.job-list-full {
    background: #fff;
    border-radius: 8px;
}

.job-item {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s;
}

.job-item:hover {
    background: #fafafa;
}

.job-item:last-child {
    border-bottom: none;
}

.job-item-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.job-item-company {
    color: #666;
    margin-bottom: 8px;
}

.job-item-tags {
    display: flex;
    gap: 8px;
}

.job-item-tags .tag {
    background: #f5f5f5;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.job-item-side {
    text-align: right;
}

.job-item-salary {
    font-size: 18px;
    color: #ff4d4f;
    font-weight: bold;
    margin-bottom: 8px;
}

.job-item-nature {
    font-size: 12px;
    color: #1890ff;
}

.job-item-time {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    background: #fff;
    min-width: 36px;
    text-align: center;
}

.page-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.page-btn.active {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.page-ellipsis {
    padding: 8px 4px;
    color: #999;
}

/* 职位详情 */
.job-detail {
    background: #fff;
    border-radius: 8px;
    padding: 32px;
}

.job-detail-header {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.job-detail-header h1 {
    font-size: 24px;
    margin-bottom: 12px;
}

.job-detail-salary {
    font-size: 24px;
    color: #ff4d4f;
    font-weight: bold;
    margin-bottom: 12px;
}

.job-detail-meta {
    display: flex;
    gap: 24px;
    color: #666;
    margin-bottom: 12px;
}

.job-detail-stats {
    color: #999;
    font-size: 13px;
}

.job-detail-stats span {
    margin-right: 16px;
}

.job-detail-actions {
    margin-bottom: 24px;
}

.job-detail-actions .btn {
    margin-right: 12px;
}

.job-detail-content {
    margin-bottom: 32px;
}

.content-section {
    margin-bottom: 24px;
}

.content-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.content-text {
    line-height: 1.8;
    color: #666;
}

.job-detail-company {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.job-detail-company h2 {
    font-size: 16px;
    margin-bottom: 12px;
}

.company-info-card {
    cursor: pointer;
}

.company-info-card h3 {
    color: #333;
    margin-bottom: 8px;
}

.company-info-card p {
    color: #666;
    font-size: 13px;
}

/* 企业网格 */
.company-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 认证页面 */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-box h1 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: #999;
    margin-bottom: 32px;
}

.auth-box .form-group {
    margin-bottom: 20px;
}

.auth-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.auth-box input:focus {
    outline: none;
    border-color: #1890ff;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: #666;
}

/* 用户中心 */
.user-center {
    display: flex;
    gap: 24px;
}

.user-sidebar {
    width: 200px;
    flex-shrink: 0;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-sidebar h3 {
    text-align: center;
    font-size: 16px;
    margin-bottom: 20px;
}

.user-nav-menu {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.user-nav-menu a {
    display: block;
    padding: 12px 20px;
    color: #666;
    border-left: 3px solid transparent;
}

.user-nav-menu a:hover {
    background: #f5f5f5;
}

.user-nav-menu a.active {
    color: #1890ff;
    border-left-color: #1890ff;
    background: #e6f7ff;
}

.user-content {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    padding: 24px;
}

.user-content h2 {
    font-size: 18px;
    margin-bottom: 24px;
}

/* 表单 */
.profile-form .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.profile-form label {
    width: 100px;
    color: #666;
    flex-shrink: 0;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
    flex: 1;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.profile-form input:disabled {
    background: #f5f5f5;
}

/* 简历列表 */
.resume-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.resume-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.resume-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.resume-info p {
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.default-tag {
    background: #1890ff;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 8px;
}

.resume-actions {
    display: flex;
    gap: 8px;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

.modal-body .form-row {
    margin-bottom: 16px;
}

.modal-body label {
    display: block;
    margin-bottom: 6px;
    color: #666;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.modal-footer .btn {
    margin-left: 8px;
}

/* 投递记录 */
.application-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.application-item {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
}

.application-main h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.application-company {
    color: #666;
    font-size: 13px;
}

.application-info {
    color: #999;
    font-size: 12px;
}

.application-side {
    text-align: right;
}

.status-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
}

.status-0 { background: #f0f0f0; color: #666; }
.status-1 { background: #e6f7ff; color: #1890ff; }
.status-2 { background: #fff7e6; color: #fa8c16; }
.status-3 { background: #f6ffed; color: #52c41a; }
.status-4 { background: #fff1f0; color: #ff4d4f; }

.application-time {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 8px;
}

/* 收藏列表 */
.favorite-item {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 12px;
}

.favorite-main {
    cursor: pointer;
}

.favorite-main h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.favorite-company {
    color: #666;
    font-size: 13px;
}

.favorite-info {
    color: #999;
    font-size: 12px;
}

.favorite-side {
    text-align: right;
}

.favorite-status {
    display: block;
    color: #52c41a;
    font-size: 12px;
    margin-bottom: 8px;
}

.favorite-status.offline {
    color: #999;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* 页脚 */
.footer {
    background: #001529;
    color: rgba(255,255,255,0.65);
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.footer-info h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 8px;
}

.footer-links h4 {
    color: #fff;
    margin-bottom: 12px;
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.65);
    margin-bottom: 8px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 响应式 */
@media (max-width: 992px) {
    .job-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .company-list,
    .company-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 20px;
    }
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 20px;
        padding-top: 12px;
    }
    .hero h1 {
        font-size: 28px;
    }
    .search-box {
        flex-direction: column;
    }
    .search-box select {
        border-left: none;
        border-top: 1px solid #eee;
    }
    .stats {
        gap: 30px;
    }
    .job-list {
        grid-template-columns: 1fr;
    }
    .company-list,
    .company-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .user-center {
        flex-direction: column;
    }
    .user-sidebar {
        width: 100%;
    }
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
}
