/**
 * 赌博型玩法专用样式
 */

/* ========== 倍投选择面板 ========== */
.betting-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.betting-panel.active {
    opacity: 1;
    pointer-events: auto;
}

.betting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.betting-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.betting-panel.active .betting-content {
    transform: scale(1);
}

.betting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.betting-header h3 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0;
}

.betting-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.remaining-draws {
    font-size: 16px;
}

.remaining-draws strong {
    font-size: 24px;
    font-weight: bold;
}

/* 倍投选项 */
.betting-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.betting-option {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.betting-option:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.betting-option.selected {
    background: #e8f4fd;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.betting-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.betting-radio {
    width: 24px;
    height: 24px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.betting-option.selected .betting-radio {
    border-color: #667eea;
}

.radio-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.betting-option.selected .radio-circle {
    transform: translate(-50%, -50%) scale(1);
}

.betting-details {
    flex: 1;
}

.betting-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.betting-icon {
    font-size: 20px;
}

.betting-multiplier {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.betting-desc {
    font-size: 14px;
    color: #7f8c8d;
}

/* 梭哈模式特殊样式 */
.betting-allin {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-color: #f39c12;
}

.betting-allin.selected {
    box-shadow: 0 4px 16px rgba(243, 156, 18, 0.4);
}

.betting-warning {
    margin-top: 8px;
    font-size: 12px;
    color: #e74c3c;
    font-weight: 600;
}

.betting-actions {
    display: flex;
    gap: 12px;
}

.betting-actions .btn {
    flex: 1;
    padding: 14px;
    font-size: 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ========== 结果展示 ========== */
.result-area {
    padding: 24px;
    display: none;
}

.result-area.active {
    display: block;
}

/* 未中奖样式 */
.result-lose {
    text-align: center;
}

.result-icon-large {
    font-size: 72px;
    margin-bottom: 16px;
    animation: loseShake 0.5s ease;
}

@keyframes loseShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.result-subtitle {
    font-size: 16px;
    color: #95a5a6;
    margin-bottom: 24px;
}

.result-consolation {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.consolation-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.consolation-text {
    font-size: 16px;
    color: #2c3e50;
    line-height: 1.6;
}

.result-allin-fail {
    background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.allin-fail-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.allin-fail-text {
    font-size: 14px;
}

/* 中奖样式 */
.result-win {
    text-align: center;
}

.result-celebration {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    animation: celebrationPulse 1s ease-in-out infinite;
}

@keyframes celebrationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.result-multiplier {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 12px 20px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(253, 203, 110, 0.3);
}

.multiplier-icon {
    font-size: 20px;
}

.multiplier-text {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.result-rewards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.reward-badge {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.badge-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.badge-rarity {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.badge-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.badge-desc {
    font-size: 14px;
    color: #7f8c8d;
}

.result-extra, .result-special {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.extra-icon, .special-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.extra-text, .special-text {
    font-size: 16px;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

/* ========== 额外次数徽章 ========== */
.extra-count {
    color: #f39c12;
    font-weight: 700;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* ========== 响应式调整 ========== */
@media (max-width: 480px) {
    .betting-panel {
        align-items: flex-end;
        padding-top: env(safe-area-inset-top);
    }

    .betting-content {
        width: 100%;
        max-width: none;
        padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
        border-radius: 18px 18px 0 0;
        max-height: calc(100dvh - 12px - env(safe-area-inset-top));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .betting-header {
        margin-bottom: 14px;
    }

    .betting-header h3 {
        font-size: 18px;
    }

    .betting-header .close-btn {
        font-size: 20px;
        padding: 2px 8px;
    }

    .data-symbols, .data-cards {
        gap: 12px;
    }

    .data-symbol .symbol-icon,
    .card-icon {
        font-size: 36px;
    }

    .scratch-section {
        width: 70px;
        height: 90px;
    }

    .symbol-display, .amount-display, .card-display {
        font-size: 28px;
    }

    .betting-info {
        padding: 10px 12px;
        margin-bottom: 14px;
    }

    .remaining-draws {
        font-size: 14px;
    }

    .remaining-draws strong {
        font-size: 20px;
    }

    .betting-options {
        gap: 10px;
        margin-bottom: 16px;
    }

    .betting-option {
        padding: 12px;
    }

    .betting-radio {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }

    .radio-circle {
        width: 10px;
        height: 10px;
    }

    .betting-icon {
        font-size: 18px;
    }

    .betting-multiplier {
        font-size: 16px;
    }

    .betting-desc {
        font-size: 13px;
    }

    .betting-warning {
        font-size: 11px;
    }

    .betting-actions {
        position: sticky;
        bottom: 0;
        background: white;
        padding-top: 12px;
        margin-top: 8px;
    }

    .betting-actions .btn {
        padding: 12px;
        font-size: 15px;
    }
}
