/* ═══════════════════════════════════════════════════════════════════
   🎰 STREET CASINO v3.0 - Tab-based Styles
   ═══════════════════════════════════════════════════════════════════ */

.casino-container {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   TAB NAVIGATION
   ═══════════════════════════════════════════════════════════════════ */

.casino-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border);
}

.casino-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dim);
}

.casino-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.casino-tab .tab-icon {
    font-size: 20px;
}

.casino-tab .tab-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════════
   GAME SECTION
   ═══════════════════════════════════════════════════════════════════ */

.game-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   SLOTS MACHINE
   ═══════════════════════════════════════════════════════════════════ */

.slots-machine {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.slots-frame {
    position: relative;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 20px 16px;
    border: 3px solid #ffd700;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.3),
        inset 0 2px 20px rgba(0, 0, 0, 0.5);
}

.slots-reels {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.slot-reel {
    width: 70px;
    height: 80px;
    background: linear-gradient(180deg, #0d0d1a 0%, #1a1a2e 50%, #0d0d1a 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.reel-strip span {
    font-size: 44px;
    display: block;
    transition: transform 0.1s;
}

.slot-reel.spinning .reel-strip span {
    animation: slotBlur 0.1s infinite;
}

.slot-reel.stopping .reel-strip span {
    animation: slotBounce 0.15s ease-out;
}

.slot-reel.winner {
    animation: reelWin 0.3s ease-in-out 3;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

@keyframes slotBlur {
    0%, 100% { transform: translateY(-2px); opacity: 0.7; }
    50% { transform: translateY(2px); opacity: 0.5; }
}

@keyframes slotBounce {
    0% { transform: translateY(-10px); }
    60% { transform: translateY(3px); }
    100% { transform: translateY(0); }
}

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

.slots-line {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 50%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    border-radius: 2px;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════
   PAYTABLE
   ═══════════════════════════════════════════════════════════════════ */

.slots-paytable {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.pt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--bg-input);
    border-radius: 8px;
    font-size: 12px;
}

.pt-mult {
    color: var(--primary);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════════════
   DICE GAME
   ═══════════════════════════════════════════════════════════════════ */

.dice-section {
    padding: 8px 0;
}

.dice-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.dice-cube {
    width: 64px;
    height: 64px;
    background: linear-gradient(145deg, #2a2a3e, #1a1a2e);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dice-cube span {
    font-size: 36px;
}

.dice-cube.rolling {
    animation: diceRoll 0.2s infinite linear;
}

@keyframes diceRoll {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.05); }
    50% { transform: rotate(0deg) scale(1); }
    75% { transform: rotate(-5deg) scale(1.05); }
    100% { transform: rotate(0deg) scale(1); }
}

.dice-plus, .dice-equals {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dim);
}

.dice-total {
    min-width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: white;
    font-family: 'JetBrains Mono', monospace;
}

.dice-total.reveal {
    animation: totalReveal 0.3s ease-out;
}

@keyframes totalReveal {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════
   DICE MODES
   ═══════════════════════════════════════════════════════════════════ */

.dice-modes {
    display: flex;
    gap: 8px;
}

.dice-mode-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.dice-mode-btn.active {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.1);
}

.dice-mode-btn.seven.active {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

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

.dm-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
}

.dm-range {
    font-size: 10px;
    color: var(--text-dim);
}

.dm-mult {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.dice-mode-btn.seven .dm-mult {
    color: #ffd700;
}

/* ═══════════════════════════════════════════════════════════════════
   POTENTIAL WIN
   ═══════════════════════════════════════════════════════════════════ */

.dice-potential {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
}

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

.dp-amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════════════
   BET CONTROLS
   ═══════════════════════════════════════════════════════════════════ */

.bet-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border);
}

.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bet-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.bet-value {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bet-value #current-bet {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.bet-currency {
    font-size: 16px;
}

.bet-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bet-adj-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.bet-adj-btn:active {
    transform: scale(0.95);
    background: var(--primary);
}

.bet-slider {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
}

.bet-slider::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.bet-presets {
    display: flex;
    gap: 6px;
}

.bet-preset {
    flex: 1;
    padding: 10px 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.bet-preset:active {
    transform: scale(0.95);
}

.bet-preset.max {
    background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%);
    color: #000;
    border-color: #ffd700;
}

/* ═══════════════════════════════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════════ */

.game-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: 14px;
    border: none;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.roll-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.game-action-btn:active {
    transform: scale(0.98);
}

.game-action-btn.spinning {
    opacity: 0.7;
    pointer-events: none;
}

.game-action-btn .btn-icon {
    font-size: 22px;
}

/* ═══════════════════════════════════════════════════════════════════
   RESULT OVERLAY
   ═══════════════════════════════════════════════════════════════════ */

.casino-result {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.casino-result.show {
    opacity: 1;
    pointer-events: auto;
}

.cr-content {
    text-align: center;
    animation: resultPop 0.4s ease-out;
}

@keyframes resultPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.cr-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.cr-title {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.casino-result.win .cr-title { color: var(--primary); }
.casino-result.big .cr-title { color: #ffd700; }
.casino-result.jackpot .cr-title { 
    color: #ffd700; 
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: jackpotPulse 0.5s ease-in-out infinite alternate;
}
.casino-result.lose .cr-title { color: var(--text-dim); }

@keyframes jackpotPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.cr-sub {
    font-size: 24px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.casino-result.win .cr-sub,
.casino-result.big .cr-sub,
.casino-result.jackpot .cr-sub { color: var(--primary); }
.casino-result.lose .cr-sub { color: #ef4444; }

.cr-mult {
    margin-top: 12px;
    font-size: 18px;
    color: #ffd700;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════
   PVP DICE STYLES
   ═══════════════════════════════════════════════════════════════════ */

.pvp-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pvp-header {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    border-radius: 16px;
}

.pvp-title {
    font-size: 24px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.pvp-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin-top: 4px;
}

.pvp-info {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 8px;
}

/* Create Challenge */
.pvp-create {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid var(--border);
}

.pvp-create-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.pvp-bet-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.pvp-bet-btn {
    flex: 1;
    padding: 10px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pvp-bet-btn:active,
.pvp-bet-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pvp-create-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pvp-bet-display {
    flex: 1;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
}

.pvp-create-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.pvp-create-btn:disabled {
    opacity: 0.5;
}

/* My Challenge */
.pvp-my-challenge {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(79, 70, 229, 0.1) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pmc-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
}

.pmc-info {
    flex: 1;
    display: flex;
    gap: 12px;
    align-items: center;
}

.pmc-bet {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.pmc-time {
    font-size: 12px;
    color: var(--text-dim);
}

.pmc-cancel {
    padding: 8px 14px;
    background: #ef4444;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Challenges List */
.pvp-challenges {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid var(--border);
}

.pvp-challenges-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.pvp-refresh-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.pvp-empty {
    text-align: center;
    padding: 24px;
}

.pvp-empty-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.pvp-empty-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
}

.pvp-empty-hint {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
    opacity: 0.7;
}

.pvp-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-dim);
}

/* Challenge Item */
.pvp-challenge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: 10px;
    margin-bottom: 8px;
}

.pvp-challenge-item:last-child {
    margin-bottom: 0;
}

.pci-avatar {
    font-size: 24px;
    width: 36px;
    height: 36px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pci-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.pci-avatar-fallback {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pci-info {
    flex: 1;
    min-width: 0;
}

.pci-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pci-level {
    font-size: 11px;
    color: var(--text-dim);
}

.pci-bet {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

.pci-time {
    font-size: 11px;
    color: var(--text-dim);
}

.pci-accept {
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #16a34a 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.pci-accept:disabled {
    opacity: 0.5;
}

/* PvP Result */
.pvp-result .pvp-rolls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 16px 0;
}

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

.pvp-roll-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.pvp-roll-dice {
    font-size: 40px;
}

.pvp-roll-num {
    font-size: 20px;
    font-weight: 900;
    color: white;
}

.pvp-vs {
    font-size: 16px;
    font-weight: 900;
    color: rgba(255,255,255,0.5);
}


/* Clickable elements in PVP challenges */
.pci-avatar[onclick], .pci-info[onclick] {
    cursor: pointer;
}
.pci-avatar[onclick]:hover, .pci-info[onclick]:hover .pci-name {
    color: #22c55e;
}
