/* ============================================
   cczu-无心 · 赛博朋克科技主题
   Cyberpunk Neon Grid — Dark Theme
   ============================================ */

:root {
    --bg-deep: #060a12;
    --bg-primary: #0a0f1a;
    --bg-card: #0d1320;
    --bg-card-hover: #111827;
    --bg-glass: rgba(13, 19, 32, 0.72);
    --bg-glass-border: rgba(0, 240, 255, 0.08);

    --cyan: #00f0ff;
    --cyan-dim: #00b8c7;
    --cyan-glow: rgba(0, 240, 255, 0.35);
    --cyan-subtle: rgba(0, 240, 255, 0.06);
    --blue: #3b82f6;
    --purple: #a855f7;
    --magenta: #ec4899;

    --text-primary: #e2e8f0;
    --text-secondary: #8892a4;
    --text-muted: #4a5568;
    --text-accent: var(--cyan);

    --border: rgba(255, 255, 255, 0.04);
    --border-glow: rgba(0, 240, 255, 0.12);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --font-display: 'Noto Serif SC', 'Georgia', serif;
    --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* === ANIMATED GRID BACKGROUND === */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridDrift 20s linear infinite;
}

.grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 240, 255, 0.06), transparent 60%),
                radial-gradient(ellipse 60% 40% at 80% 100%, rgba(168, 85, 247, 0.04), transparent);
}

.grid-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle 400px at var(--mx, 50%) var(--my, 50%), rgba(0, 240, 255, 0.03), transparent);
    animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridDrift {
    to { background-position: 60px 60px; }
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* === HEADER === */
header {
    position: relative;
    z-index: 10;
    padding: 32px 0 40px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0, 240, 255, 0.03) 0%, transparent 100%);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-mark {
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px var(--cyan-glow));
    animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 8px var(--cyan-glow)); }
    50% { filter: drop-shadow(0 0 16px var(--cyan-glow)); }
}

.brand h1 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 1px;
    line-height: 1.2;
}

.brand h1 .accent {
    color: var(--cyan);
    text-shadow: 0 0 20px var(--cyan-glow);
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

.header-stats {
    display: flex;
    gap: 24px;
}

.stat {
    text-align: center;
    padding: 8px 16px;
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    background: var(--cyan-subtle);
    min-width: 80px;
}

.stat-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 600;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan-glow);
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* === SEARCH SECTION === */
.search-section {
    position: relative;
    z-index: 10;
    margin-top: -20px;
    margin-bottom: 32px;
}

.search-bar {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.4s var(--ease-out-expo);
}

.search-bar:focus-within {
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(0, 240, 255, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.search-input-wrap {
    flex: 2;
    min-width: 200px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s;
}

.search-input-wrap:focus-within .search-icon {
    color: var(--cyan);
}

.search-input-wrap input {
    width: 100%;
    padding: 11px 14px 11px 42px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s var(--ease-out-expo);
}

.search-input-wrap input::placeholder {
    color: var(--text-muted);
}

.search-input-wrap input:focus {
    border-color: var(--cyan-dim);
    background: rgba(0, 240, 255, 0.03);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.06);
}

.filter-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    flex: 1;
    min-width: 280px;
}

.filter-group .field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 120px;
}

.filter-group label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.filter-group input[type="date"] {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-mono);
    outline: none;
    transition: all 0.3s var(--ease-out-expo);
    color-scheme: dark;
}

.filter-group input[type="date"]:focus {
    border-color: var(--cyan-dim);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.06);
}

.btn-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--cyan-dim), var(--cyan));
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    white-space: nowrap;
    height: 42px;
    position: relative;
    overflow: hidden;
}

.btn-search::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--cyan-glow);
}

.btn-search:hover::before { opacity: 1; }

.btn-search:active {
    transform: translateY(0) scale(0.98);
}

.btn-search svg {
    transition: transform 0.3s var(--ease-spring);
}

.btn-search:hover svg {
    transform: translateX(3px);
}

/* === RESULTS SECTION === */
.results-section {
    position: relative;
    z-index: 5;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-line {
    width: 3px;
    height: 20px;
    background: var(--cyan);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--cyan-glow);
}

.section-title h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.badge {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--cyan);
    background: var(--cyan-subtle);
    border: 1px solid var(--border-glow);
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.badge:empty { display: none; }

/* === CARD LIST === */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.04), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s;
}

.card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    transform: translateX(4px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3),
                -2px 0 12px rgba(0, 240, 255, 0.06);
}

.card:hover::before { opacity: 1; }

.card .icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(0, 240, 255, 0.02));
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    transition: all 0.35s var(--ease-out-expo);
}

.card:hover .icon {
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.25);
}

.card .info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.card .title {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.card:hover .title {
    color: var(--cyan);
}

.card .meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card .meta .date-icon { font-size: 13px; }

/* === SELECT 下拉框（匹配深色主题） === */
.filter-group select {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.3s var(--ease-out-expo);
    color-scheme: dark;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.filter-group select:focus {
    border-color: var(--cyan-dim);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.06);
}

.filter-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* === 学院 Badge（cyan 色） === */
.badge-college {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.15);
    padding: 1px 8px;
    border-radius: 10px;
    letter-spacing: 0.3px;
    margin-right: 4px;
}

/* === 分类 Badge（purple 色） === */
.badge-category {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--purple);
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.15);
    padding: 1px 8px;
    border-radius: 10px;
    letter-spacing: 0.3px;
    margin-right: 4px;
}

/* === 级别 Badge === */
.badge-level {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 1px 8px;
    border-radius: 10px;
    letter-spacing: 0.3px;
    margin-right: 4px;
    font-weight: 600;
}

.badge-level-national {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.25);
}

.badge-level-provincial {
    color: #ffa502;
    background: rgba(255, 165, 2, 0.1);
    border: 1px solid rgba(255, 165, 2, 0.25);
}

.badge-level-school {
    color: #2ed573;
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.25);
}

.badge-level-other {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}

/* === 截止日期样式 === */
.deadline-icon {
    font-size: 13px;
    margin-left: 4px;
}

.deadline-text {
    color: #ffa502;
    font-weight: 500;
}

.card .arrow {
    color: var(--text-muted);
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.3s var(--ease-spring);
    position: relative;
    z-index: 1;
}

.card:hover .arrow {
    color: var(--cyan);
    transform: translateX(4px);
    text-shadow: 0 0 8px var(--cyan-glow);
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 24px 0 48px;
}

.pagination button {
    padding: 8px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.pagination button:hover:not(:disabled) {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--cyan-dim);
    color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}

.pagination button:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.pagination .info {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    padding: 0 8px;
    letter-spacing: 0.5px;
}

/* === LOADING & EMPTY === */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    letter-spacing: 1px;
}

.loader {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}

.loading::after { display: none; }

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

.empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty::before {
    content: '◇';
    display: block;
    font-size: 40px;
    margin-bottom: 12px;
    color: var(--text-muted);
    opacity: 0.4;
}

/* === DETAIL PAGE === */
.detail-header {
    padding: 24px 0 12px;
}

.detail-header h1 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.detail-header .meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
}

.detail-header .meta a {
    color: var(--cyan);
    transition: text-shadow 0.3s;
}

.detail-header .meta a:hover {
    text-shadow: 0 0 8px var(--cyan-glow);
}

.detail-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    margin: 16px 0 40px;
    line-height: 1.8;
    word-break: break-word;
    color: var(--text-secondary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s var(--ease-out-expo);
}

.back-link:hover {
    gap: 10px;
    text-shadow: 0 0 8px var(--cyan-glow);
}

/* === FOOTER === */
footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 24px 0;
    position: relative;
    z-index: 5;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.footer-info {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.footer-info a {
    color: var(--cyan-dim);
    transition: color 0.3s;
}

.footer-info a:hover {
    color: var(--cyan);
    text-shadow: 0 0 6px var(--cyan-glow);
}

/* === STAGGER ANIMATION === */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeSlideIn 0.4s var(--ease-out-expo) both;
}

.card:nth-child(1) { animation-delay: 0.02s; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.08s; }
.card:nth-child(4) { animation-delay: 0.11s; }
.card:nth-child(5) { animation-delay: 0.14s; }
.card:nth-child(6) { animation-delay: 0.17s; }
.card:nth-child(7) { animation-delay: 0.20s; }
.card:nth-child(8) { animation-delay: 0.23s; }
.card:nth-child(9) { animation-delay: 0.26s; }
.card:nth-child(10) { animation-delay: 0.29s; }

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-dim);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .brand {
        flex-direction: column;
        gap: 12px;
    }

    .brand h1 { font-size: 24px; }

    .header-stats { gap: 16px; }

    .search-bar {
        flex-direction: column;
        padding: 16px;
    }

    .search-input-wrap,
    .filter-group {
        min-width: 100%;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-group select {
        width: 100%;
    }

    .btn-search { width: 100%; justify-content: center; }

    .card .icon { display: none; }

    .card { padding: 14px 16px; }

    .card .title { font-size: 13.5px; }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    header { padding: 24px 0 32px; }
    .brand h1 { font-size: 20px; }
    .logo-mark svg { width: 36px; height: 36px; }
    .stat-num { font-size: 18px; }
}
