/* 
  JX-ZSB PC Portal - Premium Design System
  Author: Antigravity
*/

:root {
    --primary-color: #0047AB;
    --primary-light: #4A90E2;
    --accent-color: #FFD700;
    --bg-dark: #0a0e17;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-dim: #b0b3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Glassmorphism Components */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(10, 14, 23, 0.9);
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.logo span {
    background: linear-gradient(to right, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* QR Float */
.qr-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qr-item {
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.qr-item i { font-size: 20px; color: var(--text-main); }

.qr-popover {
    position: absolute;
    right: 70px;
    top: 0;
    width: 150px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: var(--transition);
    text-align: center;
}

.qr-popover img {
    width: 120px;
    height: 120px;
    margin-bottom: 8px;
}

.qr-popover p {
    color: #333;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

.qr-item:hover, .qr-item.active {
    background: var(--primary-color);
}

.qr-item:hover .qr-popover, .qr-item.active .qr-popover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}


nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    opacity: 0.8;
    transition: var(--transition);
}

.nav-links a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 71, 171, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 71, 171, 0.5);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background: url('../images/hero-bg.png') no-repeat center center;
    background-size: cover;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 14, 23, 0.2), var(--bg-dark));
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 215, 0, 0.1);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h1 {
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
}

.hero-desc {
    font-size: 20px;
    color: var(--text-dim);
    margin-bottom: 40px;
}

.search-box {
    width: 100%;
    max-width: 600px;
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 8px 0 24px;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    outline: none;
}

.search-box i {
    color: var(--text-dim);
    margin-right: 16px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: -60px;
    position: relative;
    z-index: 20;
}

.stat-card {
    padding: 32px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

.stat-val {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--primary-light);
}

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

/* Section Header */
.section-header {
    margin: 80px 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-title p {
    color: var(--text-dim);
}

/* College Grid */
.college-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.college-card {
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.college-card:hover {
    transform: translateY(-8px);
}

.college-img {
    height: 200px;
    background: #1a1f2e;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.college-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    padding: 10px;
    object-fit: contain;
}

.college-info {
    padding: 24px;
}

.college-info h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.college-meta {
    display: flex;
    gap: 16px;
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 16px;
}

.college-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
}

/* Article List */
.article-row {
    display: flex;
    gap: 40px;
}

.article-main {
    flex: 2;
}

.article-side {
    flex: 1;
}

.article-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.article-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.date-box {
    min-width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.date-day { font-size: 20px; font-weight: 800; }
.date-month { font-size: 11px; opacity: 0.8; }

.article-info h4 {
    margin-bottom: 8px;
    font-size: 17px;
    transition: var(--transition);
}

.article-item:hover h4 {
    color: var(--primary-light);
}

.article-meta {
    font-size: 13px;
    color: var(--text-dim);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ==========================================
   Mobile Deep Adaptation (Premium)
   ========================================== */
@media (max-width: 768px) {
    /* Container & Layout */
    .container {
        padding: 0 20px;
    }

    /* Header - Hide nav links on mobile for clean look */
    .nav-links {
        display: none !important;
    }

    .nav-content {
        justify-content: space-between;
        gap: 10px;
    }

    .logo span {
        font-size: 18px;
    }

    .btn-primary {
        padding: 8px 16px;
        font-size: 12px;
    }

    /* Hero Section */
    .hero {
        height: auto;
        padding: 120px 0 60px;
        text-align: center;
    }

    h1 {
        font-size: 32px;
        margin-bottom: 16px;
    }

    .hero-desc {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .search-box {
        height: 56px;
        padding: 0 5px 0 15px;
    }

    .search-box input {
        font-size: 15px;
    }

    /* Stats Grid - 2x2 Layout */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
        margin-top: 20px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-val {
        font-size: 24px;
    }

    /* QR Sidebar - Fixed to Right Middle */
    .qr-sidebar {
        right: 12px;
        top: 50%; /* 居中 */
        bottom: auto;
        margin-top: -50px; /* 替代 transform: translateY 以防止破坏 fixed 定位 */
        transform: none;
        flex-direction: column;
        gap: 10px;
        z-index: 3000; /* 必须高于 qr-overlay 的 2500 */
    }

    .qr-item {
        width: 44px;
        height: 44px;
        background: rgba(10, 14, 23, 0.9);
        border: 1px solid var(--glass-border);
        box-shadow: 0 4px 15px rgba(0,0,0,0.4);
        /* 取消 backdrop-filter 和 transform 避免创建包含块，破坏子元素的 position: fixed */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transform: none !important;
    }

    /* QR Popover - Mobile Modal Style */
    .qr-popover {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -40%) scale(0.9) !important;
        width: 260px !important;
        padding: 30px !important;
        margin: 0 !important;
        z-index: 3001;
        background: #ffffff;
        box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    }

    .qr-popover img {
        width: 180px;
        height: 180px;
        margin-bottom: 15px;
    }

    .qr-popover p {
        font-size: 16px;
        color: #111;
    }

    .qr-item.active .qr-popover {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translate(-50%, -50%) scale(1) !important;
    }

    /* Overlay Backdrop for Mobile Popover */
    .qr-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.7);
        backdrop-filter: blur(5px);
        z-index: 2500;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    body.qr-open {
        overflow: hidden;
    }

    body.qr-open .qr-overlay {
        opacity: 1;
        visibility: visible;
    }

    /* College Grid */
    .college-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
