/* 响应式设计和移动端优化样式 */

/* 基础响应式设置 */
:root {
    --primary-color: #4e73df;
    --secondary-color: #f8f9fc;
    --accent-color: #2e59d9;
    --text-color: #5a5c69;
    --light-gray: #dddfeb;
    --danger-color: #e74a3b;
    --success-color: #1cc88a;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --primary-color: #5a8dee;
    --secondary-color: #1a1d29;
    --accent-color: #4c7dff;
    --text-color: #e4e6ea;
    --light-gray: #2d3748;
    --danger-color: #fc8181;
    --success-color: #68d391;
}

* {
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* 极简按钮 */
.btn, .btn-primary, .btn-outline-primary {
    border-radius: 12px !important;
    box-shadow: none !important;
    border: none !important;
    background: var(--primary-color, #4e73df) !important;
    color: #fff !important;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.btn:hover, .btn-primary:hover, .btn-outline-primary:hover {
    background: #2e59d9 !important;
    color: #fff !important;
}

/* 极简输入框 */
.form-control {
    border-radius: 10px !important;
    border: 1px solid #e9ecef !important;
    box-shadow: none !important;
    background: #fafbfc !important;
    color: var(--text-color, #5a5c69) !important;
    font-size: 15px;
}
.form-control:focus {
    border-color: var(--primary-color, #4e73df) !important;
    background: #fff !important;
    box-shadow: none !important;
}

/* 极简卡片 */
.card, .search-result-card, .feature-card {
    border-radius: 14px !important;
    box-shadow: none !important;
    border: 1px solid #f0f1f5 !important;
    background: #fff !important;
    transition: border-color 0.2s;
}
.card:hover, .search-result-card:hover, .feature-card:hover {
    border-color: var(--primary-color, #4e73df) !important;
}

/* 极简导航栏 */
.navbar {
    background: #fff !important;
    box-shadow: none !important;
    border-bottom: 1px solid #f0f1f5 !important;
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-color, #4e73df) !important;
    letter-spacing: 0.5px;
}
.nav-link {
    color: var(--text-color, #5a5c69) !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500;
}
.nav-link:hover, .nav-link.active {
    background: #f0f1f5 !important;
    color: var(--primary-color, #4e73df) !important;
}

/* 极简footer */
.footer-section {
    background: #fff !important;
    border-top: 1px solid #f0f1f5 !important;
    color: #b0b3b8 !important;
    font-size: 14px;
}
.footer-links a {
    color: #b0b3b8 !important;
    border-radius: 6px;
    padding: 2px 6px;
    transition: background 0.2s, color 0.2s;
}
.footer-links a:hover {
    background: #f0f1f5 !important;
    color: var(--primary-color, #4e73df) !important;
}

/* 极简全局背景 */
body {
    background: #fafbfc !important;
    color: #5a5c69 !important;
}
[data-theme="dark"] body {
    background: #181a20 !important;
    color: #e4e6ea !important;
}

.navbar, .footer-section {
    background: #fff !important;
    color: #5a5c69 !important;
}
[data-theme="dark"] .navbar, [data-theme="dark"] .footer-section {
    background: #23262f !important;
    color: #e4e6ea !important;
}

.card, .search-result-card, .feature-card {
    background: #fff !important;
    color: #5a5c69 !important;
}
[data-theme="dark"] .card, [data-theme="dark"] .search-result-card, [data-theme="dark"] .feature-card {
    background: #23262f !important;
    color: #e4e6ea !important;
    border-color: #353945 !important;
}

.btn, .btn-primary, .btn-outline-primary {
    background: var(--primary-color, #4e73df) !important;
    color: #fff !important;
}
[data-theme="dark"] .btn, [data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-outline-primary {
    background: #353945 !important;
    color: #fff !important;
    border-color: #353945 !important;
}

.form-control {
    background: #fafbfc !important;
    color: #5a5c69 !important;
}
[data-theme="dark"] .form-control {
    background: #181a20 !important;
    color: #e4e6ea !important;
    border-color: #353945 !important;
}

.list-group-item {
    background: #fafbfc !important;
    color: #4e73df !important;
}
[data-theme="dark"] .list-group-item {
    background: #23262f !important;
    color: #8fa7e8 !important;
}
[data-theme="dark"] .list-group-item.active, [data-theme="dark"] .list-group-item:hover {
    background: #4e73df !important;
    color: #fff !important;
}

/* 其它全局极简深色适配 */
[data-theme="dark"] .search-input, [data-theme="dark"] .input-group, [data-theme="dark"] .quick-reply {
    background: #23262f !important;
    color: #e4e6ea !important;
    border-color: #353945 !important;
}
[data-theme="dark"] .search-btn, [data-theme="dark"] .send-btn {
    background: #353945 !important;
    color: #fff !important;
}

/* 极简移动端适配 */
@media (max-width: 600px) {
    .navbar, .footer-section {
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    .card, .search-result-card, .feature-card {
        border-radius: 0 !important;
    }
}

/* 移动端导航栏优化 */
@media (max-width: 991.98px) {
    .navbar-nav {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--light-gray);
    }
    
    .nav-link {
        text-align: center;
        margin: 0.25rem 0;
    }
}

/* 主要内容区域响应式 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 搜索框响应式设计 */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-form {
    background: white;
    border-radius: 50px;
    padding: 0.25rem;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
}

.search-input {
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 50px;
    flex: 1;
    background: transparent;
}

.search-input:focus {
    box-shadow: none;
    outline: none;
}

.search-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.search-btn:hover {
    background: var(--accent-color);
}

/* 移动端搜索优化 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-form {
        flex-direction: column;
        padding: 0.5rem;
        border-radius: var(--border-radius);
    }
    
    .search-input {
        width: 100%;
        margin-bottom: 0.5rem;
        border-radius: var(--border-radius);
    }
    
    .search-btn {
        width: 100%;
        border-radius: var(--border-radius);
    }
}

/* 卡片组件响应式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

[data-theme="dark"] .card {
    background-color: var(--light-gray);
    color: var(--text-color);
}

/* 按钮响应式设计 */
.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 表单响应式设计 */
.form-control {
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

[data-theme="dark"] .form-control {
    background-color: var(--light-gray);
    color: var(--text-color);
    border-color: var(--light-gray);
}

/* 移动端表单优化 */
@media (max-width: 768px) {
    .form-control {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 底部导航栏（移动端专用） */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--light-gray);
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

[data-theme="dark"] .mobile-bottom-nav {
    background: var(--light-gray);
    border-top-color: #4a5568;
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    text-align: center;
}

.mobile-bottom-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.75rem;
}

.mobile-bottom-nav .nav-link i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.mobile-bottom-nav .nav-link.active {
    color: var(--primary-color);
}

/* 移动端显示底部导航 */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    body {
        padding-bottom: 70px; /* 为底部导航留出空间 */
    }
}

/* 响应式网格系统优化 */
@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .col, [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* 特色功能区域响应式 */
.features-section {
    padding: 3rem 0;
    background: white;
}

[data-theme="dark"] .features-section {
    background: var(--secondary-color);
}

.feature-card {
    text-align: center;
    padding: 2rem 1rem;
    height: 100%;
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-description {
    color: var(--text-color);
    opacity: 0.8;
}

/* 移动端特色功能优化 */
@media (max-width: 768px) {
    .features-section {
        padding: 2rem 0;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 消息提示响应式 */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(28, 200, 138, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(231, 74, 59, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* 模态框响应式 */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

[data-theme="dark"] .modal-content {
    background-color: var(--light-gray);
    color: var(--text-color);
}

/* 移动端模态框优化 */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-content {
        border-radius: var(--border-radius);
    }
}

/* 表格响应式 */
.table-responsive {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    border-bottom: 2px solid var(--light-gray);
    font-weight: 600;
    color: var(--text-color);
}

[data-theme="dark"] .table {
    color: var(--text-color);
}

[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
    border-color: #4a5568;
}

/* 分页响应式 */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    border: none;
    border-radius: var(--border-radius);
    margin: 0 0.25rem;
    color: var(--text-color);
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 移动端分页优化 */
@media (max-width: 576px) {
    .pagination {
        font-size: 0.875rem;
    }
    
    .page-link {
        padding: 0.375rem 0.75rem;
    }
}

/* 工具提示响应式 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--text-color);
    border-radius: var(--border-radius);
}

/* 进度条响应式 */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: var(--light-gray);
}

.progress-bar {
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* 徽章响应式 */
.badge {
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--primary-color);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

/* 可访问性优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --text-color: #000000;
        --light-gray: #cccccc;
    }
    
    .btn, .form-control {
        border-width: 2px;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .mobile-bottom-nav,
    .btn,
    .search-form {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}


/* 媒体画廊样式 */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 1.5rem 0;
}

.media-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.media-item:hover {
    transform: scale(1.05);
}

.video-thumbnail {
    position: relative;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

.job-cover-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-img-top-container {
    position: relative;
    overflow: hidden;
}

/* 响应式媒体画廊 */
@media (max-width: 768px) {
    .media-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .media-item img,
    .media-item video {
        height: 150px !important;
    }
}

@media (max-width: 480px) {
    .media-gallery {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .media-item img,
    .media-item video {
        height: 120px !important;
    }
}



/* 搜索框优化样式 */
.search-container {
    max-width: 600px;
    margin: 2rem auto;
}

.search-wrapper {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.search-input-group {
    flex: 1;
    position: relative;
}

.search-input {
    border-radius: 25px;
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: rgba(255, 255, 255, 0.8);
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    outline: none;
}

.search-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 25px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

/* 搜索建议下拉框 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    margin-top: 5px;
    overflow: hidden;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--text-color);
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

/* 高级搜索选项 */
.advanced-search {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.advanced-search .form-select,
.advanced-search .form-control {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
}

.advanced-search .form-select:focus,
.advanced-search .form-control:focus {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* 搜索选项按钮 */
.search-options .btn-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    margin: 0 10px;
}

.search-options .btn-link:hover {
    color: white;
}

/* 搜索结果区域 */
.search-results {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    color: var(--text-color);
}

.search-results h4 {
    color: var(--primary-color);
}

/* 响应式搜索框 */
@media (max-width: 768px) {
    .search-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .advanced-search .row {
        gap: 15px;
    }
    
    .advanced-search .col-md-4 {
        width: 100%;
    }
    
    .search-options {
        text-align: center;
    }
    
    .search-options .btn-link {
        display: block;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .search-container {
        margin: 1rem auto;
        padding: 0 15px;
    }
    
    .search-input {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 10px 15px;
    }
    
    .search-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* 聊天小部件样式已在 chat-widget.css 中定义 */

/* 确保聊天小部件在所有页面都能正常显示 */
.chat-widget {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
}

/* 避免聊天小部件与其他元素冲突 */
body {
    padding-bottom: 100px; /* 为聊天小部件留出空间 */
}

@media (max-width: 768px) {
    body {
        padding-bottom: 90px;
    }
}

/* 搜索结果卡片样式 */
.search-result-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.search-result-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    text-decoration: none;
}

.search-result-title:hover {
    color: var(--accent-color);
}

.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #6c757d;
}

.search-result-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-result-description {
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 10px;
}

.search-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.search-result-tag {
    background: #f8f9fa;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid #e9ecef;
}

/* 加载动画 */
.search-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.search-loading .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* 空结果样式 */
.search-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.search-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 深色主题适配 */
[data-theme="dark"] .search-input {
    background: rgba(45, 55, 72, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

[data-theme="dark"] .search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .search-suggestions {
    background: #2d3748;
    border: 1px solid #4a5568;
}

[data-theme="dark"] .suggestion-item {
    color: #e2e8f0;
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .suggestion-item:hover {
    background: #4a5568;
    color: white;
}

[data-theme="dark"] .search-results {
    background: rgba(45, 55, 72, 0.95);
    color: #e2e8f0;
}

[data-theme="dark"] .search-result-card {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .search-result-tag {
    background: #4a5568;
    color: #e2e8f0;
    border-color: #718096;
}

