/* ============================================
   索奥科技中心 - 招新面试系统
   科技电子风格 - 黑色背景 + 蓝色霓虹
   ============================================ */

/* CSS 变量 */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-hover: #252535;
    
    --neon-blue: #00d4ff;
    --neon-cyan: #00f5ff;
    --neon-purple: #9d4edd;
    --neon-pink: #ff00ff;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    --border-glow: rgba(0, 212, 255, 0.5);
    --border-subtle: rgba(0, 212, 255, 0.2);
    
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   背景动画
   ============================================ */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* 背景光晕 */
.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* ============================================
   容器布局
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ============================================
   头部
   ============================================ */
.header {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(157, 78, 221, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), var(--neon-purple), transparent);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 48px;
    color: var(--neon-blue);
    text-shadow: 0 0 20px var(--neon-blue);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo-text {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 4px;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    letter-spacing: 8px;
    text-transform: uppercase;
}

/* ============================================
   搜索区域
   ============================================ */
.search-section {
    margin-bottom: 40px;
}

.search-box {
    display: flex;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

#searchInput {
    flex: 1;
    padding: 18px 25px;
    font-size: 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

#searchInput::placeholder {
    color: var(--text-muted);
}

#searchInput:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px var(--border-glow);
}

.search-btn {
    padding: 18px 35px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.search-hint {
    text-align: center;
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hint-icon {
    color: var(--neon-blue);
}

/* ============================================
   区块标题
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--neon-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--neon-blue), var(--neon-purple));
    border-radius: 2px;
}

.result-count,
.total-count {
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
}

/* ============================================
   结果列表
   ============================================ */
.results-section {
    margin-bottom: 50px;
}

.results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ============================================
   人员卡片
   ============================================ */
.student-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.student-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.student-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.student-card:hover::before {
    transform: scaleX(1);
}

.student-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.student-info {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.student-info span {
    display: block;
}

.student-info .label {
    color: var(--text-muted);
    display: inline;
}

/* 性别标签 */
.gender-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

.gender-male {
    background: rgba(0, 212, 255, 0.2);
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
}

.gender-female {
    background: rgba(255, 0, 255, 0.2);
    color: var(--neon-pink);
    border: 1px solid var(--neon-pink);
}

/* ============================================
   全部人员网格 - 按部门分组
   ============================================ */
.all-students-section {
    margin-bottom: 40px;
}

.students-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 部门分组 */
.department-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 25px;
    position: relative;
}

.department-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.department-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-subtle);
}

.department-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 2px;
}

.department-count {
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
}

.department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* 志愿标签 */
.volunteer-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    background: rgba(0, 212, 255, 0.15);
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
    border-radius: 12px;
    font-size: 12px;
}

/* ============================================
   分页
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border-color: transparent;
    color: var(--bg-primary);
    font-weight: 600;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   弹窗
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.comment-modal {
    max-width: 500px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.1), transparent);
}

.modal-title {
    font-size: 22px;
    color: var(--neon-blue);
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--neon-blue);
}

.modal-body {
    padding: 25px;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* ============================================
   详情页样式
   ============================================ */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    background: var(--bg-card);
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 12px;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.detail-value {
    font-size: 16px;
    color: var(--text-primary);
    word-break: break-word;
}

.detail-section-title {
    font-size: 18px;
    color: var(--neon-cyan);
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

/* 志愿信息 */
.volunteer-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.volunteer-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.volunteer-rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #808080);
    color: #000;
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
    color: #fff;
}

.volunteer-name {
    flex: 1;
    font-size: 16px;
}

.adjust-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    background: rgba(0, 212, 255, 0.2);
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
}

/* 自我介绍和个人目标 */
.text-block {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    line-height: 1.8;
    white-space: pre-wrap;
}

/* 评论区域 */
.comments-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-subtle);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.comment-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    position: relative;
}

.comment-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--neon-blue), var(--neon-purple));
    border-radius: 3px 0 0 3px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.comment-author {
    font-weight: 600;
    color: var(--neon-cyan);
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ============================================
   悬浮按钮
   ============================================ */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--bg-primary);
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 9999;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px var(--border-glow);
}

.fab-tooltip {
    position: absolute;
    right: 75px;
    background: var(--bg-card);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fab:hover .fab-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   表单样式
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--neon-blue);
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--border-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn {
    padding: 12px 25px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .students-grid,
    .results-list {
        grid-template-columns: 1fr;
    }
    
    .fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* ============================================
   滚动条
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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