/* Big Fire - Gamification Feature */

/* Main Page Container */
.bigfire-page {
    padding: var(--space-lg);
    padding-bottom: 100px;
}

/* Section Titles */
.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

/* Fire Visual Container */
.bigfire-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-xl);
    padding: var(--space-xl);
}

.bigfire-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.3) 0%, transparent 70%);
    animation: bigfire-pulse 2s ease-in-out infinite;
}

.bigfire-flame {
    z-index: 1;
    animation: bigfire-flicker 0.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 20px rgba(255, 107, 107, 0.8));
}

.bigfire-stage-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid;
    margin-top: var(--space-md);
    font-size: 12px;
    font-weight: 600;
}

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

@keyframes bigfire-flicker {
    0% {
        transform: scale(1) rotate(-2deg);
    }
    100% {
        transform: scale(1.05) rotate(2deg);
    }
}

/* Pool and Multiplier Stats */
.bigfire-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

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

.bigfire-stat .stat-value {
    font-size: 24px;
    font-weight: 700;
}

.bigfire-stat .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Risk Indicator */
.bigfire-risk {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.risk-bar {
    height: 8px;
    background: var(--surface-elevated);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.risk-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    background: linear-gradient(90deg, #10B981, #FBBF24, #EF4444);
}

.risk-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
}

/* User Position */
.bigfire-position {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.position-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.position-label {
    font-size: 12px;
    color: var(--text-muted);
}

.position-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 18px;
    font-weight: 600;
}

.position-can-withdraw {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-sm);
}

/* Action Buttons */
.bigfire-actions {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.btn-bigfire-throw {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-bigfire-throw:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
}

.btn-bigfire-throw:active {
    transform: scale(0.98);
}

.btn-bigfire-withdraw {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--surface-color);
    color: var(--success-color);
    border: 1px solid var(--success-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-bigfire-withdraw:hover {
    background: rgba(74, 222, 128, 0.1);
}

.btn-bigfire-withdraw:active {
    transform: scale(0.98);
}

/* Stages Section */
.bigfire-stages-section {
    margin-bottom: var(--space-xl);
}

.stages-row {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
}

.stage-item {
    flex: 1;
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stage-bar {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    transition: all var(--transition-fast);
}

.stage-name {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
}

.stage-mult {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Feed Section */
.bigfire-feed {
    margin-bottom: var(--space-xl);
}

.feed-event {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.feed-event:last-child {
    border-bottom: none;
}

.feed-event-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.feed-event-content {
    flex: 1;
    min-width: 0;
}

.feed-event-text {
    font-size: 13px;
    color: var(--text-color);
}

.feed-event-text strong {
    color: var(--primary-color);
}

.feed-event-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.feed-event-amount {
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.empty-feed {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: var(--space-lg) 0;
}

/* Waiting State */
.bigfire-waiting {
    text-align: center;
    padding: var(--space-xl) 0;
}

.waiting-visual {
    margin-bottom: var(--space-lg);
}

.waiting-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.countdown-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    min-width: 50px;
    text-align: center;
}

.countdown-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.countdown-sep {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* History Section */
.bigfire-history {
    margin-top: var(--space-xl);
}

.history-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.history-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

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

.history-number {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--surface-elevated);
    padding: 4px 10px;
    border-radius: 12px;
    flex-shrink: 0;
}

.history-info {
    flex: 1;
}

.history-stage {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-pool {
    font-size: 14px;
    font-weight: 600;
    color: var(--spark-color);
}

/* Collapsed State */
.bigfire-collapsed {
    text-align: center;
    padding: var(--space-xl) 0;
}

.collapsed-visual {
    margin-bottom: var(--space-lg);
}

.collapsed-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--danger-color);
    margin-bottom: var(--space-sm);
}

.collapsed-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.collapsed-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

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

.collapsed-stat-value {
    font-size: 20px;
    font-weight: 700;
}

.collapsed-stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* Result Box (after collapse) */
.bigfire-result-box {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-md);
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.result-value {
    font-weight: 600;
    font-size: 14px;
}

/* Contribute Modal - Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

/* Contribute Modal - Content */
.modal-content.contribute-modal {
    width: 100%;
    max-width: 500px;
    background: var(--surface-color);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-xl);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-drag-handle {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0 auto var(--space-md);
}

.modal-content.contribute-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.modal-content.contribute-modal .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.modal-content.contribute-modal .modal-close {
    width: 32px;
    height: 32px;
    background: var(--surface-elevated);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Balance Display */
.contribute-balance {
    background: var(--surface-elevated);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.contribute-balance .balance-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contribute-balance .balance-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--spark-color);
}

/* Input Section */
.contribute-input-section {
    margin-bottom: var(--space-lg);
}

.contribute-input-section label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.contribute-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.contribute-input {
    flex: 1;
    padding: 14px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 24px;
    font-weight: 600;
    color: var(--spark-color);
    text-align: center;
    -moz-appearance: textfield;
}

.contribute-input::-webkit-outer-spin-button,
.contribute-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.contribute-input:focus {
    outline: none;
    border-color: var(--spark-color);
}

.max-btn {
    padding: 14px 16px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.max-btn:hover {
    border-color: var(--spark-color);
    color: var(--spark-color);
}

/* Quick Amounts */
.quick-amounts {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.quick-amounts button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-amounts button:hover {
    border-color: var(--spark-color);
    color: var(--text-color);
}

.quick-amounts button.selected {
    border-color: var(--spark-color);
    background: var(--spark-soft);
    color: var(--spark-color);
}

.quick-amounts button:active {
    transform: scale(0.98);
}

/* Warning */
.contribute-warning {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    line-height: 1.4;
}

/* Submit Button */
.btn-contribute-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-contribute-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
}

.btn-contribute-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Hint */
.contribute-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--space-md);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Leaderboard Section */
.bigfire-leaderboard {
    margin-top: var(--space-xl);
}

.leaderboard-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

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

.leaderboard-place {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 11px;
    background: var(--surface-elevated);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.leaderboard-item:nth-child(1) .leaderboard-place {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1e;
}

.leaderboard-item:nth-child(2) .leaderboard-place {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: #1a1a1e;
}

.leaderboard-item:nth-child(3) .leaderboard-place {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    color: white;
}

.leaderboard-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--spark-color);
}
