/**
 * 活动大厅专用样式
 */

/* ========== 公告栏 ========== */
.announcement-bar {
    padding: 0;
    overflow: hidden;
    position: relative;
}

.announcement-bar.announcement-clickable {
    cursor: pointer;
    transition: background-color 0.2s;
}

.announcement-bar.announcement-clickable:hover {
    filter: brightness(0.95);
}

.announcement-wrapper {
    display: flex;
    align-items: center;
    padding: 0.7em 15px; /* 使用em单位，自动适应字体大小 */
    gap: 8px;
    min-height: 40px; /* 最小高度 */
}

.announcement-icon {
    flex-shrink: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.announcement-icon-image {
    font-size: inherit; /* 继承公告栏字体大小 */
}

.announcement-icon-image img {
    height: 1.8em; /* 相对于字体大小的1.8倍 */
    width: 1.8em;
    object-fit: cover;
    border-radius: 4px;
}

.announcement-more-icon {
    flex-shrink: 0;
    font-size: 16px;
    opacity: 0.7;
    margin-left: 5px;
}

.announcement-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.announcement-text {
    display: inline-block;
    font-weight: 500;
    line-height: 1.4;
}

/* 隐藏克隆文本（默认不显示） */
.announcement-text-clone {
    display: none;
}

/* 滚动时的样式（由JavaScript动态添加） */
.announcement-scroll.scrolling {
    display: flex;
}

.announcement-scroll.scrolling .announcement-text {
    animation: scroll-left linear infinite;
    padding-right: 100px; /* 两个文本之间的间隔 */
    flex-shrink: 0;
}

.announcement-scroll.scrolling .announcement-text-clone {
    display: inline-block;
    animation: scroll-left linear infinite;
    padding-right: 100px; /* 两个文本之间的间隔 */
    flex-shrink: 0;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 公告弹窗样式 */
.announcement-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.announcement-modal.show {
    display: flex;
}

.announcement-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.announcement-modal-header {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.announcement-modal-icon {
    font-size: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-modal-title {
    flex: 1;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.announcement-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}

.announcement-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.announcement-modal-body {
    padding: 24px;
    color: #333;
    line-height: 1.8;
    font-size: 15px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
    word-wrap: break-word;
    text-align: left;
}

/* ========== 头部搜索 ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px !important;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header h1 {
    font-size: 20px;
    margin: 0;
    line-height: 1;
    transform: translateY(2px);
}

/* 用户/登录按钮 */
.user-btn,
.login-btn {
    padding: 6px 14px;
    background: white;
    border-radius: 18px;
    color: #a6c0ef;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.user-btn:hover,
.login-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.user-btn:active,
.login-btn:active {
    transform: scale(0.98);
}

.search-box {
    background: white;
    padding: 10px 15px;
    margin: 12px 15px 0;
    border-radius: 25px;
    display: flex;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 2px solid #f0f0f0;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
}

.search-box button {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(166, 192, 239, 0.4);
}

/* ========== 分类筛选 ========== */
.categories {
    display: flex;
    gap: 8px;
    padding: 12px 15px 6px;
    overflow-x: auto;
    white-space: nowrap;
}

.categories::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: white;
    border-radius: 18px;
    font-size: 13px;
    text-decoration: none;
    color: #666;
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
    font-weight: 500;
}

.category-item.active {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    border-color: #a6c0ef;
    box-shadow: 0 2px 8px rgba(166, 192, 239, 0.3);
}

.category-item:hover {
    border-color: #a6c0ef;
    transform: translateY(-1px);
}

/* ========== 活动网格 ========== */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 0;
}

.activity-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 2px solid #f5f5f5;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.activity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(166, 192, 239, 0.15);
    border-color: #a6c0ef;
}

.activity-cover {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.activity-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.activity-info {
    padding: 12px 15px;
}

.activity-info.no-image {
    padding-top: 50px;
}

.activity-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.activity-meta {
    font-size: 13px;
    color: #666;
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.activity-footer {
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.creator-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
}

.creator-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.join-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.join-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(166, 192, 239, 0.4);
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    background: white;
    border: 2px solid #f0f0f0;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 14px;
}

.pagination a:hover {
    border-color: #a6c0ef;
    color: #a6c0ef;
    transform: translateY(-1px);
}

.pagination .active {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    border-color: #a6c0ef;
    box-shadow: 0 2px 8px rgba(166, 192, 239, 0.3);
}

.pagination .disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ========== 登录提示弹窗 ========== */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.login-modal.show {
    display: flex;
}

.login-modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 320px;
    width: 90%;
    overflow: hidden;
    animation: loginModalSlideIn 0.3s ease-out;
}

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

.login-modal-header {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.login-modal-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-modal-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.login-modal-body {
    padding: 24px;
    text-align: center;
    color: #666;
    line-height: 1.6;
}

.login-modal-buttons {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
}

.login-modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.login-modal-btn-primary {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
}

.login-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(166, 192, 239, 0.4);
}

.login-modal-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.login-modal-btn-secondary:hover {
    background: #e0e0e0;
}

/* ========== 空状态 ========== */
.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 18px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .activity-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

