/* ========================================
   查询页面统一样式 - 现代化设计
   用于：check.html（报名查询）和 certificate.html（证书查询）
   ======================================== */

/* CSS变量 */
:root {
    --primary-color: #00BEBD;
    --primary-hover: #00a5a4;
    --secondary-color: #37566B;
    --accent-color: #FE574A;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #e8f4f8;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* ========================================
   1. 页面容器
   ======================================== */
.query-page {
    min-height: calc(100vh - 70px);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    padding: 60px 0 80px;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

/* 背景装饰 */
.query-page::before {
    content: "";
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 190, 189, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.query-page::after {
    content: "";
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(55, 86, 107, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ========================================
   2. 页面标题区域
   ======================================== */
.query-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.query-header-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 190, 189, 0.3);
    animation: float 3s ease-in-out infinite;
}

.query-header-icon i {
    font-size: 40px;
    color: white;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.query-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.query-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ========================================
   3. 查询表单卡片
   ======================================== */
.query-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 32px;
    position: relative;
    overflow: visible; /* 改为visible，允许下拉框显示在卡片外 */
    transition: all 0.3s ease;
}

.query-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; /* 确保渐变条圆角 */
}

.query-card:hover {
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 190, 189, 0.1);
    transform: translateY(-2px);
}

/* 查询表单 */
.query-form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.query-form-item {
    flex: 1;
}

.query-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.query-form-label .required {
    color: var(--accent-color);
    margin-right: 4px;
}

.layui-input,
.layui-select {
    height: 48px;
    line-height: 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 16px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.layui-input:focus,
.layui-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 190, 189, 0.1);
}

/* 下拉框选项容器 */
.layui-form-select .layui-anim {
    z-index: 9999 !important;
    max-height: 300px;
    overflow-y: auto;
}

.layui-form-select dl {
    max-height: 300px;
}

.layui-form-select dl dd {
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.layui-form-select dl dd:hover {
    background: rgba(0, 190, 189, 0.1);
    color: var(--primary-color);
}

.query-btn {
    height: 48px;
    padding: 0 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 190, 189, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.query-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 190, 189, 0.4);
}

.query-btn i {
    font-size: 18px;
}

/* 单选按钮组 */
.query-radio-group {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-gradient-start);
    border-radius: var(--radius-md);
}

.layui-form-radio {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.layui-form-radio:hover {
    background: rgba(0, 190, 189, 0.05);
}

.layui-form-radioed {
    background: rgba(0, 190, 189, 0.1);
    color: var(--primary-color) !important;
}

/* ========================================
   4. 结果区域
   ======================================== */
.query-result-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    min-height: 400px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   5. 数据表格
   ======================================== */
.layui-table {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.layui-table thead tr {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2d4558 100%);
}

.layui-table thead tr th {
    color: white;
    font-weight: 600;
    border: none;
    padding: 16px 12px;
    font-size: 14px;
}

.layui-table tbody tr {
    transition: all 0.2s ease;
}

.layui-table tbody tr:hover {
    background: rgba(0, 190, 189, 0.05);
}

.layui-table tbody tr td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* 表格操作按钮 */
.layui-table .layui-btn-sm {
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.layui-table .layui-btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 批量操作按钮 */
.batch-actions {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-gradient-start);
    border-radius: var(--radius-md);
    display: flex;
    gap: 12px;
    align-items: center;
}

.batch-actions .layui-btn {
    border-radius: var(--radius-md);
}

/* ========================================
   6. 响应式设计
   ======================================== */
@media (max-width: 768px) {
    .query-page {
        padding: 40px 0 60px;
    }
    
    .query-header-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }
    
    .query-header-icon i {
        font-size: 32px;
    }
    
    .query-title {
        font-size: 28px;
    }
    
    .query-subtitle {
        font-size: 14px;
    }
    
    .query-card {
        padding: 24px;
    }
    
    .query-form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .query-btn {
        width: 100%;
    }
    
    .query-radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .query-result-card {
        padding: 20px;
    }
    
    .layui-table {
        font-size: 12px;
    }
    
    .layui-table thead tr th,
    .layui-table tbody tr td {
        padding: 10px 8px;
    }
}

/* ========================================
   7. 动画效果
   ======================================== */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-in {
    animation: scaleIn 0.3s ease-in-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   8. 证书预览特殊样式
   ======================================== */
.certificate-preview-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.certificate-preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 190, 189, 0.3);
}

.certificate-download-btn {
    background: var(--success-color);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.certificate-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}

/* ========================================
   9. 结果统计标签
   ======================================== */
.result-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.stat-badge i {
    font-size: 16px;
}
