/* 嘉禾望岗 - 青春记忆库 全局样式 */
:root {
    --primary-color: #4a6fa5;
    --accent-color: #ff6b6b;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --bg-light: #f4f7f6;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --font-fancy: 'ZCOOL XiaoWei', serif;
    --font-serif: 'Noto Serif SC', serif;
    --seabed-blue: #0a192f;
}

/* Seabed Background Effects */
#seabed-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
}

.light-ray {
    position: absolute;
    top: -100px;
    left: 50%;
    width: 300px;
    height: 1000px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 80%);
    transform-origin: top center;
    filter: blur(50px);
    animation: rays 10s infinite alternate ease-in-out;
}

@keyframes rays {
    from { transform: rotate(-15deg) translateX(-50%); }
    to { transform: rotate(15deg) translateX(-50%); }
}

.bubble {
    position: absolute;
    bottom: -20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: none;
    animation: rise var(--duration) infinite ease-in;
}

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    20% { opacity: 0.3; }
    80% { opacity: 0.3; }
    100% { transform: translateY(-110vh) scale(1.5); opacity: 0; }
}

/* Scroll Reveal classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.brand-text {
    font-family: var(--font-fancy);
    font-size: 2rem;
    color: var(--primary-color);
    letter-spacing: 2px;
}

h1, h2, h3, h4, .fancy-title {
    font-family: var(--font-fancy);
}

.serif-text {
    font-family: var(--font-serif);
}

/* Glassmorphism Refined */
.glass-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px 0 rgba(31, 38, 135, 0.12);
    background: rgba(255, 255, 255, 0.8);
}

/* Hero Section with High-Impact Background */
.hero-section {
    position: relative;
    height: 85vh; /* Increased for impact */
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    /* Multiple high-impact backgrounds with metro/subway theme */
    background-color: #1a1a2e; /* Fallback solid color */
    background-image: 
        linear-gradient(rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.9) 100%),
        url('https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?q=80&w=2069&auto=format&fit=crop'),
        url('https://images.unsplash.com/photo-1569330315200-0dcf08c50655?q=80&w=2069&auto=format&fit=crop'),
        url('https://images.unsplash.com/photo-1485783522162-1dbb8ffcfeb4?q=80&w=2069&auto=format&fit=crop'),
        linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin-bottom: 4rem;
    overflow: hidden;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.5);
}

/* Dynamic gradient overlay animation for visual impact */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(74, 111, 165, 0.3) 0%,
        rgba(255, 107, 107, 0.3) 50%,
        rgba(118, 75, 162, 0.3) 100%
    );
    animation: gradientShift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
}

@keyframes gradientShift {
    0%, 100% { 
        opacity: 0.4;
        transform: scale(1) rotate(0deg);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.05) rotate(2deg);
    }
}

/* Subtle Vignette and Glow with enhanced effects */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at top, transparent 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.6) 100%),
        radial-gradient(ellipse at bottom, rgba(26,26,46,0.5) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Animated light rays effect for metro atmosphere */
.hero-section .light-beam {
    position: absolute;
    top: -50%;
    left: 50%;
    width: 200px;
    height: 200%;
    background: linear-gradient(to bottom, 
        rgba(255,255,255,0.1) 0%, 
        rgba(255,255,255,0.05) 50%, 
        rgba(255,255,255,0) 100%);
    transform-origin: top center;
    animation: lightBeamSweep 15s ease-in-out infinite;
    pointer-events: none;
    filter: blur(40px);
    z-index: 0;
}

@keyframes lightBeamSweep {
    0%, 100% { 
        transform: translateX(-50%) rotate(-25deg);
        opacity: 0.3;
    }
    50% { 
        transform: translateX(-50%) rotate(25deg);
        opacity: 0.6;
    }
}

.hero-content {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 5rem 3rem;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 2;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 5px 15px rgba(0,0,0,0.4);
    font-weight: 700;
    letter-spacing: 0.2rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    letter-spacing: 0.1rem;
    opacity: 0.9;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Scroll Down Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    z-index: 3;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);}
    40% {transform: translateY(-10px) translateX(-50%);}
    60% {transform: translateY(-5px) translateX(-50%);}
}

/* Compact Article Card - Modern Style */
.article-card {
    border: none;
    background: white;
    margin-bottom: 3rem; /* 拉开上下间距 */
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

.article-card .card-img-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.article-card:hover .card-img-top {
    transform: scale(1.1);
}

/* List Style Card for Category Pages */
.list-style-card {
    flex-direction: row; /* Ensure horizontal on large screens */
    min-height: 220px;
}

@media (max-width: 576px) {
    .list-style-card {
        flex-direction: column;
    }
    .list-style-card .card-img-wrap {
        height: 180px;
        min-height: 180px;
    }
}

.list-style-card .card-img-wrap {
    height: 100%;
    min-height: 220px;
}

.list-style-card .card-img-left {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.list-style-card:hover .card-img-left {
    transform: scale(1.1);
}

.article-card .badge-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background-color: #007bff !important; /* 匹配图中的明亮蓝色 */
    border: none;
    letter-spacing: 1px;
}

.article-card .card-body {
    padding: 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card .card-title {
    font-size: 1.35rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-family: var(--font-serif);
    font-weight: 700;
}

.article-card .card-text {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.article-card .btn-read-more {
    background-color: #007bff;
    color: white;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: 50px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    font-size: 1.05rem;
    border: none;
    display: block;
}

.article-card .btn-read-more:hover {
    background-color: #0056b3;
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
    color: white;
}

/* Category Badges */
.badge-category {
    background-color: var(--primary-color);
    color: white;
    font-weight: normal;
    padding: 0.3em 0.8em;
    border-radius: 50px;
    font-size: 0.75rem;
}

/* Mailbox Cards Refined */
.letter-card {
    background: #fff;
    border-top: 3px solid var(--accent-color);
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    border-radius: 2px 2px 15px 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    overflow: hidden;
}

.letter-card:hover {
    transform: rotateX(10deg) translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.letter-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    border-width: 0 20px 20px 0;
    border-style: solid;
    border-color: #f0f0f0 #fff #f0f0f0 #f0f0f0;
    display: block;
    width: 0;
    box-shadow: -3px 3px 5px rgba(0,0,0,0.05);
}

/* Custom Nav links Refined */
.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 10px;
    font-size: 1.3rem;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

/* 导航文字下划线特效 */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* 鼠标经过显示二级栏目特效 */
@media (min-width: 992px) {
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        pointer-events: none;
        margin-top: 0;
        border-radius: 15px !important;
        padding: 10px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
        border: 1px solid rgba(255,255,255,0.2) !important;
    }
    
    .dropdown-item {
        border-radius: 10px;
        padding: 8px 20px;
        font-weight: 500;
        transition: all 0.3s ease;
    }
    
    .dropdown-item:hover {
        background-color: var(--primary-color);
        color: white !important;
        transform: translateX(5px);
    }
}

/* Utilities */
.hover-bg-light:hover {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

.transition {
    transition: all 0.3s ease;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom Breadcrumb */
.custom-breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
}

.custom-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s ease;
}

.custom-breadcrumb .breadcrumb-item a:hover {
    color: white;
}

.custom-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
    content: "\F285"; /* bi-chevron-right */
    font-family: 'bootstrap-icons';
}

/* Custom Pagination */
.custom-pagination .page-link {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    margin: 0 4px;
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

.custom-pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.custom-pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.custom-pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
    border-color: transparent;
}

/* Button stylings */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #3a5a8a;
    border-color: #3a5a8a;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #3a5a8a;
    transform: translateY(-3px);
}
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

/* Page Content Styles - 确保图片正常显示 */
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: block;
}

.page-content h2,
.page-content h3,
.page-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.page-content p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.page-content ul,
.page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

/* 友情链接样式 */
#friend-links {
    max-height: 200px; /* 限制最大高度，使布局更紧凑 */
    overflow-y: auto; /* 如果链接过多，允许滚动 */
}

#friend-links li {
    margin-bottom: 0.5rem;
}

#friend-links a {
    transition: color 0.3s ease;
}

#friend-links a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline;
}
