/* ===== 吹牛主页专用样式 (Index.css) ===== */
/* 与 xqx.css 风格保持一致的优化样式 */

/* ===== 统计信息卡片 ===== */
.page-index.stats-card {
    margin: 10px;
    padding: 12px 14px;
    background-color: #fbfbfb;
    border: 1px solid #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.page-index .stats-row {
    display: flex;
    gap: 10px;
}

.page-index .stats-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background-color: #fff;
    border: 1px solid #f2f2f2;
    border-radius: 8px;
    line-height: 26px;
}

.page-index .stats-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 2px;
}

.page-index .stats-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    font-family: 'Arial', sans-serif;
}

/* ===== 统计卡片：轮播容器（叠放+淡入淡出） ===== */
.page-index .stats-rotator {
    /* 使用 Grid 叠放两个面板，避免在流/脱流切换导致高度跳变 */
    display: grid;
}

.page-index .stats-rotator .rotator-pane {
    /* 两个面板占据同一网格区域，确保位置完全一致 */
    grid-area: 1 / 1;
    /* 仅通过透明度切换，不改变定位与尺寸，避免抖动 */
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    /* 与 .stats-item 内部布局保持一致，保证垂直对齐 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-index .stats-rotator .rotator-pane.is-active {
    opacity: 1;
    pointer-events: auto;
}

.page-index .stats-unit {
    font-size: 14px;
    color: #999;
}

/* ===== 快捷入口优化 ===== */
.page-index.quick-links-wrapper {
    display: flex;
    gap: 10px;
    padding: 10px;
}

.page-index .quick-link-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background-color: #fff;
    border: 1px solid #ececec;
    border-radius: 8px;
    color: #3d68a8;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.page-index .quick-link-card:hover {
    background-color: #f5f9ff;
    border-color: #1abc9c;
    color: #1abc9c;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.15);
    transform: translateY(-1px);
}

.page-index .quick-link-card .link-icon {
    font-size: 18px;
    vertical-align: middle;
}

.page-index .quick-link-card .link-text {
    vertical-align: middle;
}

/* ===== 挑战按钮优化 ===== */
.page-index.challenge-button {
    padding: 10px;
    text-align: center;
}

.page-index .btn-challenge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 17px;
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

/* 光泽扫过动画 */
.page-index .btn-challenge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
    pointer-events: none;
}

.page-index .btn-challenge svg,
.page-index .btn-challenge img {
    position: relative;
    z-index: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.page-index .btn-challenge img {
    filter: brightness(0) invert(1);
    margin-right: 6px;
}

.page-index .btn-challenge:hover {
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
    box-shadow: 0 6px 16px rgba(26, 188, 156, 0.4);
    transform: translateY(-2px);
    text-decoration: none;
}

.page-index .btn-challenge:hover::after {
    display: none;
}

.page-index .btn-challenge:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.3);
}

/* ===== 挑战列表优化 ===== */
.page-index.challenge-list {
    margin: 10px;
    border: 1px solid #ececec;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* 列表头部 */
.page-index .list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #fcfcfc;
    border-bottom: 1px solid #f2f2f2;
}

.page-index .header-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.page-index .header-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    color: #999;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-index .header-refresh svg {
    display: block;
    width: 18px;
    height: 18px;
    transition: transform 0.5s ease;
}

.page-index .header-refresh:hover {
    color: #1abc9c;
    background-color: rgba(26, 188, 156, 0.1);
    text-decoration: none;
}

.page-index .header-refresh:hover svg {
    transform: rotate(360deg);
}

.page-index .challenge-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8f8f8;
}

.page-index .challenge-item:last-child {
    border-bottom: none;
}

.page-index .challenge-item.line1 {
    background-color: #fff;
}

.page-index .challenge-item.line2 {
    background-color: #fcfcfc;
}

.page-index .challenge-item:hover {
    background-color: #f5f9ff;
    border-left: 3px solid #1abc9c;
    padding-left: 11px;
    cursor: pointer;
}

.page-index .item-index {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background-color: #f0f0f0;
    color: #666;
    font-weight: 500;
    font-size: 13px;
    border-radius: 50%;
    vertical-align: middle;
    transform: translateY(-1px);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.page-index .item-link {
    flex: 1;
    min-width: 0;
    color: #3d68a8;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 17px;
    word-break: break-all;
    line-height: 1.4;
}

.page-index .item-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* 删除按钮样式 */
.page-index .item-delete {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 6px 8px;
    color: #999;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border-radius: 4px;
    min-width: 32px;
}

.page-index .item-delete:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    text-decoration: none;
}

.page-index .item-delete svg {
    display: block;
}

/* hover时序号也变化 */
.page-index .challenge-item:hover .item-index {
    background-color: #1abc9c;
    color: #fff;
}

.page-index .challenge-item:hover .item-link {
    color: #1abc9c;
    text-decoration: none;
}

/* ===== 聊天交流区优化 ===== */
.page-index.chat-section {
    margin: 10px;
    border: 1px solid #ececec;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* 聊天区头部 */
.page-index .chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #fcfcfc;
    border-bottom: 1px solid #f2f2f2;
}

.page-index .chat-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.page-index .chat-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    color: #999;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-index .chat-refresh svg {
    display: block;
    width: 18px;
    height: 18px;
    transition: transform 0.5s ease;
}

.page-index .chat-refresh:hover {
    color: #1abc9c;
    background-color: rgba(26, 188, 156, 0.1);
    text-decoration: none;
}

.page-index .chat-refresh:hover svg {
    transform: rotate(360deg);
}

/* 聊天消息列表 */
.page-index .chat-messages {
    /* 平铺展示，无滚动条 */
}

.page-index .chat-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f8f8f8;
    transition: background-color 0.2s ease;
    word-break: break-word;
    line-height: 28px;
    overflow: hidden; /* 清除浮动 */
}

.page-index .chat-item:last-child {
    border-bottom: none;
}

.page-index .chat-item.line1 {
    background-color: #fff;
}

.page-index .chat-item.line2 {
    background-color: #fcfcfc;
}

.page-index .chat-item:hover {
    background-color: #f5f9ff;
}

.page-index .chat-user {
    color: #3d68a8;
    text-decoration: none;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.page-index .chat-user:hover {
    background-color: rgba(26, 188, 156, 0.1);
    color: #1abc9c;
    text-decoration: none;
}

.page-index .chat-text {
    color: #333;
}

/* 时间浮动在右侧，让文本自动环绕 */
.page-index .chat-time {
    float: right;
    font-size: 12px;
    color: #999;
    line-height: 28px;
    white-space: nowrap;
    margin-left: 5px;
}

/* 聊天输入区 */
.page-index .chat-input-wrapper {
    padding: 12px 14px;
    background: #fcfcfc;
    border-bottom: 1px solid #f2f2f2;
}

.page-index .chat-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
    color: #000;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.page-index .chat-textarea:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 2px rgba(26, 188, 156, 0.1);
}

.page-index .chat-textarea::placeholder {
    color: #999;
}

.page-index .chat-submit-btn {
    padding: 5px 15px;
    background: linear-gradient(#f4f4f4, #ececec);
    border: 1px solid #d4d4d4;
    border-radius: 5px;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
	transform: translateY(-7px);
}

.page-index .chat-submit-btn:hover {
    border-color: #3072b3;
    background: linear-gradient(#599bdc, #3072b3);
    color: #fff;
    text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3);
}

/* 查看更多按钮 */
.page-index .chat-more {
    margin: 10px auto 8px;
    border-radius: 8px;
    overflow: hidden;
    width: 95%;
    border: 1px solid #f2f2f2;
    cursor: pointer;
}

.page-index .chat-more-link {
    display: block;
    width: 100%;
    color: #555;
    text-align: center;
    line-height: 35px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-index .chat-more-link:hover {
    color: #1abc9c;
    text-decoration: none;
}

/* ===== 玩家排行区域优化 ===== */
.page-index.rank-section {
    margin: 10px;
    border: 1px solid #ececec;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* 排行区头部 */
.page-index .rank-header {
    padding: 12px 14px;
    background: #fcfcfc;
    border-bottom: 1px solid #f2f2f2;
}

.page-index .rank-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

/* 排行链接 */
.page-index .rank-links {
    display: flex;
    gap: 0;
}

.page-index .rank-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    text-align: center;
    color: #3d68a8;
    text-decoration: none;
    font-size: 16px;
    border-right: 1px solid #f8f8f8;
    transition: all 0.2s ease;
}

.page-index .rank-link svg {
    flex-shrink: 0;
    vertical-align: middle;
    display: block;
}

.page-index .rank-link span {
    line-height: 18px;
}

.page-index .rank-link:last-child {
    border-right: none;
}

.page-index .rank-link:hover {
    background-color: #f5f9ff;
    color: #1abc9c;
    text-decoration: none;
}

/* ===== 响应式优化 ===== */
@media (max-width: 480px) {
    .page-index .stats-item {
        padding: 6px;
    }

    .page-index .stats-value {
        font-size: 18px;
    }

    .page-index .stats-label,
    .page-index .stats-unit {
        font-size: 13px;
    }

    .page-index.quick-links-wrapper {
        padding: 8px;
        gap: 8px;
    }

    .page-index .quick-link-card {
        padding: 10px 12px;
        font-size: 15px;
    }

    .page-index.challenge-list {
        margin: 8px;
    }

    .page-index .list-header {
        padding: 8px 12px;
    }

    .page-index .header-title {
        font-size: 16px;
    }

    .page-index .header-refresh {
        font-size: 16px;
    }

    .page-index .challenge-item {
        padding: 8px 12px;
    }

    .page-index .challenge-item:hover {
        padding-left: 9px;
    }
}

@media (max-width: 400px) {
    .page-index.stats-card {
        margin: 5px;
        padding: 10px;
    }

    .page-index .stats-row {
        gap: 6px;
    }

    .page-index .stats-item {
        padding: 5px;
        line-height: 22px;
    }

    .page-index .stats-value {
        font-size: 17px;
    }

    .page-index .stats-label,
    .page-index .stats-unit {
        font-size: 12px;
    }

    .page-index.challenge-list,
    .page-index.chat-section {
        margin: 8px;
    }

    .page-index .challenge-item,
    .page-index .chat-item {
        padding: 8px 12px;
        font-size: 16px;
        line-height: 26px;
    }

    .page-index .chat-input-wrapper {
        padding: 10px 12px;
    }

    .page-index .chat-textarea {
        font-size: 14px;
    }

    .page-index.rank-section {
        margin: 8px;
    }

    .page-index .rank-link {
        padding: 10px;
        font-size: 15px;
    }
}

@media (max-width: 320px) {
    .page-index .stats-row {
        gap: 4px;
    }

    .page-index .stats-item {
        padding: 4px;
        line-height: 20px;
    }

    .page-index .stats-value {
        font-size: 16px;
    }

    .page-index .stats-label,
    .page-index .stats-unit {
        font-size: 11px;
    }

    .page-index .link-icon {
        font-size: 14px;
    }
}
