/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

/* 实时播报样式 */
.news-ticker {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 8px 0;
    margin-bottom: -10px;
    border-radius: 4px;
    overflow: hidden;
}

.ticker-container {
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding: 0 20px;
}

.ticker-label {
    color: #ff6b6b;
    font-weight: bold;
    margin-right: 10px;
    white-space: nowrap;
}

.ticker-content {
    color: #ff6b6b;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

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

/* 确保滚动效果在不同屏幕尺寸上都能正常工作 */
@media (max-width: 767px) {
    .news-ticker {
        padding: 6px 0;
        margin-bottom: 15px;
    }
    
    .ticker-container {
        padding: 0 10px;
    }
    
    .ticker-label {
        font-size: 14px;
    }
    
    .ticker-content {
        font-size: 14px;
        animation-duration: 15s;
    }
}

/* 页面基础样式 */
body {
    color: #e5e5e5;
    line-height: 1.6;
    background-color: #1a1a2e;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
    background-blend-mode: overlay;
    transition: background-image 0.5s ease-in-out;
}

/* 背景遮罩层 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 30, 50, 0.9);
    z-index: -1;
}

/* 标题样式 */
.cards-container .header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    height: 40px;
    line-height: 40px;
}

.cards-container h2 {
    font-size: 1.8rem;
    color: #e5e5e5;
    margin: 0;
    padding-left: 10px;
    border-left: 4px solid #2ecc71;
    height: 100%;
    line-height: 40px;
}

/* 搜索容器样式 */
.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 搜索输入框样式 */
#activity-search {
    padding: 8px 12px;
    border: 1px solid #3a3a58;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
    font-size: 1rem;
    width: 200px;
    transition: all 0.3s ease;
}

#activity-search:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
    background-color: rgba(255, 255, 255, 0.15);
}

/* 搜索按钮样式 */
.search-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #2ecc71;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background-color: #27ae60;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-button:active {
    transform: translateY(0);
}

/* 容器适配 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* 页面标题栏 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #3a3a58;
    text-align: center;
    position: relative;
}

.page-header h1 {
    font-size: 30px;
    color: lightgreen;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 登录按钮容器 */
#login-btn-container {
    position: absolute;
    top: 20px;
    right: 0;
    z-index: 1000;
}

.login-button {
    padding: 10px 15px;
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* 用户菜单容器 */
.user-menu-container {
    position: absolute;
    top: 20px;
    right: 0;
    z-index: 1000;
    display: inline-block;
}

/* 用户名显示 */
.username-display {
    color: #e5e90c;
    font-size: 18px;
    padding: 12px 20px;
    cursor: pointer;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    border-radius: 5px 5px 0 0;
    display: inline-flex;
    align-items: center;
}

/* 悬浮菜单 */
.user-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0;
    background-color: rgba(5, 14, 34, 0.8);
    border-radius: 0 0 5px 5px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-width: 120px;
    z-index: 1001;
}

/* 鼠标悬停显示菜单 */
.user-menu-container:hover .user-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 用户菜单按钮 */
.user-menu button {
    position: static;
    margin-top: 0;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    background-color: transparent;
    border: none;
    color: #cfdd03;
    cursor: pointer;
}

.user-menu button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 圆形用户标识样式 */
.power-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 10px;
    padding: 2px;
    cursor: pointer;
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #736b5e;
    font-size: 18px;
    transition: all 0.2s ease;
}

/* 用户头像样式 */
.user-avatar {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    border: 1px solid #91d5ff;
    transition: all 0.2s ease;
    object-fit: cover;
}

/* 用户头像悬停效果 */
.user-avatar:hover {
    transform: scale(1.05);
    border-color: #096dd9;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

/* 用户标识悬停效果 */
.power-icon:hover {
    background-color: #1890ff;
    color: white;
    transform: scale(1.05);
    border-color: #096dd9;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

/* 卡片展示区域 */
.cards-container {
    margin-top: 20px;
}

/* 卡片网格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 0 5px;
}

/* 空数据提示和加载提示 */
.empty-tip,
.loading-tip {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #e5e5e5;
    font-size: 1.1rem;
    background-color: #24243e;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 加载提示 */
.loading-tip {
    position: relative;
}

/* 加载动画 */
.loading-tip::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e5e5;
    border-radius: 50%;
    border-top-color: #2ecc71;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 图片容器 */
.card-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 230px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* 图片容器加载状态 */
.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #24243e 25%, #2a2a42 25%, #2a2a42 50%, #24243e 50%, #24243e 75%, #2a2a42 75%, #2a2a42 100%);
    background-size: 40px 40px;
    animation: loading 1s linear infinite;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-image.loading::before {
    opacity: 1;
}

/* 优化图片加载状态 */
.card-image.loading {
    min-height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes loading {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

/* 图片样式 */
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.card-image img.lazy {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.card-image img.loaded {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

/* 图片错误样式 */
.card-image img.error {
    filter: grayscale(50%);
    border: 1px solid #555;
}

.image-error-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 5;
}

/* 活动状态标识样式 */
.activity-status {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 8px;
    border-radius: 0 0 0 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* 未开始状态 */
.activity-status.status-pending {
    background-color: rgba(46, 125, 50, 0.6);
}

/* 进行中状态 */
.activity-status.status-active {
    background-color: rgba(102, 102, 102, 0.5);
}

/* 已结束状态 */
.activity-status.status-ended {
    background-color: rgba(244, 67, 54, 0.7);
}

/* 活动卡片 */
.activity-card {
    background-color: #24243e;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 20px;
    padding-bottom: 80px;
    position: relative;
    transition: transform 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-5px);
}

.activity-title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3a3a58;
}

.activity-title {
    font-size: 1.5rem;
    color: #FFD700;
    margin: 0;
    flex: 1;
}

.activity-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-right: 20px;
    font-weight: bold;
}

.floor-price {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    font-size: 1em;
    transition: color 0.3s ease;
}

.floor-price:hover {
    color: #004499;
}

.official-url {
    color: #FF9800;
    text-decoration: underline;
    cursor: pointer;
    font-size: 1em;
    transition: color 0.3s ease;
}

.official-url:hover {
    color: #E65100;
}

/* 卡片信息 */
.card-info {
    margin: 10px 0;
    color: #FFD700;
}

.card-info span {
    font-weight: 600;
    color: #FFD700;
}

/* 进入活动按钮 */
.enter-activity-btn {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    padding: 10px 0;
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.enter-activity-btn:hover {
    background-color: #2980b9;
}

/* 活动状态弹窗样式 */
.alert-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.alert-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 30px;
    width: 80%;
    max-width: 400px;
    height: auto;
    max-height: 80vh;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    background-color: rgba(5, 14, 34, 0.95);
    box-sizing: border-box;
}

/* 保底价格弹窗样式 */
.alert-modal.alert-modal-large {
    width: 80%;
    max-width: 700px;
    height: auto;
    max-height: 90vh;
    padding: 10px;
}

/* 弹窗内容容器 */
.alert-modal .modal-content {
    text-align: center;
    color: rgb(231, 192, 17);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border: none;
}

/* 弹窗内容容器内部 */
.alert-modal .modal-content .alert-message {
    width: 100%;
    height: auto;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
}

/* WebKit浏览器滚动条隐藏 */
.alert-modal .modal-content .alert-message::-webkit-scrollbar {
    display: none;
}

/* 弹窗标题 */
.alert-modal .popup-remind-title {
    color: lightgreen;
    font-size: 24px;
    margin: 0 0 15px 0;
    font-weight: bold;
}

/* 弹窗提示文本 */
.alert-modal .alert-message {
    color: rgb(231, 192, 17);
    font-size: 16px;
    line-height: 1.4;
    margin: 10px 0 20px 0;
    text-align: center;
}

/* 弹窗按钮容器 */
.alert-modal .btn-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 5px;
    border: none;
}

/* 弹窗关闭按钮 */
.alert-modal .alert-close-btn {
    all: unset;
    display: inline-block;
    margin: 0 auto;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    width: 25%;
    box-sizing: border-box;
    text-align: center;
    font-size: 16px;
    background-color: #007BFF;
    color: white;
    align-self: center;
    transition: background-color 0.2s ease;
}



/* 按钮hover效果 */
.alert-modal .alert-close-btn:hover {
    background-color: #0056b3;
}

/* 全局滚动保护 */
html, body {
    overflow: auto;
    height: auto;
    position: relative;
    top: auto;
}

/* 移动端适配 */
@media (max-width: 767px) {
    
    .alert-modal .alert-close-btn {
        width: 25%;
        font-size: 14px;
        padding: 8px 16px;
    }
    /* 移动端h1标题适配 */
    .page-header h1 {
        font-size: 16px;
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .page-header h1 img {
        width: 80px;
        height: 20px;
        flex-shrink: 0;
    }
    
    /* 移动端适配：进入活动按钮宽度 */
    .enter-activity-btn {
        left: 15px !important;
        right: 15px !important;
        width: calc(100% - 30px) !important;
        box-sizing: border-box !important;
    }
    
    /* 兜底：确保卡片内边距和按钮定位匹配 */
    .activity-card {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-bottom: 70px !important;
    }
    
    /* 移动端适配：标题样式 */
    .cards-container .header-wrapper {
        height: auto;
        line-height: 40px;
        padding: 0 5px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    /* 移动端标题适配 */
    .cards-container h2 {
        font-size: 1.1rem;
        padding-left: 8px;
        height: 40px;
        flex: 1;
        min-width: 120px;
    }
    
    /* 移动端搜索容器适配 */
    .search-container {
        flex: 0 0 auto;
        justify-content: flex-end;
    }
    
    /* 移动端搜索输入框适配 */
    #activity-search {
        width: 130px;
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    /* 移动端搜索按钮适配 */
    .search-button {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
    
    /* 移动端弹窗适配 */
    .alert-modal {
        width: 95%;
        max-width: 320px;
        height: auto;
        max-height: 80vh;
        padding: 15px;
    }
    
    .alert-modal .popup-remind-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .alert-modal .alert-message {
        font-size: 14px;
        height: auto;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    /* 移动端保底价格弹窗适配 */
    .alert-modal.alert-modal-large {
        width: 98%;
        max-width: 400px;
        height: auto;
        max-height: 90vh;
        padding: 15px;
    }
    
    .alert-modal.alert-modal-large .alert-message {
        height: auto;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    /* 移动端表格适配 */
    .alert-modal table {
        font-size: 10px;
        width: 100%;
        table-layout: fixed;
    }
    
    .alert-modal th,
    .alert-modal td {
        padding: 6px 4px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .alert-modal th:first-child,
    .alert-modal td:first-child {
        width: 40%;
    }
    
    .alert-modal th:not(:first-child),
    .alert-modal td:not(:first-child) {
        width: 20%;
        text-align: center;
    }
    
    /* 移动端表格容器 */
    .alert-modal .table-container {
        flex: 1;
        overflow: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .alert-modal .table-container::-webkit-scrollbar {
        display: none;
    }
    
    /* 移动端：登录/注册按钮和个人中心 */
    #login-btn-container,
    .user-menu-container {
        position: fixed;
        top: 1px;
        right: 10px;
        z-index: 1000;
    }
    
    /* 移动端：调整登录按钮大小 */
    .login-button {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    /* 移动端：调整用户名显示大小 */
    .username-display {
        font-size: 15px;
        padding: 6px 12px;
    }
    
    /* 移动端：调整用户头像大小 */
    .user-avatar {
        width: 30px;
        height: 30px;
        margin-left: 8px;
    }
    
    /* 移动端：调整默认头像大小 */
    .power-icon {
        width: 28px;
        height: 28px;
        margin-left: 8px;
        font-size: 14px;
    }
    
    /* 移动端：页面标题 */
    .page-header h1 {
        font-size: 22px;
        color: lightgreen;
        margin-bottom: 0;
        text-align: center;
    }
    
    /* 移动端：调整播报条位置 */
    .news-ticker {
        margin-top: 30px;
        position: relative;
        margin-bottom: -10px;
        z-index: 1;
    }
}

/* 保底价格弹窗表格样式 */
/* 电脑端列头样式 */
@media (min-width: 768px) {
    .table-header {
        font-size: 14px !important;
        padding: 8px !important;
    }
    .price-table {
        font-size: 14px;
    }
    .price-table td {
        padding: 8px;
    }
}

/* 手机端列头样式 */
@media (max-width: 767px) {
    .table-header {
        font-size: 10px !important;
        padding: 4px !important;
    }
}

/* 文字颜色优化 */
.price-info {
    color: #ffffff;
}

.price-info strong {
    color: #ffffff;
}

.price-table .award-name {
    color: #FFF176 !important;
}

.price-table .price-column {
    color: #90caf9 !important;
}

.price-rules {
    color: #e5e5e5;
    line-height: 1.5;
}

.price-rules strong {
    color: #FFD700;
}

.price-rules ul {
    color: #e5e5e5;
}

/* 表格容器 */
.table-container {
    flex: 1;
    overflow: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.table-container::-webkit-scrollbar {
    display: none;
}

/* 保底价格表格样式 */
.price-table {
    width: 100%;
    border-collapse: collapse;
}

.price-table th,
.price-table td {
    border: 1px solid #555;
    padding: 8px;
    text-align: center;
}

.price-table th {
    background-color: rgba(0, 0, 0, 0.3);
    color: white !important;
    font-weight: bold;
}

.price-table .award-name {
    color: #FFF176 !important;
    text-align: center;
}

.price-table .price-column {
    color: #90caf9 !important;
    text-align: center;
}

.price-table th.price-column {
    color: white !important;
}

/* 价格信息样式 */
.price-info {
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* ==================== 分页控件样式 ==================== */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
    gap: 15px;
}

.pagination-info {
    color: #e5e5e5;
    font-size: 14px;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid #3a3a58;
    border-radius: 4px;
    background-color: #24243e;
    color: #e5e5e5;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #2ecc71;
    border-color: #2ecc71;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-number-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #3a3a58;
    border-radius: 4px;
    background-color: #24243e;
    color: #e5e5e5;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-number-btn:hover {
    background-color: #3a3a58;
}

.page-number-btn.active {
    background-color: #2ecc71;
    border-color: #2ecc71;
    color: white;
    font-weight: bold;
}

.page-ellipsis {
    color: #e5e5e5;
    padding: 0 5px;
    font-size: 14px;
}

/* 移动端分页适配 */
@media (max-width: 767px) {
    .pagination-container {
        margin-top: 20px;
        padding: 15px 10px;
    }
    
    .pagination-info {
        font-size: 12px;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .page-number-btn {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 6px;
    }
    
    .pagination-buttons {
        gap: 5px;
    }
    
    .page-numbers {
        gap: 3px;
    }
}
