/* GameAPI 样式文件 */

/* 游戏面板基础样式 - 参考livepanel.css设计 */
.live-panel {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    font-family: Arial, sans-serif;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 12px 20px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

/* 左侧区域 */
.left-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-button {
    background: rgba(74, 107, 223, 0.1);
    color: #4a6bdf;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-button:hover {
    background: rgba(74, 107, 223, 0.2);
    transform: translateX(-2px);
}

.back-button .icon {
    font-size: 1.1rem;
}

.back-button .text {
    font-weight: bold;
}

.game-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4a6bdf;
}

/* 右侧区域 */
.right-section {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* 分数显示 - 参考livepanel.css的醒目设计 */
.score-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-label {
    color: #666;
    font-weight: 500;
}

.score-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ff6b35;
    min-width: 40px;
    text-align: center;
}

.score-animation {
    animation: scorePop 0.5s ease;
}

@keyframes scorePop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.account-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.account-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0e5f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #4a6bdf;
    font-weight: bold;
}

.account-name {
    font-weight: bold;
    color: #444;
}

.hide-button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.hide-button:hover {
    color: #ff6b35;
    background: rgba(0, 0, 0, 0.05);
}

/* 排行榜侧边栏 */
.rankings-sidebar {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.right-section:hover .rankings-sidebar {
    display: block;
}

.rankings-sidebar h3 {
    margin: 0;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9em;
    font-weight: 600;
}

.rankings-list {
    padding: 10px 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.8em;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item .rank {
    font-weight: 600;
    color: #667eea;
    min-width: 20px;
}

.ranking-item .username {
    flex: 1;
    margin: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-item .score {
    font-weight: 600;
    color: #28a745;
}

.no-rankings {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .back-button .text {
        display: none;
    }

    .account-name {
        display: none;
    }

    .right-section {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .live-panel {
        padding: 10px 15px;
    }

    .score-label {
        display: none;
    }

    .account-info {
        display: none;
    }

    .hide-button {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}

/* 反作弊代码样式占位符 */
.gameapi-cheat-prevention {
    /* 反作弊相关样式将在这里定义 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}