/* static/css/style.css */
:root {
    --primary-color: #023def;
    --secondary-color: #6f42c1;
    --accent-color: #36b9cc;
    --success-color: #1cc88a;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --gray-color: #858796;
    --gradient-start: #4e73df;
    --gradient-end: #224abe;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf9 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏样式 */
nav {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 10px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: rgba(78, 115, 223, 0.1);
    color: var(--primary-color);
}

.nav-links a.active {
    background: var(--primary-color);
    color: white;
}

/* 用户信息展示样式 */
#userSection {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.user-info .material-icons {
  font-size: 24px;
}

#usernameDisplay {
  font-weight: 500;
  font-size: 0.9rem;
}

.logged-in .login-btn,
.logged-in .register-btn {
  display: none;
}

.btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.login-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.login-btn:hover {
    background: rgba(78, 115, 223, 0.1);
}

.register-btn {
    background: var(--primary-color);
    color: white;
    border: none;
}

.register-btn:hover {
    background: #3a56c4;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* 头部横幅样式 */
header {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 40px;
    text-align: center;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.header-content h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.header-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.primary-btn {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 主要内容区域样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(78, 115, 223, 0.2);
    padding-bottom: 15px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
}

.section-header h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f7 100%);
    border-bottom: 1px solid #e3e6f0;
}

.card-header h3 {
    font-size: 1.3rem;
    margin: 10px 0 5px;
    color: var(--dark-color);
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.important {
    background: rgba(231, 74, 59, 0.1);
    color: var(--danger-color);
}

.badge.notice {
    background: rgba(246, 194, 62, 0.1);
    color: var(--warning-color);
}

.badge.info {
    background: rgba(54, 185, 204, 0.1);
    color: var(--accent-color);
}

.card-body {
    padding: 20px;
    flex-grow: 1;
}

.card-body p {
    color: var(--gray-color);
    line-height: 1.7;
}

.card-footer {
    padding: 15px 20px;
    background: #f8f9fc;
    border-top: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.card-footer span {
    display: flex;
    align-items: center;
}

.card-footer i {
    margin-right: 5px;
}

/* 活动时间线样式 */
.timeline {
    position: relative;
    padding: 30px 0;
    margin-bottom: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: calc(50% - 40px);
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: calc(50% + 40px);
}

.timeline-date {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    position: absolute;
    top: 10px;
    right: -80px;
    width: 120px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(78, 115, 223, 0.3);
}

.timeline-item:nth-child(even) .timeline-date {
    left: -80px;
    right: auto;
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -15px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid white;
}

.timeline-item:nth-child(even) .timeline-content::before {
    right: auto;
    left: -15px;
    border-left: none;
    border-right: 15px solid white;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.timeline-content p {
    color: var(--gray-color);
    margin: 5px 0;
}

/* 相册样式 */
.gallery {
    margin-bottom: 50px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: white;
    padding: 25px 20px 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a2533 100%);
    color: white;
    padding-top: 60px;
    margin-top: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.footer-info h3 i {
    margin-right: 10px;
    color: var(--accent-color);
}

.footer-info p {
    margin-bottom: 20px;
    opacity: 0.8;
    line-height: 1.7;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after, .footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact ul {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--accent-color);
    min-width: 20px;
}

.copyright {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: calc(100% - 80px);
        margin-left: 80px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-date {
        left: -80px !important;
        right: auto !important;
    }

    .timeline-content::before {
        right: auto !important;
        left: -15px !important;
        border-left: none !important;
        border-right: 15px solid white !important;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .mobile-toggle {
        display: block;
    }

    .header-content h1 {
        font-size: 2.2rem;
    }

    .header-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .header-content h1 {
        font-size: 1.8rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}
/* 时钟容器样式 */
.clock-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2));
    border-radius: 10px;
    padding: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.clock {
    font-family: 'Segoe UI';
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    display: inline-block;
}
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
.user-display-name {
    color: var(--primary-color);
    font-weight: 500;
}
.user-display-name {
    color: var(--primary-color);

}
.user-section {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: -10px;
    cursor: pointer;
}

.user-meta {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    width: 200px;
    display: none;
    z-index: 100;
}

.user-info:hover + .user-meta {
    display: block;
}

.user-meta span {
    display: block;
    margin-bottom: 10px;
    color: var(--gray-color);
}

.logout-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c64242;
}
/* 用户信息和操作区域 */
.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.welcome-message {
    margin-left: 5px;
    color: var(--primary-color);
}

.user-actions {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
.btn {
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-btn {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.login-btn:hover {
    background: rgba(78, 115, 223, 0.1);
}

.register-btn {
    background: var(--primary-color);
    border: none;
    color: white;
}

.register-btn:hover {
    background: #3a56c4;
}

.logout-btn {
    background: var(--danger-color);
    color: white;
    border: none;
}

.logout-btn:hover {
    background: #c64242;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }
}