/* 自定义样式 */
/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #2d2d2d;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #777;
}





/* 动画效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 聊天消息动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chat-messages > div {
    animation: fadeIn 0.3s ease-out forwards;
}

/* 直播窗口悬停效果 */
.live-window:hover .play-button {
    transform: scale(1.1);
}

/* 礼物项高亮效果 */
.gift-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

/* 自定义按钮样式 */
.btn-primary {
    background-color: #ec4899;
    transition: background-color 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background-color: #db2777;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 自定义输入框样式 */
.input-custom {
    background-color: #1f2937;
    border: 1px solid #4b5563;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-custom:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.3);
    outline: none;
}

/* 直播信息标签样式 */
.tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* 等级徽章样式 */
.badge {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    margin-right: 4px;
}

/* 消息高亮样式 */
.highlight-message {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.1), rgba(168, 85, 247, 0.1));
    border-left: 3px solid #ec4899;
    padding: 0.5rem;
    border-radius: 0 0.375rem 0.375rem 0;
}

/* 礼物动画样式 */
.gift-animation {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100px;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.2));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    animation: slideIn 0.5s ease-out forwards, fadeOut 2s ease-in 3s forwards;
    z-index: 100;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* 自定义加载动画 */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #ec4899;
    animation: spin 1s ease-in-out infinite;
}

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

/* 粉丝徽章样式 */
.fan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.3rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.25rem;
}

/* 贡献榜样式 */
.contribution-item {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s;
}

.contribution-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* 排行榜前三名样式 */
.rank-1 {
    color: #ffd700;
}

.rank-2 {
    color: #c0c0c0;
}

.rank-3 {
    color: #cd7f32;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .live-section {
        width: 100%;
    }

    .side-section {
        width: 100%;
    }

    .gift-animation {
        width: 250px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.2rem;
    }

    .live-title {
        font-size: 1rem;
    }

    .gift-animation {
        width: 200px;
        height: 70px;
    }
}