/**
 * 礼物打赏插件 - 前台样式
 */

/* 打赏按钮容器 */
.reward-container {
    margin: 30px 0;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.reward-container.reward-position-sidebar {
    margin: 15px 0;
    padding: 15px;
}

/* 打赏按钮 */
.reward-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

.reward-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.reward-btn:active {
    transform: translateY(0);
}

.reward-btn-rounded {
    border-radius: 50px;
}

.reward-btn-square {
    border-radius: 4px;
}

.reward-btn-icon {
    font-size: 20px;
}

.reward-btn-text {
    letter-spacing: 1px;
}

/* 打赏标语 */
.reward-slogan {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* 隐藏内容盒子 */
.reward-hidden-box {
    margin: 20px 0;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    text-align: center;
    color: #fff;
}

.reward-hidden-tip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.reward-icon-lock {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.reward-hidden-tip p {
    font-size: 16px;
    margin: 0;
}

.reward-unlock-btn {
    padding: 10px 25px;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reward-unlock-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* 已解锁内容 */
.reward-unlocked-content {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    border-radius: 4px;
}

/* 打赏弹窗 */
.reward-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.reward-modal.active {
    display: flex;
}

.reward-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: rewardModalSlideIn 0.3s ease;
}

@keyframes rewardModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.reward-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.reward-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.reward-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reward-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.reward-modal-body {
    padding: 20px;
}

/* 礼物选择网格 */
.reward-gifts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.reward-gift-item {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.reward-gift-item:hover {
    border-color: #ff6b6b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.reward-gift-item.selected {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.reward-gift-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.reward-gift-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.reward-gift-amount {
    font-size: 16px;
    font-weight: 600;
    color: #ff6b6b;
}

/* 自定义金额 */
.reward-custom-amount {
    margin-bottom: 20px;
}

.reward-custom-amount label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.reward-custom-amount input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.reward-custom-amount input:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* 留言输入 */
.reward-message-input {
    margin-bottom: 20px;
}

.reward-message-input label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.reward-message-input textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.reward-message-input textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* 游客信息 */
.reward-visitor-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.reward-visitor-info-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.reward-visitor-info input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}

.reward-visitor-info input:last-child {
    margin-bottom: 0;
}

.reward-visitor-info input:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* 支付方式 */
.reward-pay-methods {
    margin-bottom: 20px;
}

.reward-pay-methods-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.reward-pay-method-options {
    display: flex;
    gap: 10px;
}

.reward-pay-method-item {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reward-pay-method-item:hover {
    border-color: #ff6b6b;
}

.reward-pay-method-item.selected {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.reward-pay-method-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.reward-pay-method-name {
    font-size: 12px;
    color: #666;
}

/* 提交按钮 */
.reward-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reward-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.reward-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.reward-submit-btn.loading {
    position: relative;
    color: transparent;
}

.reward-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: rewardSpin 1s linear infinite;
}

@keyframes rewardSpin {
    to {
        transform: rotate(360deg);
    }
}

/* 支付二维码区域 */
.reward-qrcode-section {
    text-align: center;
    padding: 20px;
}

.reward-qrcode {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.reward-qrcode img {
    width: 100%;
    height: 100%;
}

.reward-qrcode-tip {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.reward-qrcode-amount {
    font-size: 24px;
    font-weight: 600;
    color: #ff6b6b;
    margin-bottom: 20px;
}

/* 打赏成功 */
.reward-success-section {
    text-align: center;
    padding: 40px 20px;
}

.reward-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #fff;
}

.reward-success-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.reward-success-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

.reward-success-token {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.reward-success-token-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.reward-success-token-value {
    font-size: 14px;
    color: #333;
    font-family: monospace;
    word-break: break-all;
}

/* 打赏记录列表 */
.reward-records-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.reward-records-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.reward-record-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.reward-record-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.reward-record-info {
    flex: 1;
    min-width: 0;
}

.reward-record-user {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.reward-record-gift {
    font-size: 12px;
    color: #666;
}

.reward-record-amount {
    font-size: 16px;
    font-weight: 600;
    color: #ff6b6b;
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .reward-gifts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reward-modal-content {
        width: 95%;
        border-radius: 12px;
    }
    
    .reward-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 侧边栏样式 */
.reward-sidebar-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    text-align: center;
}

.reward-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.reward-sidebar-desc {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.reward-sidebar-btn {
    display: inline-block;
    padding: 10px 25px;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reward-sidebar-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* 打赏排行榜 */
.reward-ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reward-ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.reward-ranking-item:last-child {
    border-bottom: none;
}

.reward-ranking-rank {
    width: 28px;
    height: 28px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
}

.reward-ranking-item.top3 .reward-ranking-rank {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #fff;
}

.reward-ranking-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.reward-ranking-info {
    flex: 1;
    min-width: 0;
}

.reward-ranking-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.reward-ranking-gift {
    font-size: 12px;
    color: #999;
}

.reward-ranking-amount {
    font-size: 14px;
    font-weight: 600;
    color: #ff6b6b;
    flex-shrink: 0;
}
