/* ============================================
   前台公共样式 - 校园社团活动报名系统
   响应式: PC / Pad / Phone
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #333; background: #f7f9fc; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: #3a7bd5; text-decoration: none; transition: color .2s; }
a:hover { color: #2868c5; }
img { max-width: 100%; border: 0; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 顶部导航 */
.site-header { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; position: relative; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.logo { display: flex; align-items: center; font-size: 20px; font-weight: 700; color: #1f2d3d; min-width: 0; flex-shrink: 0; }
.logo-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: linear-gradient(135deg, #3a7bd5, #00d2ff); color: #fff; border-radius: 8px; margin-right: 10px; font-size: 18px; flex-shrink: 0; }
.logo-img { width: 36px; height: 36px; border-radius: 8px; margin-right: 10px; object-fit: contain; flex-shrink: 0; background: #fff; padding: 3px; }
.logo-text { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; padding: 10px 8px; flex-shrink: 0; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: #333; margin-bottom: 5px; border-radius: 2px; transition: .2s; }
.site-nav ul { display: flex; align-items: center; list-style: none; gap: 6px; }
.site-nav a { display: inline-block; padding: 8px 18px; color: #444; border-radius: 6px; font-size: 15px; transition: .2s; white-space: nowrap; }
.site-nav a:hover, .site-nav a.active { background: #eaf2fb; color: #3a7bd5; }
.nav-signup {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    margin-left: 8px;
    border-radius: 22px;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(58, 123, 213, .28);
    transition: transform .25s, box-shadow .25s;
}
.nav-signup:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(58, 123, 213, .38); }

/* 主体 */
.site-main { min-height: calc(100vh - 150px); }

/* 轮播图 */
.carousel-section { background: #fff; }
.carousel { position: relative; max-width: 1200px; margin: 0 auto; overflow: hidden; aspect-ratio: 1200 / 400; max-height: 400px; }
.carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s; }
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 20px 30px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; text-align: center; }
.carousel-caption h2 { font-size: 28px; font-weight: 500; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); color: #333; font-size: 26px; line-height: 44px; cursor: pointer; transition: .2s; }
.carousel-btn:hover { background: #fff; }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }
.carousel-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.6); cursor: pointer; transition: .2s; }
.carousel-dot.active { background: #fff; width: 24px; border-radius: 5px; }

/* 欢迎区 */
.welcome-section { padding: 60px 0 40px; text-align: center; }
.welcome-title { font-size: 32px; color: #1f2d3d; margin-bottom: 12px; }
.welcome-desc { color: #666; font-size: 16px; margin-bottom: 24px; max-width: 720px; margin-left: auto; margin-right: auto; }

/* 按钮 */
.btn { display: inline-block; padding: 10px 22px; border-radius: 6px; font-size: 15px; cursor: pointer; border: 1px solid transparent; transition: .2s; font-family: inherit; }
.btn-primary { background: linear-gradient(135deg, #3a7bd5, #00d2ff); color: #fff; border: 0; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(58, 123, 213, .3); }
.btn-outline { background: #fff; color: #3a7bd5; border: 1px solid #3a7bd5; }
.btn-outline:hover { background: #3a7bd5; color: #fff; }
.btn-lg { padding: 12px 28px; font-size: 16px; }

/* 区域 */
.section { padding: 50px 0; }
.section-light { background: #fff; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.section-title { font-size: 24px; color: #1f2d3d; position: relative; padding-left: 14px; }
.section-title::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; background: linear-gradient(#3a7bd5, #00d2ff); border-radius: 2px; }
.section-count { color: #999; font-size: 14px; font-weight: normal; margin-left: 12px; }
.section-more { font-size: 14px; color: #3a7bd5; }

/* 海报网格 */
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.poster-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.06); transition: .3s; display: flex; flex-direction: column; }
.poster-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.poster-image { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: linear-gradient(135deg, #3a7bd5, #00d2ff); }
.poster-image img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.poster-card:hover .poster-image img { transform: scale(1.05); }
.poster-status { position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 20px; font-size: 12px; color: #fff; background: rgba(0,0,0,.5); }
.poster-info { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.poster-title { font-size: 16px; color: #1f2d3d; margin-bottom: 10px; font-weight: 600; flex-shrink: 0; }
.poster-meta { color: #888; font-size: 13px; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.poster-summary { color: #666; font-size: 13px; flex: 1; }

/* 状态 badge */
.badge-sm { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 12px; color: #fff; }
.badge-prepare { background: #f39c12; }
.badge-ing { background: #27ae60; }
.badge-soon { background: #3498db; }
.badge-over { background: #95a5a6; }

/* 活动列表 */
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #fff; border-bottom: 1px solid #f0f0f0; transition: .2s; }
.activity-item:first-child { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.activity-item:last-child { border-bottom: 0; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.activity-item:hover { background: #f7f9fc; }
.activity-item-title { flex: 1; color: #333; font-size: 15px; }
.activity-item-time { color: #999; font-size: 13px; }

/* 页面英雄区 (非首页) */
.page-hero { padding: 80px 0 60px; background: linear-gradient(135deg, #3a7bd5, #00d2ff); color: #fff; text-align: center; }
.page-hero-title { font-size: 36px; font-weight: 600; margin-bottom: 10px; }
.page-hero-subtitle { font-size: 16px; opacity: .9; }
.page-hero-title-white { color: #fff; }

/* 搜索表单 */
.search-form { margin-top: 24px; display: inline-flex; gap: 8px; background: rgba(255,255,255,.15); padding: 6px; border-radius: 30px; }
.search-form input { border: 0; outline: 0; background: #fff; padding: 10px 20px; border-radius: 30px; font-size: 14px; width: 280px; color: #333; }
.search-form button { border: 0; background: #fff; color: #3a7bd5; padding: 10px 22px; border-radius: 30px; cursor: pointer; font-weight: 600; font-size: 14px; transition: .2s; }
.search-form button:hover { background: #f1f7ff; }

/* 详情页 */
.detail-wrap { padding-top: 30px; display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.detail-card { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 2px 10px rgba(0,0,0,.05); margin-bottom: 20px; }
.detail-subtitle { font-size: 18px; color: #1f2d3d; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #f0f0f0; }
.detail-content { color: #444; font-size: 15px; }
.detail-content h3 { font-size: 18px; margin: 18px 0 10px; color: #1f2d3d; }
.detail-content p { margin-bottom: 12px; }
.detail-content ul, .detail-content ol { padding-left: 24px; margin-bottom: 12px; }
.detail-content img { max-width: 100%; border-radius: 6px; margin: 12px 0; }

/* 信息列表 */
.info-list { list-style: none; }
.info-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #eee; font-size: 14px; gap: 10px; }
.info-list li:last-child { border-bottom: 0; }
.info-label { color: #888; flex-shrink: 0; }
.info-value { color: #333; text-align: right; }

/* 关于页面 */
.about-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.about-content { color: #444; font-size: 15px; white-space: pre-wrap; line-height: 1.8; }
.about-subtitle { font-size: 16px; color: #1f2d3d; margin-bottom: 12px; margin-top: 20px; padding-left: 10px; border-left: 3px solid #3a7bd5; }
.about-info { background: #f7f9fc; padding: 16px 20px; border-radius: 8px; }
.about-contact { color: #444; }

/* 报名表单 */
.signup-form .form-item { margin-bottom: 16px; }
.signup-form label { display: block; font-size: 14px; color: #555; margin-bottom: 6px; }
.signup-form input, .signup-form textarea, .signup-form select {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: 0; transition: .2s;
    font-family: inherit;
}
.signup-form input:focus, .signup-form textarea:focus, .signup-form select:focus { border-color: #3a7bd5; box-shadow: 0 0 0 3px rgba(58, 123, 213, .15); }

/* 警告 / 提示 */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #e6f7ec; color: #1e7e34; border-left: 4px solid #28a745; }
.alert-error { background: #fdecea; color: #c0392b; border-left: 4px solid #dc3545; }
.alert-info { background: #e7f3ff; color: #1f4e79; border-left: 4px solid #3498db; }

.text-error { color: #c0392b; }
.text-mute { color: #999; font-size: 13px; }
.empty-tip { padding: 60px 20px; text-align: center; color: #999; font-size: 15px; }

/* 页脚 */
.site-footer { background: #1f2d3d; color: #9aa5b1; padding: 30px 0; text-align: center; margin-top: 40px; }
.site-footer .footer-title { color: #fff; font-size: 16px; margin-bottom: 6px; }
.site-footer p { font-size: 13px; margin: 2px 0; }

/* ======= 响应式 ======= */
@media (max-width: 1200px) {
    .container { padding: 0 16px; }
    .header-inner { padding: 0 16px; }
}
@media (max-width: 992px) {
    .detail-wrap { grid-template-columns: 1fr; }
    .about-wrap { grid-template-columns: 1fr; }
    .page-hero-title, .welcome-title { font-size: 26px; }
    .carousel-caption h2 { font-size: 22px; }
    .poster-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 768px) {
    html, body { font-size: 14px; }
    .header-inner { height: 56px; padding: 0 16px; }
    .logo-icon, .logo-img { width: 32px; height: 32px; margin-right: 8px; }
    .logo-icon { font-size: 16px; }
    .logo-text { font-size: 15px; max-width: 160px; }
    .nav-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; }
    .site-nav { position: absolute; top: 56px; left: 0; right: 0; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.1); display: none; border-top: 1px solid #f0f0f0; }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; padding: 8px 0; gap: 0; }
    .site-nav a { display: block; padding: 14px 20px; border-radius: 0; }
    .nav-signup { margin: 10px 20px !important; text-align: center; }
    .carousel { aspect-ratio: 16 / 9; max-height: 280px; }
    .carousel-btn { width: 36px; height: 36px; font-size: 20px; line-height: 36px; }
    .carousel-btn { width: 40px; height: 40px; font-size: 24px; }
    .carousel-btn.carousel-prev { left: 10px; }
    .carousel-btn.carousel-next { right: 10px; }
    .carousel-caption { padding: 40px 14px 16px; }
    .carousel-caption h2 { font-size: 18px; }
    .section { padding: 30px 0; }
    .section-title { font-size: 20px; padding-left: 12px; }
    .section-title::before { height: 18px; }
    .welcome-section { padding: 30px 0 20px; }
    .welcome-title { font-size: 22px; }
    .welcome-desc { font-size: 14px; }
    .page-hero { padding: 50px 0 40px; }
    .page-hero-title { font-size: 24px; }
    .search-form { margin-top: 20px; padding: 4px; gap: 6px; }
    .search-form input { width: 180px; padding: 8px 14px; font-size: 13px; }
    .search-form button { padding: 8px 16px; font-size: 13px; }
    .poster-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .poster-info { padding: 12px; }
    .poster-title { font-size: 14px; }
    .poster-meta { font-size: 12px; gap: 8px; }
    .poster-summary { font-size: 12px; }
    .activity-item { flex-wrap: wrap; padding: 12px 16px; gap: 10px; }
    .activity-item-title { width: 100%; order: 1; font-size: 14px; }
    .activity-item-time { font-size: 12px; }
    .badge-sm { padding: 2px 8px; font-size: 11px; }
    .detail-card { padding: 16px; margin-bottom: 16px; }
    .detail-subtitle { font-size: 16px; }
    .detail-content { font-size: 14px; }
    .info-list li { font-size: 13px; padding: 8px 0; }
    .container { padding: 0 14px; }
    .site-footer { padding: 24px 0; }
    .btn-lg { padding: 10px 22px; font-size: 14px; }
}
@media (max-width: 480px) {
    .logo-text { font-size: 14px; max-width: 120px; }
    .logo-icon, .logo-img { width: 28px; height: 28px; font-size: 14px; margin-right: 6px; }
    .header-inner { height: 52px; padding: 0 12px; }
    .nav-toggle { width: 36px; height: 36px; }
    .site-nav { top: 52px; }
    .poster-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .poster-image { aspect-ratio: 2 / 1.4; }
    .poster-info { padding: 10px; }
    .poster-title { font-size: 13px; }
    .poster-meta { font-size: 11px; }
    .poster-summary { font-size: 11px; line-height: 1.5; }
    .search-form { width: 100%; flex-direction: row; }
    .search-form input { width: 100%; flex: 1; padding: 8px 12px; }
    .search-form button { padding: 8px 14px; font-size: 12px; }
    .welcome-section { padding: 24px 0 16px; }
    .welcome-title { font-size: 20px; }
    .welcome-desc { font-size: 13px; }
    .section { padding: 24px 0; }
    .section-title { font-size: 18px; padding-left: 10px; }
    .section-title::before { height: 16px; }
    .section-more { font-size: 13px; }
    .activity-item { padding: 10px 14px; gap: 8px; }
    .activity-item-title { font-size: 13px; }
    .activity-item-time { font-size: 11px; }
    .carousel { max-height: 220px; }
    .carousel-caption h2 { font-size: 15px; }
    .carousel-dots { bottom: 10px; gap: 6px; }
    .carousel-dot { width: 8px; height: 8px; }
    .carousel-dot.active { width: 18px; border-radius: 4px; }
    .page-hero { padding: 40px 0 32px; }
    .page-hero-title { font-size: 20px; }
    .page-hero-subtitle { font-size: 13px; }
    .detail-card { padding: 14px; }
    .info-list li { font-size: 12px; padding: 6px 0; }
    .detail-subtitle { font-size: 15px; padding-bottom: 10px; margin-bottom: 12px; }
    .container { padding: 0 12px; }
    .btn { padding: 8px 16px; font-size: 13px; }
    .btn-lg { padding: 10px 20px; font-size: 14px; }
    .signup-form input, .signup-form select, .signup-form textarea { padding: 8px 10px; font-size: 13px; }
    .alert { padding: 10px 14px; font-size: 13px; }
}
@media (max-width: 360px) {
    .logo-text { font-size: 13px; max-width: 100px; }
    .logo-icon, .logo-img { width: 26px; height: 26px; font-size: 12px; }
    .welcome-title { font-size: 18px; }
    .section-title { font-size: 16px; }
    .page-hero-title { font-size: 18px; }
    .poster-title { font-size: 12px; }
    .activity-item-title { font-size: 12px; }
}

/* ============== 灵动加载层 ============== */
.page-loader {
    position: fixed; inset: 0;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity .4s, visibility .4s;
}
.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-ring {
    width: 48px; height: 48px;
    border: 3px solid rgba(58, 123, 213, .15);
    border-top-color: #3a7bd5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loader-text {
    margin-top: 14px;
    color: #3a7bd5;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============== 灵动弹窗 ============== */
.smart-modal {
    position: fixed; inset: 0;
    z-index: 9998;
    display: none;
    align-items: center; justify-content: center;
}
.smart-modal.show {
    display: flex;
    animation: modalFadeIn .3s;
}
.smart-modal-mask {
    position: absolute; inset: 0;
    background: rgba(17, 24, 39, .5);
    backdrop-filter: blur(3px);
}
.smart-modal-dialog {
    position: relative; z-index: 1;
    background: #fff;
    border-radius: 18px;
    padding: 32px 36px;
    width: 420px;
    max-width: 92vw;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
    animation: modalSlideUp .4s cubic-bezier(.25, .7, .3, 1.25);
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp {
    from { transform: translateY(30px) scale(.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.smart-modal-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    animation: iconPop .5s cubic-bezier(.25, .7, .3, 1.5);
}
@keyframes iconPop {
    from { transform: scale(0) rotate(-30deg); }
    to { transform: scale(1) rotate(0); }
}
.smart-modal-title {
    font-size: 18px; font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}
.smart-modal-msg {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 24px;
}
.btn-smart-ok {
    background: linear-gradient(135deg, #3a7bd5, #667eea) !important;
    color: #fff !important;
    padding: 10px 36px !important;
    border-radius: 22px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: none !important;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(58, 123, 213, .35);
    transition: all .25s !important;
}
.btn-smart-ok:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(58, 123, 213, .45) !important;
}

/* ============== 列表/卡片渐入动画 ============== */
.anim-in {
    animation: cardIn .5s cubic-bezier(.25, .7, .3, 1.1);
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.poster-card, .activity-item, .welcome-section, .carousel-section, .section {
    opacity: 0;
    transform: translateY(12px);
    animation-fill-mode: forwards;
}
.poster-card.anim-in, .activity-item.anim-in, .welcome-section.anim-in,
.carousel-section.anim-in, .section.anim-in {
    opacity: 1;
    transform: translateY(0);
}

/* ============== 前台导航新样式 ============== */
.site-header {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

/* ============== 标题现代化 ============== */
.section-title {
    font-size: 22px; font-weight: 700;
    color: #1f2937;
    margin-bottom: 18px;
    padding-left: 14px;
    position: relative;
}
.section-title::before {
    content: '';
    position: absolute; left: 0; top: 50%;
    width: 4px; height: 20px;
    background: linear-gradient(180deg, #3a7bd5, #667eea);
    border-radius: 4px;
    transform: translateY(-50%);
}

/* ============== 按钮现代化 ============== */
.btn-primary {
    background: linear-gradient(135deg, #3a7bd5, #667eea);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    box-shadow: 0 4px 14px rgba(58, 123, 213, .3);
    transition: all .25s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(58, 123, 213, .4); }

/* ============== 详情页现代化 ============== */
.activity-detail-content p { margin: 12px 0; line-height: 1.9; color: #374151; }
.activity-detail-content h3 { margin: 20px 0 10px; color: #1f2937; font-size: 18px; }
.activity-detail-content ul, .activity-detail-content ol { margin: 12px 0 12px 20px; }

/* ============== 搜索栏现代化 ============== */
.search-form input {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: all .2s;
}
.search-form input:focus {
    border-color: #3a7bd5;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, .12);
}
