/* 模态框遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    /* 确保足够高 */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 模态框容器 */
.modal {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.position-detail .detail-row {
    display: flex;
    margin-bottom: 15px;
    line-height: 1.5;
}

.detail-label {
    width: 140px;
    min-width: 140px;
    color: var(--text-light);
    font-weight: 500;
}

.detail-value {
    flex: 1;
}

.tech-tag {
    display: inline-block;
    background-color: rgba(26, 115, 232, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 主内容区样式 */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 150px);
    /* 根据页眉页脚高度调整 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 登录/注册页面 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    text-align: center;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-header h1 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.auth-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.auth-form input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.auth-footer {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* 职位列表页面 */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

/* 搜索框样式 */
.search-box {
    flex: 1;
    max-width: 500px;
    min-width: 300px;
}

.search-box .form-group {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 1rem;
    transition: var(--transition);
    background: #f8f9fa;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
    background: #fff;
}

.search-box .fa-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #5f6368;
    pointer-events: none;
}

.dashboard-title {
    font-size: 1.8rem;
    color: var(--text);
}

.filters-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 20px;
    margin-bottom: 30px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    font-size: 0.95rem;
}

.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

/* 职位卡片样式优化 */
.position-card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 480px;
    /* 固定高度 */
}

.position-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    /* 防止头部收缩 */
}

.position-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary);
}

.position-company {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.card-body {
    padding: 20px;
    flex: 1;
    /* 占据剩余空间 */
    overflow-y: auto;
    /* 添加垂直滚动 */
    display: flex;
    flex-direction: column;

    /* 隐藏滚动条但保留滚动功能 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 和 Edge */
}

/* 隐藏 Chrome、Safari 和 Opera 的滚动条 */
.card-body::-webkit-scrollbar {
    display: none;
}

.position-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    flex-shrink: 0;
    /* 防止收缩 */
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.position-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    flex-shrink: 0;
    /* 防止收缩 */
}

.tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    /* 防止文字换行 */
    transition: all 0.3s ease;
}

.tag-primary {
    background-color: rgba(26, 115, 232, 0.1);
    color: var(--primary);
}

.tag-success {
    background-color: rgba(52, 168, 83, 0.1);
    color: var(--accent);
}

.tag-warning {
    background-color: rgba(251, 188, 5, 0.1);
    color: var(--warning);
}

.tag-danger {
    background-color: rgba(234, 67, 53, 0.1);
    color: var(--danger);
}

.position-details {
    margin-top: auto;
    /* 推到底部 */
    border-top: 1px solid var(--border);
    padding-top: 15px;
    flex-shrink: 0;
    /* 防止收缩 */
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.detail-label {
    color: var(--text-light);
}

.detail-value {
    font-weight: 500;
}

.card-footer {
    padding: 15px 20px;
    background: var(--secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    /* 防止收缩 */
}

.urgent-badge {
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 技术简介工具提示 */
.tech-tooltip {
    position: absolute;
    z-index: 1000;
    width: 280px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(26, 115, 232, 0.2);
    animation: fadeIn 0.2s ease-out;
    display: none;
}

.tech-tooltip.show {
    display: block;
}

.tech-tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: calc(50% - 8px);
    width: 16px;
    height: 16px;
    background: inherit;
    border-left: 1px solid rgba(26, 115, 232, 0.2);
    border-top: 1px solid rgba(26, 115, 232, 0.2);
    transform: rotate(45deg);
    z-index: -1;
}

.tech-tooltip-content {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.tech-tooltip h4 {
    margin: 0 0 12px 0;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(26, 115, 232, 0.1);
}

.tech-tooltip p {
    margin: 0;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.03);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标签悬停效果 */
.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.15);
}

/* 分页容器 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 8px;
    flex-wrap: wrap;
}

/* 分页按钮样式 */
.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text);
}

/* 活动状态按钮 */
.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 悬停效果 */
.page-btn:hover:not(.active):not(:disabled) {
    background: var(--secondary);
    border-color: var(--primary);
    color: var(--primary);
}

/* 禁用状态 */
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* 分页箭头图标 */
.page-btn i {
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    /* 其他响应式样式保持不变... */

    /* 仅调整模态框在移动端的尺寸 */
    .modal {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
    }

    .position-detail .detail-row {
        flex-direction: column;
    }

    .detail-label {
        width: 100%;
        margin-bottom: 5px;
    }
}

.position-input-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.input-group textarea {
    height: 150px;
    resize: vertical;
}

.btn-submit {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn-submit:hover {
    background-color: #45a049;
}