/* 礼物功能样式 */

/* 礼物总值样式 */
.gift-total-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: bold;
    color: #ff6b35;
}

.fire-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.total-value {
    vertical-align: middle;
}

/* 礼物榜容器 */
.gift-rank {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 5px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    min-height: 70px;
    margin: 5px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 礼物榜项 */
.gift-rank-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

/* 榜一样式 */
.gift-rank-item.rank-1 {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
    padding: 5px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    min-width: 70px;
}

/* 榜二样式 */
.gift-rank-item.rank-2 {
    transform: scale(1);
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.05));
    border: 1px solid rgba(192, 192, 192, 0.3);
    min-width: 70px;
}

/* 榜三样式 */
.gift-rank-item.rank-3 {
    transform: scale(0.95);
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.05));
    border: 1px solid rgba(205, 127, 50, 0.3);
    min-width: 70px;
}

/* 空榜项样式 */
.gift-rank-item.empty {
    opacity: 0.4;
}

/* 排名标识 */
.gift-rank-item::before {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    color: white;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 榜一排名标识 */
.gift-rank-item.rank-1::before {
    content: '1';
    background-color: #ffd700;
    box-shadow: 0 1px 3px rgba(255, 215, 0, 0.5);
}

/* 榜二排名标识 */
.gift-rank-item.rank-2::before {
    content: '2';
    background-color: #c0c0c0;
    box-shadow: 0 1px 3px rgba(192, 192, 192, 0.5);
}

/* 榜三排名标识 */
.gift-rank-item.rank-3::before {
    content: '3';
    background-color: #cd7f32;
    box-shadow: 0 1px 3px rgba(205, 127, 50, 0.5);
}

/* 礼物榜头像 */
.gift-rank-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 3px;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 榜一头像 */
.gift-rank-item.rank-1 .gift-rank-avatar {
    width: 42px;
    height: 42px;
    border: 2px solid #ffd700;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

/* 榜二头像 */
.gift-rank-item.rank-2 .gift-rank-avatar {
    width: 38px;
    height: 38px;
    border: 2px solid #c0c0c0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* 榜三头像 */
.gift-rank-item.rank-3 .gift-rank-avatar {
    width: 34px;
    height: 34px;
    border: 2px solid #cd7f32;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* 礼物榜头像图片 */
.gift-rank-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 礼物榜用户名 */
.gift-rank-name {
    font-size: 11px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
    line-height: 1.2;
}

/* 礼物榜用户名超链接样式 */
.gift-rank-name a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* 礼物榜用户名超链接悬停样式 */
.gift-rank-name a:hover {
    color: #357abd;
    text-decoration: underline;
}

/* 礼物榜等级图标 */
.gift-rank-level {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 等级图标通用样式 */
.level-icon {
    height: 10px;
    object-fit: contain;
}

/* 礼物记录用户名容器 */
.gift-log-name-container {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* 礼物榜礼物值 */
.gift-rank-value {
    font-size: 9px;
    color: #666;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.3;
}

/* 礼物榜容器 */
.gift-rank-container {
    margin-bottom: 10px;
}

/* 礼物记录容器 */
.gift-log-container {
    height: 250px;
    overflow: hidden;
    position: relative;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* 礼物记录列表 */
.gift-log-list {
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
}

/* 礼物列表容器 */
.gift-list-container {
    margin-top: 10px;
}

/* 礼物记录项 */
.gift-log-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 8px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: left;
}

/* 礼物记录项悬停效果 */
.gift-log-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 礼物记录头像 */
.gift-log-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
}

/* 礼物记录头像图片 */
.gift-log-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 礼物记录内容 */
.gift-log-content {
    flex: 1;
    min-width: 0;
}

/* 礼物记录礼物图标 */
.gift-log-gift-icon {
    width: 35px;
    height: 35px;
    margin-left: 10px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

/* 礼物图标图片 */
.gift-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    box-sizing: border-box;
}

/* 礼物记录用户名 */
.gift-log-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 礼物记录用户名超链接样式 */
.gift-log-name a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* 礼物记录用户名超链接悬停样式 */
.gift-log-name a:hover {
    color: #357abd;
    text-decoration: underline;
}

/* 礼物记录提示语 */
.gift-log-tip {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 礼物数量大于2时的颜色 - 橙色 */
.gift-log-tip.count-more-2 {
    color: #ff9800;
}

/* 礼物数量大于10时的颜色 - 紫色 */
.gift-log-tip.count-more-10 {
    color: #9c27b0;
}

/* 礼物数量大于50时的颜色 - 深金色 */
.gift-log-tip.count-more-50 {
    color: #ed0404;
}

/* 礼物记录赠送日期 */
.gift-log-date {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 礼物列表容器 */
.gift-list {
    display: flex;
    flex-direction: row;
    gap: 5px;
    padding: 5px;
    background-color: #fff;
    max-height: 120px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: center;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* 礼物列表容器 - WebKit滚动条样式 */
.gift-list::-webkit-scrollbar {
    height: 6px;
}

.gift-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.gift-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.gift-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 礼物项 */
.gift-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background-color: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    width: 70px;
    flex-shrink: 0;
    box-sizing: border-box;
    border: 2px solid transparent;
}

/* 礼物项悬停效果 */
.gift-item:hover {
    background-color: #e8f4f8;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 礼物项点击效果 */
.gift-item:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* 礼物图标 */
.gift-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 礼物图标图片 */
.gift-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: 100%;
    height: 100%;
}

/* 礼物名称 */
.gift-name {
    font-size: 12px;
    color: #333;
    text-align: center;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
}

/* 礼物价格 */
.gift-price {
    font-size: 11px;
    color: #ff6b6b;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

/* 礼物价格图标 */
.gift-price-icon {
    display: inline-block;
    vertical-align: middle;
}

/* 礼物价格数字 */
.gift-price span {
    display: inline-block;
    vertical-align: middle;
}

/* 折扣价格样式 */
.gift-price .discounted-price {
    color: #ff4444;
    font-weight: bold;
}

/* 折扣图标样式 */
.gift-price .discount-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* 礼物操作区域 */
.gift-operation {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
}

/* 礼物数量区域 */
.gift-quantity {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* 数量标签和输入框行 */
.gift-quantity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

/* 礼物按钮容器 */
.gift-buttons {
    display: flex;
    gap: 8px;
}

/* 用户可用点数显示 */
.user-points {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    width: 100%;
    justify-content: space-between;
}

/* 点数图标 */
.point-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

/* 点数数值 */
.points-value {
    font-weight: bold;
    color: #ff6700;
}

/* 经验提示 */
.exp-tip {
    font-size: 12px;
    color: #5cb85c;
    margin-left: auto;
    text-align: right;
}

/* 数量标签和输入框容器 */
.gift-quantity > span,
.gift-quantity > input {
    margin: 0;
}

/* 数量标签 */
.quantity-label {
    font-size: 13px;
    color: #333;
    font-weight: bold;
}

/* 礼物数量输入框 */
.gift-quantity-input {
    width: 50px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

/* 礼物数量输入框聚焦效果 */
.gift-quantity-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* 礼物按钮基础样式 */
.gift-send-btn, .gift-backpack-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    width: 60px;
    text-align: center;
}

/* 赠送按钮样式 */
.gift-send-btn {
    background-color: #ff6b6b;
    color: white;
}

/* 赠送按钮悬停效果 */
.gift-send-btn:hover {
    background-color: #ff5252;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

/* 赠送按钮点击效果 */
.gift-send-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(255, 107, 107, 0.3);
}

/* 背包按钮样式 */
.gift-backpack-btn {
    background-color: #4a90e2;
    color: white;
}

/* 背包按钮悬停效果 */
.gift-backpack-btn:hover {
    background-color: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

/* 背包按钮点击效果 */
.gift-backpack-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(74, 144, 226, 0.3);
}

/* 发送中按钮样式 */
.gift-send-btn.sending {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.8;
    transform: none;
    box-shadow: none;
}

/* 礼物项选中效果 */
.gift-item.selected {
    background-color: #e8f4f8;
    border: 2px solid #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

/* 礼物赠送成功提示 */
.gift-success-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
}

/* 登录提示样式 */
.login-prompt {
    text-align: center;
    padding: 5px;
    font-size: 12px;
    color: #666;
    background-color: #fff;
    border-radius: 6px;
}

/* 登录提示链接样式 */
.login-prompt a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

/* 登录提示链接悬停效果 */
.login-prompt a:hover {
    color: #357abd;
    text-decoration: underline;
}

/* 未登录状态下的礼物列表 */
.gift-list-container.gift-not-login .gift-item {
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

/* 浮窗通用加载状态 */
.float-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.float-loading .loading-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
}

/* 浮窗通用错误状态 */
.float-error {
    padding: 20px;
    color: #ff4d4f;
    text-align: center;
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 6px;
    margin: 10px;
}

/* 滚动条样式 */
.gift-log-list::-webkit-scrollbar,
.gift-list::-webkit-scrollbar {
    width: 6px;
}

.gift-log-list::-webkit-scrollbar-track,
.gift-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.gift-log-list::-webkit-scrollbar-thumb,
.gift-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.gift-log-list::-webkit-scrollbar-thumb:hover,
.gift-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
@keyframes giftPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 礼物项加载动画 */
.gift-item.loading {
    animation: giftPulse 1s infinite;
}

/* 礼物记录滚动动画 */
@keyframes scrollUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

/* 礼物记录滚动容器 */
.gift-log-list.auto-scroll {
    animation: scrollUp 3s linear infinite;
}

/* 礼物投掷动画样式 */
.gift-throw-item {
    position: absolute;
    z-index: 10000;
    pointer-events: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-throw-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center;
}

/* 礼物记录区域击中特效 */
.gift-log-container.hit {
    animation: hitEffect 0.5s ease;
}

/* 击中特效动画 */
@keyframes hitEffect {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 107, 107, 0);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 107, 107, 0);
    }
}

/* 礼物放大消失动画 */
@keyframes giftExplode {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* 加载更多按钮样式 */
.load-more-btn {
    text-align: center;
    padding: 8px 16px;
    margin: 10px auto;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    width: fit-content;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.load-more-btn:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

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

/* 加载中状态 */
.load-more-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}
