/* ========================================
   crawler.css - 小鱼爬虫页面样式
   风格：鱼你无关统一主题
   ======================================== */

/* ---- 页面背景 ---- */
body {
    background-color: #FFFFE0;
    background-image: url('/static/imgs/鲨鱼.jpg');
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
    font-family: '微软雅黑', '宋体', Arial, sans-serif;
}

/* ---- 顶部导航条 ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #ADD8E6;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    height: 80px;
}

.nav-logo {
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo a>img {
    width: 50px;
    height: 44px;
}

.nav-logo a>span {
    font-size: 20px;
    font-weight: bold;
    font-family: '微软雅黑';
    color: #FAF0E6;
    white-space: nowrap;
}

/* ---- 导航菜单 ---- */
.nav-menu {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu li:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-menu a {
    display: block;
    float: none;
    width: auto;
    padding: 6px 14px;
    text-decoration: none;
    color: #EE82EE;
    font-size: 15px;
    font-weight: 500;
    font-family: '微软雅黑';
    white-space: nowrap;
}

.nav-menu a:hover {
    background-color: #FFF5EE;
    border-radius: 4px;
}

/* ---- 退出登录按钮 ---- */
.logout {
    background-color: antiquewhite;
    border-radius: 5px;
    width: 85px;
    text-align: center;
    flex-shrink: 0;
}

.logout>a {
    display: block;
    width: 100%;
    padding: 6px 0;
    font-weight: bold;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

/* ---- 内容区域 ---- */
.content {
    margin-top: 100px;
    padding: 0 20px 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- 页面标题 ---- */
.page-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background-color: rgba(238, 130, 238, 0.15);
    border-radius: 15px;
    backdrop-filter: blur(4px);
}

.page-header h1 {
    font-family: '楷体';
    font-size: 28px;
    color: #EE82EE;
    margin-bottom: 4px;
}

.page-header p {
    font-size: 14px;
    color: #888;
}

/* ---- 卡片通用 ---- */
.card {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    color: #EE82EE;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(238, 130, 238, 0.2);
    margin-bottom: 12px;
}

/* ---- 爬虫控制行 ---- */
.crawl-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.crawl-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crawl-field label {
    font-size: 12px;
    color: #888;
    font-weight: 600;
}

.crawl-field select,
.crawl-field input {
    padding: 7px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    min-width: 110px;
    font-family: '微软雅黑';
}

.crawl-field select:focus,
.crawl-field input:focus {
    outline: none;
    border-color: #EE82EE;
    box-shadow: 0 0 0 2px rgba(238, 130, 238, 0.15);
}

.crawl-status {
    font-size: 13px;
    color: #888;
    padding-top: 18px;
}

/* ---- 按钮 ---- */
.btn {
    padding: 8px 22px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: '微软雅黑';
    transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.96);
}

.btn-crawl {
    background-color: #EE82EE;
    color: #fff;
}

.btn-crawl:hover {
    background-color: #d66ad6;
}

.btn-crawl:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* ---- 日志框 ---- */
.log-box {
    display: none;
    background: #1a1a2e;
    color: #a0aec0;
    font-family: monospace;
    font-size: 12px;
    padding: 12px;
    border-radius: 8px;
    max-height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin-top: 12px;
    line-height: 1.5;
}

/* ---- 统计卡片行 ---- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(4px);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-num {
    font-size: 26px;
    font-weight: bold;
    color: #EE82EE;
}

.stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* ---- 筛选行 ---- */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.filter-field label {
    font-size: 12px;
    color: #888;
    font-weight: 600;
}

.filter-field select,
.filter-field input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    background: #fff;
    min-width: 100px;
    font-family: '微软雅黑';
}

.filter-field select:focus,
.filter-field input:focus {
    outline: none;
    border-color: #EE82EE;
}

.result-count {
    font-size: 13px;
    color: #888;
    margin-left: auto;
    padding-top: 18px;
}

/* ---- 表格 ---- */
.table-wrap {
    overflow-x: auto;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    background: rgba(238, 130, 238, 0.1);
    color: #555;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}

td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

tr:hover {
    background: rgba(238, 130, 238, 0.05);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-boss { background: #dbeafe; color: #2563eb; }
.badge-lagou { background: #fef9c3; color: #a16207; }
.badge-51job { background: #dcfce7; color: #16a34a; }

.tag {
    display: inline-block;
    background: rgba(238, 130, 238, 0.12);
    color: #a855a8;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 11px;
    margin: 1px;
}

/* ---- 状态提示 ---- */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

.empty {
    text-align: center;
    padding: 40px;
    color: #999;
}

.error {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
    border-radius: 8px;
}

/* ---- 响应式 ---- */
@media screen and (max-width: 768px) {
    .nav-menu a { font-size: 13px; padding: 5px 8px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .crawl-row { flex-direction: column; align-items: stretch; }
    .crawl-field select,
    .crawl-field input { width: 100%; min-width: 0; }
    .filter-row { flex-direction: column; align-items: stretch; }
    .filter-field select,
    .filter-field input { width: 100%; min-width: 0; }
    .result-count { margin-left: 0; padding-top: 0; }
    .content { padding: 0 12px 30px; margin-top: 90px; }
}

@media screen and (max-width: 480px) {
    .nav-menu { gap: 2px; }
    .nav-menu a { font-size: 12px; padding: 4px 6px; }
    .stat-num { font-size: 22px; }
    .page-header h1 { font-size: 22px; }
}

/* ========================================
   华北理工大学个人信息查询卡片
   ======================================== */
.ncst-card {
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 28px 32px;
}

.ncst-header h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 6px;
}

.ncst-header p {
    font-size: 13px;
    color: #999;
}

.ncst-body {
    margin-top: 18px;
}

.ncst-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #888;
    margin-bottom: 16px;
}

.ncst-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    display: inline-block;
}

.ncst-dot.bound {
    background: #27ae60;
}

.ncst-actions {
    display: flex;
    gap: 14px;
}

.btn-ncst, .btn-ncst-ghost {
    padding: 11px 26px;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-ncst {
    background: linear-gradient(135deg, #EE82EE, #ADD8E6);
    color: #fff;
}

.btn-ncst:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(238, 130, 238, 0.4);
}

.btn-ncst-ghost {
    background: #f0f0f0;
    color: #666;
}

.btn-ncst-ghost:hover {
    transform: translateY(-2px);
}

.btn-ncst-ghost:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ncst-result {
    margin-top: 20px;
}

.ncst-loading, .ncst-error {
    font-size: 14px;
    color: #666;
}

.ncst-error { color: #e74c3c; }

.ncst-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.ncst-stat {
    flex: 1;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

.ncst-stat b {
    display: block;
    font-size: 24px;
    color: #EE82EE;
}

.ncst-stat span {
    font-size: 12px;
    color: #999;
}

.ncst-count {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.ncst-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ncst-table th, .ncst-table td {
    border: 1px solid #eee;
    padding: 8px 10px;
    text-align: left;
}

.ncst-table th {
    background: #f0f8ff;
    color: #555;
}

.ncst-table tr:hover td {
    background: #fafafa;
}

/* 绑定步骤说明 */
.ncst-steps {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #666;
    line-height: 2;
}

.ncst-cookie-box {
    margin-top: 16px;
}

.ncst-cookie-box textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1.5px solid #eee;
    border-radius: 10px;
    font-size: 12px;
    font-family: Consolas, monospace;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.ncst-cookie-box textarea:focus {
    border-color: #EE82EE;
}

.ncst-cookie-box .btn-ncst-ghost {
    margin-top: 10px;
}

.ncst-ok {
    color: #27ae60;
    font-size: 14px;
    font-weight: 600;
}

/* 学期筛选与分组 */
.ncst-filter {
    margin-bottom: 14px;
    font-size: 13px;
    color: #666;
}

.ncst-filter select {
    padding: 6px 10px;
    border: 1.5px solid #eee;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    margin-left: 6px;
}

.ncst-filter select:focus {
    border-color: #EE82EE;
}

.ncst-term {
    margin-bottom: 18px;
}

.ncst-term-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f8ff;
    border-radius: 10px 10px 0 0;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-bottom: none;
}

.ncst-term-name {
    font-weight: 700;
    font-size: 14px;
    color: #4a9fd4;
}

.ncst-term-meta {
    font-size: 12px;
    color: #999;
}

.ncst-term .ncst-table {
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}
