/* Live Score Preview Panel */
.live-preview-panel { /* Extends .glass-panel */
    width: 300px; /* Slightly wider to accommodate new info */
    padding: 20px;
    margin-right: 20px; 
    color: white;
    align-self: flex-start; 
    min-height: 450px; /* Increased min-height */
    height: fit-content;
}

.live-preview-panel:hover { /* Override .glass-panel:hover transform */
    transform: none; 
    background: rgba(255, 255, 255, 0.1); 
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Styles for the moved game info items inside the preview panel - now horizontal */
.game-info-preview {
    display: flex;
    flex-direction: row;
    gap: 20px; /* Increased gap for clarity */
    margin-bottom: 15px; /* Space before preview mode content */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator line */
    padding-bottom: 10px; /* Padding for the separator */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center; /* Center items if wrapping occurs */
}

.info-group-hands-draws {
    display: flex;
    flex-wrap: nowrap; /* Ensure Hands and Draws stay on one line */
    gap: 20px; /* Space between Hands and Draws */
    /* You might want to adjust alignment if needed, e.g., align-items: center; */
    /* Or justify-content: center; if this group needs to be centered within its parent */
}

.preview-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

.preview-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.preview-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.preview-value {
    font-weight: 600;
    color: #00e5ff; /* New accent colour */
}

.preview-description-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 10px;
    text-align: center;
    min-height: 30px; 
    line-height: 1.4;
}

/* Payouts Modal Specific Styles */
#payouts-modal .modal-content { /* Extends .modal-content from components.css */
    max-width: 500px; 
    padding: 30px;
}

.payouts-table-container {
    max-height: 60vh; 
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

#payouts-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

#payouts-table th,
#payouts-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#payouts-table th {
    background-color: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    position: sticky; 
    top: 0;
    backdrop-filter: blur(5px); 
}

#payouts-table tbody tr:last-child td {
    border-bottom: none;
}

/* Remaining Deck Modal Specific Styles */
#remaining-deck-modal .modal-content {
    max-width: 800px; /* Increased width to accommodate larger cards */
    padding: 30px;
}

.remaining-deck-content {
    width: 100%;
    max-width: 800px;
}

.remaining-deck-grid {
    display: flex;
    flex-direction: column;
    gap: 15px; 
    margin-bottom: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px; 
}

.suit-row {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px 15px;
}

.suit-row h4 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.suit-row .card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 5px;
}

.suit-row .card-list em {
    color: rgba(255, 255, 255, 0.6);
}

/* Styles for Live Preview Panel in Scoring Mode */
.preview-item.total { 
    font-weight: 700;
    color: #4facfe;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
    margin-top: 10px;
}

.live-preview-panel.scoring-mode {
    border-color: rgba(241, 196, 15, 0.5);
    background: rgba(241, 196, 15, 0.1);
}

.live-preview-panel.scoring-mode .preview-title {
    color: #f1c40f;
}

.bonus-effects-container {
    margin-top: 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.bonus-effect {
    padding: 2px 0;
    font-size: 0.75rem;
    color: #a29bfe;
}

/* Final Score Overlay styles removed as the overlay is removed */

/* Turbo-Chip Inventory Panel */
.inventory-panel { /* Extends .glass-panel */
    width: 200px; 
    padding: 20px 14px; /* Increased top/bottom padding */
    color: white;
    position: fixed; 
    bottom: 20px;
    left: 20px;
    min-height: 250px; /* Make panel taller */
    height: auto; /* Allow it to grow if content exceeds min-height */
    display: flex;
    flex-direction: column;
}
.inventory-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr)); /* Responsive columns for square chips */
    gap: 10px; /* Slightly larger gap */
    flex-grow: 1; /* Allow slots to take available space */
}
.turbo-chip {
    background: rgba(0,229,255,.15);
    border: 1px solid rgba(0,229,255,.4);
    border-radius: 8px; /* Slightly larger radius */
    padding: 0; /* Remove padding, icon will center */
    font-size: 1.5rem; /* Icon size */
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    width: 45px;  /* Square chip */
    height: 45px; /* Square chip */
    cursor: default; /* Indicate it's not clickable, tooltip will handle info */
}

/* ──────────  LIVE SCORING AREA  ────────── */
.scoring-area{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:15px;
}

.scoring-live-panel{ /* extends .glass-panel implicitly */
    padding:15px 25px;
    width:100%;
    max-width:600px;
    text-align:center;
    color:white;
}

.scoring-live-title{
    font-size:1.4rem;
    margin-bottom:6px;
    letter-spacing:.5px;
}

.scoring-live-values{
    font-size:1.3rem;
    font-weight:700;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
}

.chip-total{color:#4facfe;}
.mult-total{color:#e74c3c;}
.final-total{color:#00e5ff;}
.multiply-symbol,.equals-symbol{opacity:.6;}

.scoring-card-row{
    display:flex;
    justify-content:center;
    gap:12px;
    flex-wrap:wrap;
    min-height:140px;
}

/* simple shake + float-number animations */
@keyframes cardShake{
    0%,100%{transform:translateX(0) rotate(0);}
    25%{transform:translateX(-4px) rotate(-2deg);}
    75%{transform:translateX(4px) rotate(2deg);}
}
.card-shaking{animation:cardShake var(--animation-speed-card-shake, 0.4s) ease;}

.floating-num{
    position:fixed;
    font-size: 2rem;
    font-weight: 900;
    pointer-events:none;
    z-index:3000;
    opacity: 1;
    transform: translate(0, 0);
    transition: transform var(--animation-speed-floating-num, 1.2s) ease-out, opacity var(--animation-speed-floating-num, 1.2s) ease-out;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    text-stroke: 1px rgba(0, 0, 0, 0.5);
}
.floating-num.blue{color:#4facfe;}
.floating-num.red{color:#e74c3c;}
.floating-num.green{
    color:#2ecc71;
    text-shadow: 0 0 10px rgba(46,204,113,.8), 0 0 20px rgba(46,204,113,.4);
}

@keyframes floatToTarget{
    to{opacity:0; transform:translateY(-30px) scale(0.8);}
}

/* inventory flash */
@keyframes invFlash{
    0%,100%{box-shadow:0 0 0 rgba(0,229,255,0);}
    50%{box-shadow:0 0 12px rgba(0,229,255,.8);}
}
.turbo-chip.flash{animation:invFlash var(--animation-speed-turbo-flash, 0.6s) ease 2;}

/* Money bonus flash animation */
@keyframes moneyFlash{
    0%,100%{
        transform: scale(1);
        color: inherit;
        text-shadow: none;
    }
    50%{
        transform: scale(1.3);
        color: #2ecc71;
        text-shadow: 0 0 15px rgba(46,204,113,.9), 0 0 30px rgba(46,204,113,.6);
    }
}
.money-bonus-flash{animation:moneyFlash var(--animation-speed-money-flash, 0.5s) ease 2;}

/* Money icon flash on card */
@keyframes moneyIconFlash{
    0%,100%{
        transform: scale(1);
        filter: brightness(1);
    }
    50%{
        transform: scale(1.4);
        filter: brightness(1.8);
    }
}
.money-icon-flash{animation:moneyIconFlash var(--animation-speed-money-icon-flash, 0.4s) ease 2;}

/* Mystery reveal animation */
@keyframes mysteryReveal{
    0%{
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    50%{
        transform: scale(1.5) rotate(180deg);
        filter: brightness(2);
    }
    100%{
        transform: scale(1) rotate(360deg);
        filter: brightness(1);
    }
}
.mystery-reveal{animation:mysteryReveal var(--animation-speed-mystery-reveal, 0.6s) ease;}

/* Mystery reveal popup */
.mystery-reveal-popup{
    position: fixed;
    pointer-events: none;
    z-index: 3500;
    opacity: 1;
    transition: transform 1s ease-out, opacity 1s ease-out;
}

.mystery-reveal-text{
    font-size: 1.2rem;
    font-weight: 700;
    padding: 5px 12px;
    background: rgba(0,0,0,0.85);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.6);
    white-space: nowrap;
}

/* Mystery type-specific colors */
.mystery-money{color: #2ecc71 !important;}
.mystery-mult{color: #e74c3c !important;}
.mystery-chips{color: #4facfe !important;}

/* Multiplier increase animation */
.mult-total.pulse {
    animation: multiplierPulse 0.5s ease-out;
}

/* Turbo chip activation animation */
.turbo-chip.activate {
    animation: turboActivate 0.8s ease-out;
}
