/**
 * base.html 全站基础布局样式（从内联 <style> 拆出）
 * 版本: 20260903_v1
 * 注意: --bs-primary / --primary-color 的真实主题值由 base.html 内联 <style> 覆盖
 */
:root {
    --bs-primary: #0d6efd;
    --primary-color: #0d6efd;
    --bs-font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* 现代化配色变量 */
    --primary-gradient: linear-gradient(135deg, var(--bs-primary) 0%, color-mix(in srgb, var(--bs-primary) 80%, #667eea) 100%);
    --success-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --warning-gradient: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    --danger-gradient: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    --info-gradient: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    --dark-gradient: linear-gradient(135deg, #343a40 0%, #495057 100%);

    /* 柔和阴影 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);

    /* 现代化边框圆角 */
    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
}

/* === 基础样式重置 === */

/* 确保Font Awesome图标在导航菜单中显示 */
.dropdown-menu .dropdown-item i,
.navbar .nav-link i {
    display: inline-block !important;
    width: auto;
    text-align: center;
    margin-right: 0.5rem;
    color: inherit;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 全局字体大小调整 */
html {
    font-size: 14px;
}

/* 导航栏样式调整 */
.navbar-brand {
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}
.navbar-brand .navbar-logo {
    height: 40px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
    background: transparent;
    display: block;
}
.navbar-brand .navbar-brand-text {
    font-weight: 600;
    letter-spacing: 0.02em;
}
@media (max-width: 576px) {
    .navbar-brand .navbar-logo {
        height: 34px;
    }
    .navbar-brand .navbar-brand-text {
        font-size: 0.95rem;
    }
}
.nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
}
.dropdown-item {
    font-size: 0.85rem;
    padding: 0.25rem 1rem;
}

/* 用户菜单徽章样式优化 */
.dropdown-menu .dropdown-item .badge {
    font-size: 0.75rem;
    min-width: 24px;
    padding: 0.25em 0.5em;
}
.dropdown-menu .dropdown-item.d-flex {
    padding: 0.4rem 1rem;
}

/* bg-purple徽章颜色定义 */
.badge.bg-purple {
    background: linear-gradient(135deg, #6f42c1 0%, #9b59b6 100%) !important;
    color: #fff !important;
}

/* 页面标题调整 */
h1, .h1 {
    font-size: 1.8rem;
}
h2, .h2 {
    font-size: 1.5rem;
}
h3, .h3 {
    font-size: 1.3rem;
}
h4, .h4 {
    font-size: 1.1rem;
}
h5, .h5 {
    font-size: 1rem;
}
h6, .h6 {
    font-size: 0.9rem;
}

/* 卡片样式调整 */
.card-title {
    font-size: 1rem;
}
.card-body {
    padding: 1rem;
}

/* 按钮样式调整 */
.btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
}
.btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
}

/* 页脚样式调整 */
footer h5 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}
footer ul li {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}
footer p {
    font-size: 0.85rem;
}

/* 首页各板块标题 */
.section-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

/* 表单元素 */
.form-control, .form-select {
    font-size: 0.9rem;
    padding: 0.35rem 0.65rem;
}

/* 列表组 */
.list-group-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* 警告框 */
.alert {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* 缩小标签和徽章 */
.badge {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
}

/* === 现代化UI组件 === */

/* 导航栏渐变背景 */
.navbar-dark.bg-primary {
    background: var(--primary-gradient) !important;
    box-shadow: var(--shadow-md);
}

/* 按钮现代化 */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 90%, black) 0%, color-mix(in srgb, var(--bs-primary) 70%, #667eea) 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-gradient);
    border: none;
    box-shadow: var(--shadow-sm);
}
.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning-gradient);
    border: none;
    box-shadow: var(--shadow-sm);
}
.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #dc7633 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-gradient);
    border: none;
    box-shadow: var(--shadow-sm);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-info {
    background: var(--info-gradient);
    border: none;
    box-shadow: var(--shadow-sm);
}
.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #5a6268 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* 卡片现代化阴影 */
.card {
    box-shadow: var(--shadow-sm);
    border: none;
    border-radius: var(--border-radius-md);
}
.card:hover {
    box-shadow: var(--shadow-md);
}

/* 警告框渐变 */
.alert-primary {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    border-color: var(--bs-primary);
}
.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    border-color: #28a745;
}
.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(253, 126, 20, 0.1) 100%);
    border-color: #ffc107;
}
.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(232, 62, 140, 0.1) 100%);
    border-color: #dc3545;
}

/* 徽章渐变 */
.badge.bg-primary {
    background: var(--primary-gradient) !important;
}
.badge.bg-success {
    background: var(--success-gradient) !important;
}
.badge.bg-warning {
    background: var(--warning-gradient) !important;
}
.badge.bg-danger {
    background: var(--danger-gradient) !important;
}
.badge.bg-info {
    background: var(--info-gradient) !important;
}

/* 按钮和小部件美化 */
.btn {
    border-radius: var(--border-radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* 输入框美化 */
.form-control, .form-select {
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
    transform: translateY(-1px);
}

/* 下拉菜单美化 */
.dropdown-menu {
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    border: none;
    animation: dropdownFadeIn 0.3s ease;
    z-index: 10000;
}

/* 科幻模式下导航栏下拉菜单样式 */
html.mode-scifi .navbar .dropdown-menu {
    background: rgba(16, 16, 32, 0.95) !important;
    border: 1px solid rgba(100, 200, 255, 0.5) !important;
    box-shadow: 0 8px 32px rgba(100, 200, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    z-index: 10000 !important;
}

html.mode-scifi .navbar .dropdown-item {
    color: rgba(100, 200, 255, 0.9) !important;
    transition: all 0.3s ease !important;
}

html.mode-scifi .navbar .dropdown-item:hover {
    background: rgba(100, 200, 255, 0.15) !important;
    color: rgba(120, 220, 255, 1) !important;
}

/* 科幻模式下的搜索样式 */
html.mode-scifi .search-toggle:hover {
    color: rgba(120, 220, 255, 1) !important;
    text-shadow: 0 0 8px rgba(100, 200, 255, 0.8);
}

html.mode-scifi .search-form-expanded {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(100, 200, 255, 0.5);
    box-shadow: 0 0 20px rgba(100, 200, 255, 0.3);
}

html.mode-scifi .search-form-expanded .form-control {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(100, 200, 255, 0.5);
    color: rgba(100, 200, 255, 0.9);
}

html.mode-scifi .search-form-expanded .form-control:focus {
    background: rgba(26, 26, 46, 0.9);
    border-color: rgba(120, 220, 255, 0.8);
    box-shadow: 0 0 0 0.2rem rgba(100, 200, 255, 0.25);
    color: rgba(120, 220, 255, 1);
}

html.mode-scifi .search-form-expanded .form-control::placeholder {
    color: rgba(100, 200, 255, 0.6);
}

html.mode-scifi .search-form-expanded .btn {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(100, 200, 255, 0.5);
    color: rgba(100, 200, 255, 0.9);
}

html.mode-scifi .search-form-expanded .btn:hover {
    background: rgba(100, 200, 255, 0.2);
    border-color: rgba(120, 220, 255, 0.8);
    color: rgba(120, 220, 255, 1);
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.3);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    transition: all 0.2s ease;
    border-radius: var(--border-radius-sm);
    margin: 2px 8px;
}

.dropdown-item:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateX(5px);
}

/* 模式切换按钮样式 */
.mode-toggle {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

.mode-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(180deg);
}

/* 确保导航栏按钮对齐 */
.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

/* 导航栏搜索容器样式 */
.search-container {
    position: relative;
}

.search-toggle {
    transition: all 0.3s ease;
}

.search-toggle:hover {
    color: rgba(255,255,255,1) !important;
    transform: scale(1.1);
}

.search-form-expanded {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: searchSlideDown 0.3s ease;
}

@keyframes searchSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-search {
    margin: 0;
    flex-shrink: 0;
}

/* 确保导航栏不换行 */
.navbar-nav {
    flex-wrap: nowrap !important;
}

/* 优化导航栏间距 */
.navbar-nav .nav-link {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

.search-form-expanded .form-control {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    transition: all 0.3s ease;
}

.search-form-expanded .form-control:focus {
    background: #fff;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    color: #333;
}

.search-form-expanded .form-control::placeholder {
    color: #666;
    opacity: 0.8;
}

.search-form-expanded .btn {
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    transition: all 0.3s ease;
}

.search-form-expanded .btn:hover {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* 响应式处理 */
@media (max-width: 1199.98px) {
    /* 在较小屏幕上隐藏城市和学校选择器 */
    #cityDropdown, #schoolDropdown {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-search {
        margin: 0.5rem 0;
        width: 100%;
    }

    .navbar-search .form-control {
        min-width: auto !important;
        max-width: none !important;
    }

    /* 移动端显示所有选择器 */
    #cityDropdown, #schoolDropdown {
        display: block !important;
    }
}

/* 在1200px-1400px之间进一步优化间距 */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar-nav .nav-link {
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }

    .navbar-search {
        margin: 0 0.1rem;
    }
}

/* 禁用的导航栏链接样式 - 适用于所有主题 */
.navbar .nav-link.disabled {
    color: #6c757d !important;
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 深色模式下的禁用样式 */
html.mode-dark .navbar .nav-link.disabled {
    color: #495057 !important;
}

/* 科幻模式下的禁用样式 */
html.mode-scifi .navbar .nav-link.disabled {
    color: #808080 !important;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.2);
}

/* 禁用状态下的图标样式 */
.navbar .nav-link.disabled i {
    color: inherit !important;
    opacity: 0.6;
}

/* === 统一的模式样式系统 === */

/* 默认（白天）模式 */
html.mode-light,
html:not([data-mode]) {
    background-color: #ffffff;
}

html.mode-light body,
html:not([data-mode]) body {
    background-color: #ffffff;
    color: #212529;
}

/* 深色模式 */
html.mode-dark {
    background-color: #000000;
}

html.mode-dark body {
    background-color: #000000 !important;
    color: #e0e0e0 !important;
}

html.mode-dark .navbar {
    background: #1a1a1a !important;
}

html.mode-dark .navbar.bg-primary {
    background: #1a1a1a !important;
}

html.mode-dark .card {
    background-color: #000000 !important;
    color: #e0e0e0;
    border-color: #333;
}

html.mode-dark .bg-light {
    background-color: #000000 !important;
    color: #e0e0e0 !important;
}

html.mode-dark a {
    color: #66b3ff;
}

html.mode-dark a:hover {
    color: #99ccff;
}

html.mode-dark .text-muted {
    color: #999 !important;
}

html.mode-dark .border-bottom {
    border-bottom-color: #333 !important;
}

html.mode-dark .alert {
    background-color: #1a1a1a;
    color: #e0e0e0;
    border-color: #333;
}

html.mode-dark .dropdown-menu {
    background-color: #1a1a1a;
    border-color: #333;
}

html.mode-dark .dropdown-item {
    color: #e0e0e0;
}

html.mode-dark .dropdown-item:hover {
    background-color: #333;
    color: #fff;
}

/* 深色模式下所有容器和特殊元素的黑色背景 */
html.mode-dark .container,
html.mode-dark .row,
html.mode-dark .col,
html.mode-dark .col-md-6,
html.mode-dark .col-md-8,
html.mode-dark .col-md-4,
html.mode-dark .col-lg-6,
html.mode-dark .col-lg-8,
html.mode-dark .col-lg-4 {
    background-color: transparent;
}

html.mode-dark .bg-white {
    background-color: #000000 !important;
}

html.mode-dark .bg-light {
    background-color: #000000 !important;
}

/* 学术活动卡片 */
html.mode-dark .event-card,
html.mode-dark .guide-card {
    background-color: #000000 !important;
    border-color: #333 !important;
}

html.mode-dark .event-card .card-title,
html.mode-dark .guide-card .card-title {
    color: #ffffff !important;
}

html.mode-dark .event-card h5,
html.mode-dark .guide-card h5,
html.mode-dark .event-card h6,
html.mode-dark .guide-card h6 {
    color: #ffffff !important;
}

/* 轮播图和其他组件 */
html.mode-dark .carousel,
html.mode-dark .carousel-inner,
html.mode-dark .carousel-item {
    background-color: #000000 !important;
}

html.mode-dark .list-group-item {
    background-color: #000000 !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}

html.mode-dark .btn-primary {
    background: #1a73e8 !important;
    border-color: #1a73e8 !important;
}

html.mode-dark .btn-primary:hover {
    background: #1557b0 !important;
    border-color: #1557b0 !important;
}

html.mode-dark h1, html.mode-dark h2, html.mode-dark h3,
html.mode-dark h4, html.mode-dark h5, html.mode-dark h6 {
    color: #ffffff !important;
}

html.mode-dark p, html.mode-dark span, html.mode-dark div {
    color: #e0e0e0;
}

/* 深色模式下所有卡片相关标题强制白色 - 超高优先级 */
html.mode-dark .card h1, 
html.mode-dark .card h2, 
html.mode-dark .card h3,
html.mode-dark .card h4, 
html.mode-dark .card h5, 
html.mode-dark .card h6,
html.mode-dark .card .card-title,
html.mode-dark .card-title,
html.mode-dark .card .card-header h1,
html.mode-dark .card .card-header h2,
html.mode-dark .card .card-header h3,
html.mode-dark .card .card-header h4,
html.mode-dark .card .card-header h5,
html.mode-dark .card .card-header h6,
html.mode-dark .card .card-body h1,
html.mode-dark .card .card-body h2,
html.mode-dark .card .card-body h3,
html.mode-dark .card .card-body h4,
html.mode-dark .card .card-body h5,
html.mode-dark .card .card-body h6 {
    color: #ffffff !important;
}

/* 深色模式下的所有卡片标题强制白色 - 最高优先级 */
html.mode-dark .card h1,
html.mode-dark .card h2,
html.mode-dark .card h3,
html.mode-dark .card h4,
html.mode-dark .card h5,
html.mode-dark .card h6,
html.mode-dark .card .card-title,
html.mode-dark .card .h1,
html.mode-dark .card .h2,
html.mode-dark .card .h3,
html.mode-dark .card .h4,
html.mode-dark .card .h5,
html.mode-dark .card .h6 {
    color: #ffffff !important;
}

/* 首页小卡片标题和内容 */
html.mode-dark .card .card-title a,
html.mode-dark .card .card-text,
html.mode-dark .card .list-group-item h6,
html.mode-dark .card .list-group-item .fw-bold,
html.mode-dark .card .rental-item h5,
html.mode-dark .card .used-item h5,
html.mode-dark .card .event-title,
html.mode-dark .card .guide-title {
    color: #ffffff !important;
}

/* 确保所有卡片内的链接标题为白色 */
html.mode-dark .card a h5,
html.mode-dark .card a h6,
html.mode-dark .card a .card-title,
html.mode-dark .card a h1,
html.mode-dark .card a h2,
html.mode-dark .card a h3,
html.mode-dark .card a h4 {
    color: #ffffff !important;
}

/* 小卡片内的标题文本 */
html.mode-dark .hover-shadow h5,
html.mode-dark .hover-shadow h6,
html.mode-dark .hover-shadow .card-title,
html.mode-dark .hover-shadow h1,
html.mode-dark .hover-shadow h2,
html.mode-dark .hover-shadow h3,
html.mode-dark .hover-shadow h4 {
    color: #ffffff !important;
}

/* 首页各模块的内容标题 */
html.mode-dark .card .mb-1,
html.mode-dark .card .mb-2,
html.mode-dark .card .mb-3 {
    color: #ffffff !important;
}

/* 确保所有链接文本在深色模式下为白色 */
html.mode-dark .card-body a,
html.mode-dark .list-group-item a {
    color: #ffffff !important;
}

/* 特别针对首页栏目卡片的标题 */
html.mode-dark .card-body h5,
html.mode-dark .card-body h6,
html.mode-dark .card-header h5,
html.mode-dark .card-header h6,
html.mode-dark .list-group-item h5,
html.mode-dark .list-group-item h6 {
    color: #ffffff !important;
}

/* 覆盖可能的文本颜色类 */
html.mode-dark .card .text-dark,
html.mode-dark .card .text-secondary,
html.mode-dark .card .text-muted {
    color: #ffffff !important;
}

/* 确保栏目标题链接为白色 */
html.mode-dark .section-title,
html.mode-dark .section-title a {
    color: #ffffff !important;
}

/* 保持链接悬停效果 */
html.mode-dark .card-body a:hover,
html.mode-dark .list-group-item a:hover {
    color: #66b3ff !important;
}

/* 特定的文本元素 */
html.mode-dark .card .text-truncate {
    color: #ffffff !important;
}

html.mode-dark .card p, html.mode-dark .card span,
html.mode-dark .card div, html.mode-dark .card li {
    color: #e0e0e0 !important;
}

/* 重要：bg-white卡片在深色模式下的特殊处理 */
html.mode-dark .card.bg-white p, html.mode-dark .card.bg-white span,
html.mode-dark .card.bg-white div, html.mode-dark .card.bg-white li {
    color: #495057 !important;
}

/* 但是bg-white卡片的标题仍然要保持白色以便在黑色背景下可见 */
html.mode-dark .card.bg-white h1, 
html.mode-dark .card.bg-white h2,
html.mode-dark .card.bg-white h3, 
html.mode-dark .card.bg-white h4,
html.mode-dark .card.bg-white h5, 
html.mode-dark .card.bg-white h6,
html.mode-dark .card.bg-white .card-title {
    color: #ffffff !important;
}

/* 科幻模式 (更新: 20251124_v2 - 移除黑色迷雾效果，改用白色发光) */
html.mode-scifi {
    background: linear-gradient(180deg, #0a1929 0%, #001e3c 50%, #0a1929 100%) !important;
    background-attachment: fixed;
    min-height: 100vh;
}

html.mode-scifi body {
    background: transparent !important;
    color: #00ff88;
    min-height: 100vh;
}

html.mode-scifi .navbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    border-bottom: 2px solid rgba(100, 200, 255, 0.6);
    box-shadow: 0 2px 30px rgba(100, 200, 255, 0.4);
}

html.mode-scifi .card {
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid rgba(100, 200, 255, 0.4);
    box-shadow: 0 0 25px rgba(100, 200, 255, 0.2);
}

html.mode-scifi .btn-primary {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #0a0a0a;
    border: none;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

html.mode-scifi .btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.8);
    transform: translateY(-2px);
}

html.mode-scifi .section-title {
    color: #00ff88;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.7);
}

html.mode-scifi .hover-shadow {
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid rgba(100, 200, 255, 0.4);
    box-shadow: 0 0 20px rgba(100, 200, 255, 0.2);
}

html.mode-scifi .hover-shadow:hover {
    box-shadow: 0 0 35px rgba(120, 220, 255, 0.5);
    border-color: rgba(120, 220, 255, 0.7);
    transform: translateY(-3px) scale(1.02);
}

html.mode-scifi .guide-card,
html.mode-scifi .event-card {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(100, 200, 255, 0.4);
    box-shadow: 0 0 25px rgba(100, 200, 255, 0.2);
}

html.mode-scifi .guide-card *:not(.badge):not(.btn),
html.mode-scifi .event-card *:not(.badge):not(.btn) {
    color: #e0e0e0;
}

html.mode-scifi .guide-card h5,
html.mode-scifi .event-card h5,
html.mode-scifi .guide-card h6,
html.mode-scifi .event-card h6 {
    color: #ffffff !important;
}

html.mode-scifi .guide-card:hover,
html.mode-scifi .event-card:hover {
    border-color: rgba(120, 220, 255, 0.7);
    box-shadow: 0 0 40px rgba(120, 220, 255, 0.4);
}

html.mode-scifi .carousel {
    border: 2px solid rgba(100, 200, 255, 0.6);
    box-shadow: 0 0 35px rgba(100, 200, 255, 0.4);
}

html.mode-scifi .alert {
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid rgba(100, 200, 255, 0.5);
    color: #ffffff;
}

html.mode-scifi .alert h5,
html.mode-scifi .alert .alert-heading {
    color: #00ff88 !important;
}

html.mode-scifi .alert p {
    color: #ffffff !important;
}

html.mode-scifi .alert small {
    color: #b0b0b0 !important;
}

html.mode-scifi .card-title,
html.mode-scifi .card-text,
html.mode-scifi .list-item {
    color: #ffffff !important;
}

html.mode-scifi .text-dark {
    color: #e0e0e0 !important;
}

html.mode-scifi .bg-light {
    background-color: rgba(26, 26, 46, 0.9) !important;
    color: #e0e0e0 !important;
}

html.mode-scifi .border-bottom {
    border-bottom-color: rgba(0, 255, 136, 0.3) !important;
}

html.mode-scifi .hover-shadow h5 {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7), 0 0 20px rgba(78, 205, 196, 0.4);
}

html.mode-scifi .hover-shadow span {
    color: #e0e0e0 !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5), 0 0 15px rgba(160, 160, 160, 0.3);
}

html.mode-scifi .hover-shadow i {
    text-shadow: none !important;
}

html.mode-scifi .card:not(.guide-card):not(.event-card) h1,
html.mode-scifi .card:not(.guide-card):not(.event-card) h2,
html.mode-scifi .card:not(.guide-card):not(.event-card) h3,
html.mode-scifi .card:not(.guide-card):not(.event-card) h4,
html.mode-scifi .card:not(.guide-card):not(.event-card) h5,
html.mode-scifi .card:not(.guide-card):not(.event-card) h6 {
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4), 0 0 15px rgba(100, 200, 255, 0.2);
}

html.mode-scifi .card:not(.guide-card):not(.event-card) p,
html.mode-scifi .card:not(.guide-card):not(.event-card) span,
html.mode-scifi .card:not(.guide-card):not(.event-card) div,
html.mode-scifi .card:not(.guide-card):not(.event-card) li {
    color: #e0e0e0 !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

html.mode-scifi .card:not(.guide-card):not(.event-card) .text-muted {
    color: #b0b0b0 !important;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

html.mode-scifi .card:not(.guide-card):not(.event-card) .card-text {
    color: #e0e0e0 !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

html.mode-scifi .card a:not(.btn) {
    color: #00ff88 !important;
}

html.mode-scifi .card a:not(.btn):hover {
    color: #00ffaa !important;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

html.mode-scifi .bg-white,
html.mode-scifi .bg-light {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

html.mode-scifi .bg-white h1, html.mode-scifi .bg-white h2, html.mode-scifi .bg-white h3,
html.mode-scifi .bg-white h4, html.mode-scifi .bg-white h5, html.mode-scifi .bg-white h6,
html.mode-scifi .bg-light h1, html.mode-scifi .bg-light h2, html.mode-scifi .bg-light h3,
html.mode-scifi .bg-light h4, html.mode-scifi .bg-light h5, html.mode-scifi .bg-light h6 {
    color: #333333 !important;
    text-shadow: 0 0 3px rgba(50, 50, 50, 0.3) !important;
}

html.mode-scifi .form-control,
html.mode-scifi .form-select {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(100, 200, 255, 0.5);
    color: rgba(100, 200, 255, 0.9);
}

html.mode-scifi .form-control:focus,
html.mode-scifi .form-select:focus {
    background: rgba(26, 26, 46, 0.9);
    border-color: rgba(120, 220, 255, 0.8);
    box-shadow: 0 0 20px rgba(120, 220, 255, 0.3);
    color: rgba(120, 220, 255, 1);
}

html.mode-scifi .badge.bg-primary {
    background: var(--primary-gradient) !important;
    color: #fff !important;
}
html.mode-scifi .badge.bg-success {
    background: var(--success-gradient) !important;
    color: #fff !important;
}
html.mode-scifi .badge.bg-warning {
    background: var(--warning-gradient) !important;
    color: #000 !important;
}
html.mode-scifi .badge.bg-danger {
    background: var(--danger-gradient) !important;
    color: #fff !important;
}
html.mode-scifi .badge.bg-info {
    background: var(--info-gradient) !important;
    color: #fff !important;
}
html.mode-scifi .badge.bg-secondary {
    background: var(--dark-gradient) !important;
    color: #fff !important;
}

html.mode-scifi .text-primary { 
    color: #66b3ff !important; 
    text-shadow: 0 0 5px rgba(102, 179, 255, 0.3);
}
html.mode-scifi .text-success { 
    color: #5fdc88 !important; 
    text-shadow: 0 0 5px rgba(95, 220, 136, 0.3);
}
html.mode-scifi .text-warning { 
    color: #ffd700 !important; 
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}
html.mode-scifi .text-danger { 
    color: #ff6b6b !important; 
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}
html.mode-scifi .text-info { 
    color: #4dd4e8 !important; 
    text-shadow: 0 0 5px rgba(77, 212, 232, 0.3);
}
html.mode-scifi .text-secondary { 
    color: #a0a0a0 !important; 
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

html.mode-scifi a {
    color: #00ff88;
    text-decoration: none;
    transition: all 0.3s ease;
}

html.mode-scifi a:hover {
    color: #00ffaa;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

html.mode-scifi .text-muted {
    color: #c0c0c0 !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

html.mode-scifi h1, html.mode-scifi h2, html.mode-scifi h3, 
html.mode-scifi h4, html.mode-scifi h5, html.mode-scifi h6 {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

html.mode-scifi {
    color: #e0e0e0;
}

html.mode-scifi p, html.mode-scifi span, html.mode-scifi div, 
html.mode-scifi li, html.mode-scifi td, html.mode-scifi th {
    color: inherit;
}

/* 科幻模式粒子效果容器 */
.scifi-particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    display: none;
}

html.mode-scifi .scifi-particles-container {
    display: block;
}

.scifi-particle {
    position: absolute;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 10s infinite ease-in-out;
}

.scifi-star {
    position: absolute;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    50% {
        transform: translateY(-100px) translateX(50px) scale(1.2);
    }
}

/* 科幻模式扫描线效果 - 已禁用（用户反馈：2025-11-24）
html.mode-scifi::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(120, 220, 255, 0.8), transparent);
    animation: scanline 4s linear infinite;
    z-index: 999;
    pointer-events: none;
}

@keyframes scanline {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}
*/

/* 科幻模式导航栏光影掠过效果 */
html.mode-scifi .navbar {
    position: relative;
    overflow: visible;
}

html.mode-scifi .navbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(100, 200, 255, 0.1) 20%, 
        rgba(120, 220, 255, 0.25) 50%, 
        rgba(100, 200, 255, 0.1) 80%, 
        transparent 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: all 0.6s ease;
    clip-path: inset(0 0 0 0);
    border-radius: inherit;
}

html.mode-scifi .navbar:hover::after {
    left: 100%;
    opacity: 1;
    animation: navbarSweep 1.5s ease-out;
}

@keyframes navbarSweep {
    0% {
        left: -100%;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* 确保导航栏内容在光影效果之上 */
html.mode-scifi .navbar .container,
html.mode-scifi .navbar .navbar-brand,
html.mode-scifi .navbar .navbar-nav,
html.mode-scifi .navbar .nav-link,
html.mode-scifi .navbar .dropdown-toggle {
    position: relative;
    z-index: 2;
}

/* 聚焦时的额外光影效果 */
html.mode-scifi .navbar .nav-link:focus,
html.mode-scifi .navbar .navbar-brand:focus,
html.mode-scifi .navbar .dropdown-toggle:focus {
    position: relative;
}

html.mode-scifi .navbar .nav-link:focus::before,
html.mode-scifi .navbar .navbar-brand:focus::before,
html.mode-scifi .navbar .dropdown-toggle:focus::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -5px;
    right: -5px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(100, 200, 255, 0.2), 
        rgba(120, 220, 255, 0.35), 
        rgba(100, 200, 255, 0.2));
    border-radius: 4px;
    z-index: -1;
    animation: focusGlow 0.8s ease-out;
}

@keyframes focusGlow {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
}

/* 加载状态样式 - 防止模式切换时的闪烁 */
html.mode-loading {
    visibility: hidden !important;
}

html.mode-loading * {
    transition: none !important;
    animation: none !important;
}

/* Toast提示样式 */
.mode-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === Footer 样式 - 跟随显示模式 === */

/* 深色模式下的 Footer */
html.mode-dark footer,
html.mode-dark .site-footer {
    background-color: #000000 !important;
    color: #e0e0e0 !important;
}

html.mode-dark footer h5,
html.mode-dark footer p,
html.mode-dark footer ul li,
html.mode-dark .site-footer h5,
html.mode-dark .site-footer p,
html.mode-dark .site-footer ul li {
    color: #e0e0e0 !important;
}

html.mode-dark footer a,
html.mode-dark .site-footer a,
html.mode-dark footer .footer-link,
html.mode-dark .site-footer .footer-link {
    color: #66b3ff !important;
}

html.mode-dark footer a:hover,
html.mode-dark .site-footer a:hover,
html.mode-dark footer .footer-link:hover,
html.mode-dark .site-footer .footer-link:hover {
    color: #99ccff !important;
    text-shadow: 0 0 5px rgba(102, 179, 255, 0.5);
}

html.mode-dark footer .footer-divider {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* 科幻模式下的 Footer */
html.mode-scifi footer,
html.mode-scifi .site-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    border-top: 2px solid rgba(0, 255, 136, 0.6);
    box-shadow: 0 -4px 30px rgba(0, 255, 136, 0.2);
    color: #e0e0e0 !important;
}

html.mode-scifi footer h5,
html.mode-scifi footer p,
html.mode-scifi footer ul li,
html.mode-scifi .site-footer h5,
html.mode-scifi .site-footer p,
html.mode-scifi .site-footer ul li {
    color: #e0e0e0 !important;
    text-shadow: 0 0 5px rgba(224, 224, 224, 0.3);
}

html.mode-scifi footer a,
html.mode-scifi .site-footer a,
html.mode-scifi footer .footer-link,
html.mode-scifi .site-footer .footer-link {
    color: #00ff88 !important;
    transition: all 0.3s ease;
}

html.mode-scifi footer a:hover,
html.mode-scifi .site-footer a:hover,
html.mode-scifi footer .footer-link:hover,
html.mode-scifi .site-footer .footer-link:hover {
    color: #00ffaa !important;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
    text-decoration: underline !important;
}

html.mode-scifi footer .footer-divider {
    border-color: rgba(0, 255, 136, 0.3) !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

/* 科幻模式下 Footer 的社交媒体图标 */
html.mode-scifi footer i.fab,
html.mode-scifi .site-footer i.fab {
    transition: all 0.3s ease;
}

html.mode-scifi footer a:hover i.fab,
html.mode-scifi .site-footer a:hover i.fab {
    transform: scale(1.2);
    filter: drop-shadow(0 0 5px rgba(0, 255, 136, 0.8));
}
