/* 
 * Monopoly Live Statistics - Lightning Storm Style
 * Colori principali: Viola (#6B21A8, #7C3AED) e Giallo (#FACC15, #FDE047)
 * Theme matching Crazy Time Stats
 * MODIFICATO: Box dadi affiancate in 3 colonne
 * AGGIUNTO: Sistema Premium Timeframe
 * AGGIUNTO: Box Premium Upgrade sempre visibile
 * RESPONSIVE: Ottimizzato per mobile verticale e orizzontale
 */

/* Reset e container principale */
.monopoly-stats-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #1e1b4b00 0%, #312e81 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    color: #ffffff;
}

.monopoly-stats-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FACC15 0%, #FDE047 50%, #FACC15 100%);
    animation: shine 3s linear infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Header con Live Indicator */
.monopoly-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.monopoly-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.2);
    border: 2px solid #22C55E;
    color: #22C55E;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.monopoly-pulse {
    width: 10px;
    height: 10px;
    background: #22C55E;
    border-radius: 50%;
    animation: monopoly-pulse 2s infinite;
}

@keyframes monopoly-pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Label Timeframe */
.timeframe-label-wrapper {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.timeframe-label {
    font-size: 14px;
    font-weight: 800;
    color: #FDE047;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ============================================
   TIMEFRAME + BOX PREMIUM UPGRADE
   ============================================ */

/* Container che tiene insieme timeframe selector e premium box */
.timeframe-container {
    display: flex;
    gap: 25px;
    align-items: stretch;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto 30px;
    flex-wrap: wrap;
}

/* Timeframe Selector - DUE RIGHE CON COLORI DIVERSI */
.timeframe-selector {
    flex: 1;
    min-width: 650px;
    max-width: 900px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(91, 33, 182, 0.3);
    border: 2px solid rgba(124, 58, 237, 0.5);
    border-radius: 12px;
    padding: 20px 25px;
    position: relative;
}

/* Wrapper contenente le due righe di bottoni */
.timeframe-rows-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* Prima riga - Timeframe brevi (VIOLA) */
.timeframe-row-short {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* Seconda riga - Timeframe lunghi (GIALLO) */
.timeframe-row-long {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.timeframe-btn {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    min-width: 100px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Stile timeframe BREVI (1h, 6h, 12h, 24h, 7d) - VIOLA */
.timeframe-btn[data-timeframe="1h"],
.timeframe-btn[data-timeframe="6h"],
.timeframe-btn[data-timeframe="12h"],
.timeframe-btn[data-timeframe="24h"],
.timeframe-btn[data-timeframe="7d"] {
    border: 2px solid #7C3AED;
    background: rgba(30, 27, 75, 0.6);
    color: #E9D5FF;
}

.timeframe-btn[data-timeframe="1h"]:hover,
.timeframe-btn[data-timeframe="6h"]:hover,
.timeframe-btn[data-timeframe="12h"]:hover,
.timeframe-btn[data-timeframe="24h"]:hover,
.timeframe-btn[data-timeframe="7d"]:hover {
    background: rgba(91, 33, 182, 0.8);
    border-color: #FDE047;
    color: #FDE047;
    transform: translateY(-2px);
}

.timeframe-btn[data-timeframe="1h"].active,
.timeframe-btn[data-timeframe="6h"].active,
.timeframe-btn[data-timeframe="12h"].active,
.timeframe-btn[data-timeframe="24h"].active,
.timeframe-btn[data-timeframe="7d"].active {
    background: linear-gradient(135deg, #7C3AED 0%, #6B21A8 100%);
    border-color: #7C3AED;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.5);
}

/* Stile timeframe LUNGHI (1m, 3m, 6m, 1y) - GIALLO */
.timeframe-btn[data-timeframe="1m"],
.timeframe-btn[data-timeframe="3m"],
.timeframe-btn[data-timeframe="6m"],
.timeframe-btn[data-timeframe="1y"] {
    border: 2px solid #FDE047;
    background: rgba(253, 224, 71, 0.1);
    color: #FDE047;
}

.timeframe-btn[data-timeframe="1m"]:hover,
.timeframe-btn[data-timeframe="3m"]:hover,
.timeframe-btn[data-timeframe="6m"]:hover,
.timeframe-btn[data-timeframe="1y"]:hover {
    background: rgba(253, 224, 71, 0.2);
    border-color: #FACC15;
    color: #FACC15;
    transform: translateY(-2px);
}

.timeframe-btn[data-timeframe="1m"].active,
.timeframe-btn[data-timeframe="3m"].active,
.timeframe-btn[data-timeframe="6m"].active,
.timeframe-btn[data-timeframe="1y"].active {
    background: linear-gradient(135deg, #FACC15 0%, #FDE047 100%);
    border-color: #FACC15;
    color: #1e1b4b;
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.5);
}

/* BOTTONI LOCKED - SISTEMA PREMIUM */
.timeframe-btn.locked {
    cursor: not-allowed;
    background: rgba(30, 27, 75, 0.4);
    border-color: rgba(124, 58, 237, 0.3);
    color: rgba(233, 213, 255, 0.4);
    opacity: 0.6;
}

.timeframe-btn.locked:hover {
    background: rgba(30, 27, 75, 0.5);
    border-color: rgba(220, 38, 38, 0.5);
    color: rgba(233, 213, 255, 0.5);
    transform: none;
}

.timeframe-btn.locked .lock-icon {
    font-size: 14px;
    margin-left: 4px;
    animation: lockPulse 2s infinite;
}

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

/* ============================================
   BOX PREMIUM UPGRADE - Visibile permanente
   ============================================ */

.premium-upgrade-box {
    flex: 0 0 auto;
    width: 380px;
    min-width: 350px;
    max-width: 400px;
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.3) 0%, rgba(124, 58, 237, 0.2) 100%);
    border: 2px solid rgba(250, 204, 21, 0.5);
    border-radius: 12px;
    padding: 20px 25px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Effetto luccichio sul bordo */
.premium-upgrade-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(250, 204, 21, 0.3) 50%, 
        transparent 70%
    );
    border-radius: 12px;
    animation: shimmer 3s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(0deg);
    }
    100% {
        transform: translateX(100%) rotate(0deg);
    }
}

/* Header del box premium */
.premium-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.premium-box-title {
    font-size: 16px;
    font-weight: 700;
    color: #E9D5FF;
    text-transform: none;
    letter-spacing: 0.3px;
}

.premium-badge-inline {
    display: inline-block;
    background: linear-gradient(135deg, #FACC15 0%, #FDE047 100%);
    color: #1e1b4b;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(250, 204, 21, 0.4);
}

/* Testo descrittivo */
.premium-box-text {
    font-size: 14px;
    color: #C4B5FD;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Bottone upgrade nel box */
.premium-box-btn {
    display: inline-block;
    width: 100%;
    background: linear-gradient(135deg, #FACC15 0%, #FDE047 100%);
    color: #1e1b4b;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
    box-shadow: 
        0 6px 16px rgba(250, 204, 21, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.premium-box-btn:hover {
    background: linear-gradient(135deg, #FDE047 0%, #FACC15 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(250, 204, 21, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.premium-box-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 12px rgba(250, 204, 21, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ============================================
   MODAL PREMIUM - Design professionale
   ============================================ */

.premium-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.premium-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.premium-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 3px solid #FACC15;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(250, 204, 21, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease;
    z-index: 10001;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.premium-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(220, 38, 38, 0.2);
    border: 2px solid rgba(220, 38, 38, 0.5);
    color: #FDE047;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.premium-modal-close:hover {
    background: rgba(220, 38, 38, 0.4);
    border-color: #DC2626;
    transform: rotate(90deg);
}

.premium-modal-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(250, 204, 21, 0.3);
}

.premium-modal-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #FDE047;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 10px rgba(250, 204, 21, 0.5);
    letter-spacing: 0.5px;
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FACC15 0%, #FDE047 100%);
    color: #1e1b4b;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.4);
}

.premium-modal-body {
    text-align: center;
}

.premium-modal-body > p {
    font-size: 16px;
    color: #E9D5FF;
    margin-bottom: 25px;
    line-height: 1.6;
}

.premium-features {
    list-style: none;
    padding: 0;
    margin: 25px 0 30px;
    text-align: left;
}

.premium-features li {
    padding: 12px 0;
    font-size: 15px;
    color: #C4B5FD;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.premium-features li:hover {
    color: #FDE047;
    transform: translateX(5px);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #10B981, #059669);
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.premium-upgrade-btn {
    display: inline-block;
    background: linear-gradient(135deg, #FACC15 0%, #FDE047 100%);
    color: #1e1b4b;
    padding: 15px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 8px 20px rgba(250, 204, 21, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.premium-upgrade-btn:hover {
    background: linear-gradient(135deg, #FDE047 0%, #FACC15 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 30px rgba(250, 204, 21, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.premium-upgrade-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 12px rgba(250, 204, 21, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: #FDE047;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(250, 204, 21, 0.3);
}

.stats-section {
    background: rgba(91, 33, 182, 0.15);
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Base Game Grid */
.base-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(30, 27, 75, 0.6) !important;
    border: 2px solid;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-image: none !important;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Colori settori Monopoly Live */
.stat-card.segment-1 { border-color: #4ecdc4; }
.stat-card.segment-2 { border-color: #ffe66d; }
.stat-card.segment-5 { border-color: #ff6b9d; }
.stat-card.segment-10 { border-color: #c0a4ff; }
.stat-card.segment-2rolls { border-color: #00ff88; }
.stat-card.segment-4rolls { border-color: #ff0080; }
.stat-card.segment-chance { border-color: #ffaa00; }

.stat-icon {
    display: flex;
    width: 120px;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    min-height: 80px;
    background: transparent !important;
    background-color: transparent !important;
}

/* RIMUOVI tutti i background dagli stat-icon */
.stat-icon,
.stat-icon *,
.stat-icon::before,
.stat-icon::after {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Nascondi testo nelle stat-card */
.stat-card.segment-1 .stat-icon,
.stat-card.segment-2 .stat-icon,
.stat-card.segment-5 .stat-icon,
.stat-card.segment-10 .stat-icon,
.stat-card.segment-2rolls .stat-icon,
.stat-card.segment-4rolls .stat-icon,
.stat-card.segment-chance .stat-icon {
    font-size: 0;
    overflow: hidden;
    text-indent: -9999px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #FACC15;
    margin: 8px 0;
    text-shadow: 0 2px 6px rgba(250, 204, 21, 0.4);
}

.stat-label {
    font-size: 14px;
    color: #D1D5DB;
    font-weight: 600;
    margin-top: 5px;
}

/* Segment Colors - SOLO BORDI, NIENTE BACKGROUND */
.segment-1 {
    border-color: #4ecdc4 !important;
}

.segment-2 {
    border-color: #ffe66d !important;
}

.segment-5 {
    border-color: #ff6b9d !important;
}

.segment-10 {
    border-color: #c0a4ff !important;
}

.segment-2rolls {
    border-color: #00ff88 !important;
}

.segment-4rolls {
    border-color: #ff0080 !important;
}

.segment-chance {
    border-color: #ffaa00 !important;
}

/* PNG nelle stat-card - DENTRO lo stat-icon */
.stat-card .stat-icon img {
    width: 100px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon img {
    transform: scale(1.1);
}

/* Section Subtitle */
.section-subtitle {
    text-align: center;
    font-size: 14px;
    color: #C4B5FD;
    margin-top: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Frequency Timeline - STILE CRAZY TIME CON LINEA COLORATA */
.frequency-timeline {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 40px 100px;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(49, 46, 129, 0.4) 100%);
    border-radius: 20px;
    border: 2px solid rgba(124, 58, 237, 0.4);
    max-width: 1200px;
    margin: 40px auto;
    overflow: visible;
}

/* LINEA COLORATA ORIZZONTALE - Gradiente azzurro ghiaccio → bianco → rosso fuoco */
.frequency-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 8px;
    background: linear-gradient(90deg, 
        #00D9FF 0%,      /* Azzurro ghiaccio sinistra */
        #FFFFFF 50%,     /* Bianco centro */
        #FF0000 100%     /* Rosso fuoco destra */
    );
    border-radius: 4px;
    transform: translateY(28px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Label COLD - sinistra sotto la linea */
.frequency-timeline::after {
    content: 'COLD';
    position: absolute;
    left: 2%;
    bottom: 55px;
    font-size: 16px;
    font-weight: 800;
    color: #00D9FF;
    text-shadow: 0 2px 8px rgba(0, 217, 255, 0.8);
    letter-spacing: 2px;
    z-index: 4;
}

/* Nascondo la vecchia legenda "Sopra/Sotto la media" */
.frequency-timeline + .timeline-legend {
    display: none;
}

/* Creo nuova legenda COLD/HOT usando la stats-section */
.stats-section:has(.frequency-timeline) {
    position: relative;
}

.stats-section:has(.frequency-timeline)::after {
    content: 'HOT';
    position: absolute;
    right: calc(2% + 40px);
    bottom: 120px;
    font-size: 16px;
    font-weight: 800;
    color: #FF0000;
    text-shadow: 0 2px 8px rgba(255, 0, 0, 0.8);
    letter-spacing: 2px;
    z-index: 4;
    pointer-events: none;
}

.timeline-segment {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
    transition: all 0.3s ease;
    flex: 1;
    padding: 0 5px;
}

.timeline-segment:hover {
    transform: translateY(-10px);
}

/* Badge percentuale sopra */
.timeline-badge {
    position: absolute;
    top: -60px;
    z-index: 4;
}

.badge-positive,
.badge-negative,
.badge-neutral {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    min-width: 70px;
    text-align: center;
    color: white;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.badge-positive {
    background: linear-gradient(135deg, #10B981, #059669);
}

.badge-negative {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
}

.badge-neutral {
    background: linear-gradient(135deg, #6B7280, #4B5563);
}

/* Cerchio con PNG - Stile Crazy Time */
.timeline-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid;
    position: relative;
    z-index: 3;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(49, 46, 129, 0.95));
}

.timeline-icon:hover {
    transform: scale(1.15);
    box-shadow: 
        0 12px 36px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(0, 0, 0, 0.4);
}

/* Bordi colorati timeline - Match Crazy Time colors */
.timeline-segment.segment-1 .timeline-icon { 
    border-color: #06B6D4;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.4);
}

.timeline-segment.segment-2 .timeline-icon { 
    border-color: #F59E0B;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.timeline-segment.segment-5 .timeline-icon { 
    border-color: #EC4899;
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.4);
}

.timeline-segment.segment-10 .timeline-icon { 
    border-color: #8B5CF6;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.timeline-segment.segment-2rolls .timeline-icon { 
    border-color: #10B981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.timeline-segment.segment-4rolls .timeline-icon { 
    border-color: #DC2626;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
}

.timeline-segment.segment-chance .timeline-icon { 
    border-color: #F59E0B;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

/* PNG nella timeline - dentro timeline-icon come img tag */
.timeline-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* Nascondi il testo nei cerchi timeline */
.timeline-icon .icon-label {
    font-size: 0;
    overflow: hidden;
    text-indent: -9999px;
}

/* Label sotto - NASCOSTA */
.timeline-label {
    display: none;
}

/* Sottotitolo atteso */
.timeline-expected {
    position: absolute;
    bottom: -80px;
    font-size: 11px;
    color: #C4B5FD;
    text-align: center;
    white-space: nowrap;
}

/* Tooltip */
.timeline-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #FACC15;
    border-radius: 10px;
    padding: 15px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 12px;
}

.timeline-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: #FACC15;
}

.timeline-segment:hover .timeline-tooltip {
    opacity: 1;
    visibility: visible;
}

.tooltip-header {
    font-size: 16px;
    font-weight: bold;
    color: #FACC15;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
}

.tooltip-row.deviation {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-row strong.above {
    color: #10B981;
}

.tooltip-row strong.below {
    color: #DC2626;
}

/* Bonus Stats Grid */
.bonus-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.bonus-stat-card {
    background: rgba(30, 27, 75, 0.6);
    border: 2px solid #7C3AED;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.bonus-stat-card:hover {
    transform: translateY(-3px);
    border-color: #FACC15;
    box-shadow: 0 8px 24px rgba(250, 204, 21, 0.2);
}

.bonus-stat-label {
    font-size: 14px;
    font-weight: 700;
    color: #C4B5FD;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bonus-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #FACC15;
    text-shadow: 0 2px 8px rgba(250, 204, 21, 0.4);
}

/* Chance Multipliers Statistics */
.chance-multipliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.chance-mult-card {
    background: rgba(30, 27, 75, 0.6);
    border: 2px solid rgba(255, 165, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.chance-mult-card:hover {
    transform: translateY(-5px);
    border-color: #ffaa00;
    box-shadow: 0 10px 30px rgba(255, 170, 0, 0.3);
}

.chance-mult-card.cash-prize {
    border-color: rgba(16, 185, 129, 0.3);
}

.chance-mult-card.cash-prize:hover {
    border-color: #10B981;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.chance-mult-header {
    margin-bottom: 15px;
}

.mult-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: linear-gradient(135deg, #ffaa00, #ff8800);
    border-radius: 50%;
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 170, 0, 0.4);
}

.mult-icon.cash {
    background: linear-gradient(135deg, #10B981, #059669);
    font-size: 28px;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.chance-mult-label {
    font-size: 14px;
    color: #C4B5FD;
    margin-bottom: 10px;
    font-weight: 600;
}

.chance-mult-percentage {
    font-size: 24px;
    font-weight: bold;
    color: #ffaa00;
    margin-bottom: 10px;
}

.chance-mult-card.cash-prize .chance-mult-percentage {
    color: #10B981;
}

.chance-mult-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.chance-mult-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffaa00, #ff8800);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.cash-prize .chance-mult-bar-fill {
    background: linear-gradient(90deg, #10B981, #059669);
}

/* ============================================
   FIX URGENTE - BOX DADI CHE ESCONO FUORI
   Sostituisci la sezione Dice Statistics nel tuo CSS
   ============================================ */

/* Dice Statistics Section */
.dice-statistics-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.dice-bonus-section {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.05), rgba(253, 224, 71, 0.05));
    border-radius: 20px;
    padding: 40px;
    border: 2px solid rgba(250, 204, 21, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    /* FIX: Previeni overflow */
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.dice-bonus-title {
    font-size: 32px;
    font-weight: bold;
    color: #FACC15;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(250, 204, 21, 0.5);
}

.dice-bonus-subtitle {
    text-align: center;
    color: #C4B5FD;
    margin-bottom: 40px;
    font-size: 16px;
}

/* FIX PRINCIPALE: Box dadi affiancate con overflow prevention */
.dice-levels-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    /* FIX CRITICO: Limita la larghezza totale */
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.dice-level-box {
    background: rgba(30, 27, 75, 0.3);
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    /* FIX: Previeni overflow */
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0; /* IMPORTANTE: Permette al flexbox di shrinkare */
}

.dice-level-header {
    font-size: 20px;
    font-weight: bold;
    color: #FACC15;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(250, 204, 21, 0.3);
    text-align: center;
    /* FIX: Previeni overflow testo */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.dice-level-sub {
    font-size: 14px;
    color: #C4B5FD;
    margin-bottom: 20px;
    text-align: center;
    /* FIX: Previeni overflow testo */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* FIX CRITICO: Lista dadi SEMPRE 1 colonna dentro ogni box */
.dice-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.dice-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(91, 33, 182, 0.1));
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.3);
    transition: all 0.3s ease;
    /* FIX: Previeni overflow */
    width: 100%;
    box-sizing: border-box;
    min-width: 0; /* IMPORTANTE */
}

.dice-item:hover {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(253, 224, 71, 0.1));
    border-color: rgba(250, 204, 21, 0.4);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(250, 204, 21, 0.2);
}

.dice-pair {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.dice-mini {
    width: 45px;
    height: 45px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    flex-shrink: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.dice-mini[data-value="1"] {
    background: url('../images/dice/dice-1.png') center/contain no-repeat #ffffff;
}

.dice-mini[data-value="2"] {
    background: url('../images/dice/dice-2.png') center/contain no-repeat #ffffff;
}

.dice-mini[data-value="3"] {
    background: url('../images/dice/dice-3.png') center/contain no-repeat #ffffff;
}

.dice-mini[data-value="4"] {
    background: url('../images/dice/dice-4.png') center/contain no-repeat #ffffff;
}

.dice-mini[data-value="5"] {
    background: url('../images/dice/dice-5.png') center/contain no-repeat #ffffff;
}

.dice-mini[data-value="6"] {
    background: url('../images/dice/dice-6.png') center/contain no-repeat #ffffff;
}

.dice-info {
    flex: 1;
    min-width: 0; /* IMPORTANTE: Previene overflow */
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden; /* FIX: Nasconde overflow */
}

.dice-label {
    font-size: 14px;
    color: #ffffff;
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    /* FIX: Previeni overflow testo */
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.dice-mini-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dice-mini-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FACC15, #FDE047);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

.no-data-small {
    text-align: center;
    color: #C4B5FD;
    padding: 40px 20px;
    font-size: 16px;
    font-style: italic;
    grid-column: 1 / -1;
}

/* ============================================
   RESPONSIVE - DICE STATISTICS
   ============================================ */

/* Desktop Large (1200px - 1440px) */
@media (max-width: 1440px) {
    .dice-levels-container {
        gap: 18px;
    }
    
    .dice-level-box {
        padding: 22px;
    }
}

/* Desktop Standard (1024px - 1200px) */
@media (max-width: 1200px) {
    .dice-levels-container {
        gap: 16px;
    }
    
    .dice-level-box {
        padding: 20px;
    }
    
    .dice-level-header {
        font-size: 18px;
    }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    /* 2 COLONNE su tablet */
    .dice-levels-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .dice-level-box {
        padding: 22px;
    }
    
    .dice-level-header {
        font-size: 19px;
    }
}

/* Tablet Landscape (768px - 1024px orizzontale) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    /* Mantieni 3 colonne su tablet landscape */
    .dice-levels-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .dice-level-box {
        padding: 18px 12px;
    }
    
    .dice-level-header {
        font-size: 17px;
        margin-bottom: 6px;
        padding-bottom: 8px;
    }
    
    .dice-level-sub {
        font-size: 12px;
        margin-bottom: 16px;
    }
    
    .dice-list {
        gap: 12px;
    }
    
    .dice-item {
        padding: 12px;
        gap: 10px;
    }
    
    .dice-mini {
        width: 40px;
        height: 40px;
    }
    
    .dice-label {
        font-size: 12px;
    }
}

/* Mobile Landscape (max-width: 768px orizzontale) */
@media (max-width: 768px) and (orientation: landscape) {
    .dice-bonus-section {
        padding: 20px 15px;
    }
    
    .dice-bonus-title {
        font-size: 22px;
    }
    
    /* 1 COLONNA COMPLETA anche su mobile landscape - COME VERTICALE */
    .dice-levels-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
        max-width: 100%;
    }
    
    .dice-level-box {
        padding: 18px 15px;
        max-width: 100%;
        width: 100%;
    }
    
    .dice-level-header {
        font-size: 17px;
        margin-bottom: 6px;
    }
    
    .dice-level-sub {
        font-size: 12px;
        margin-bottom: 16px;
    }
    
    /* Lista dadi - sempre 1 colonna */
    .dice-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .dice-item {
        padding: 13px;
        gap: 11px;
        width: 100%;
        max-width: 100%;
    }
    
    .dice-mini {
        width: 42px;
        height: 42px;
    }
    
    .dice-label {
        font-size: 12px;
    }
    
    .dice-mini-bar {
        height: 7px;
    }
    
    /* Previeni overflow orizzontale */
    .monopoly-stats-wrapper,
    .dice-statistics-wrapper,
    .dice-bonus-section,
    .dice-levels-container,
    .dice-level-box {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
}

/* Mobile Piccolo Landscape (max-width: 480px orizzontale) */
@media (max-width: 480px) and (orientation: landscape) {
    .dice-bonus-section {
        padding: 18px 12px;
    }
    
    /* 1 COLONNA COMPATTA anche su mobile piccolo landscape */
    .dice-levels-container {
        grid-template-columns: 1fr !important;
        gap: 18px;
        max-width: 100%;
    }
    
    .dice-level-box {
        padding: 16px 12px;
        max-width: 100%;
        width: 100%;
    }
    
    .dice-level-header {
        font-size: 16px;
        margin-bottom: 5px;
        padding-bottom: 7px;
    }
    
    .dice-level-sub {
        font-size: 11px;
        margin-bottom: 14px;
    }
    
    .dice-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .dice-item {
        padding: 11px;
        gap: 9px;
        width: 100%;
    }
    
    .dice-pair {
        gap: 5px;
    }
    
    .dice-mini {
        width: 40px;
        height: 40px;
    }
    
    .dice-label {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .dice-mini-bar {
        height: 6px;
    }
}
}

/* Mobile Extra Piccolo (<375px) */
@media (max-width: 375px) {
    .dice-bonus-section {
        padding: 18px 10px;
    }
    
    .dice-bonus-title {
        font-size: 18px;
    }
    
    .dice-levels-container {
        gap: 18px;
    }
    
    .dice-level-box {
        padding: 16px 10px;
    }
    
    .dice-level-header {
        font-size: 16px;
    }
    
    .dice-level-sub {
        font-size: 11px;
    }
    
    .dice-item {
        padding: 11px;
        gap: 9px;
    }
    
    .dice-mini {
        width: 40px;
        height: 40px;
    }
    
    .dice-label {
        font-size: 11px;
    }
}

/* ============================================
   FIX OVERFLOW - Regole globali critiche
   ============================================ */

@media (max-width: 1024px) {
    /* Previeni overflow testi */
    .dice-level-header,
    .dice-level-sub,
    .dice-label {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Previeni overflow contenitori */
    .dice-item {
        min-width: 0;
    }
    
    .dice-info {
        overflow: hidden;
    }
}

/* Performance - GPU Acceleration */
.dice-item,
.dice-mini-bar-fill {
    will-change: transform;
    transform: translateZ(0);
}

/* Accessibilità - Touch Target minimo 44x44px */
@media (max-width: 768px) {
    .dice-item {
        min-height: 44px;
    }
}

/* Delays Grid */
.delays-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.delay-card {
    background: rgba(30, 27, 75, 0.6);
    border: 2px solid;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.delay-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.delay-icon {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.delay-value {
    font-size: 48px;
    font-weight: bold;
    color: #FACC15;
    margin-bottom: 5px;
    text-shadow: 0 2px 8px rgba(250, 204, 21, 0.4);
}

.delay-label {
    font-size: 12px;
    color: #C4B5FD;
    font-weight: 600;
}

.delay-count {
    font-size: 14px;
    margin-top: 10px;
    color: #10B981;
    font-weight: 700;
}

/* Rolls Stats */
.rolls-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.rolls-stat-card {
    background: rgba(30, 27, 75, 0.6);
    border: 2px solid #7C3AED;
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
}

.rolls-stat-card:hover {
    transform: translateY(-3px);
    border-color: #FACC15;
    box-shadow: 0 8px 24px rgba(250, 204, 21, 0.2);
}

.rolls-stat-card h3 {
    color: #FACC15;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(250, 204, 21, 0.3);
}

.rolls-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(124, 58, 237, 0.3);
    color: #E9D5FF;
}

.top-properties {
    margin-top: 20px;
}

.property-item {
    background: rgba(124, 58, 237, 0.2);
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    font-size: 14px;
    color: #FDE047;
    font-weight: 600;
}

/* Chance Stats */
.chance-stats {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 170, 0, 0.1);
    border: 2px solid rgba(255, 170, 0, 0.3);
    border-radius: 15px;
    padding: 30px;
}

.chance-notice {
    background: rgba(220, 38, 38, 0.2);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #DC2626;
    margin-bottom: 20px;
    text-align: center;
    color: #FDE047;
}

.chance-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
    color: #E9D5FF;
}

/* History Controls */
.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 15px 20px;
    background: rgba(30, 27, 75, 0.6);
    border-radius: 12px;
    border: 2px solid rgba(124, 58, 237, 0.3);
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.per-page-selector label {
    font-weight: bold;
    color: #FDE047;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* SELECT DROPDOWN - Stile Lightning Storm */
.per-page-selector select,
#history-per-page {
    background: rgba(30, 27, 75, 0.8);
    border: 2px solid #7C3AED;
    color: #FACC15;
    padding: 8px 35px 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FACC15' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.per-page-selector select:hover,
#history-per-page:hover {
    background-color: rgba(91, 33, 182, 0.8);
    border-color: #FACC15;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.per-page-selector select:focus,
#history-per-page:focus {
    outline: none;
    border-color: #FACC15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.3);
}

.per-page-selector select option,
#history-per-page option {
    background: #1e1b4b;
    color: #FACC15;
    padding: 10px;
    font-weight: 600;
}

.per-page-selector select option:hover,
#history-per-page option:hover {
    background: rgba(124, 58, 237, 0.3);
    color: #FDE047;
}

.per-page-selector select option:checked,
#history-per-page option:checked {
    background: rgba(250, 204, 21, 0.3);
    color: #ffffff;
    font-weight: bold;
}

.pagination-info {
    font-size: 14px;
    color: #C4B5FD;
    font-weight: 600;
}

.pagination-info span {
    font-weight: bold;
    color: #FACC15;
}

/* Paginazione */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination-btn {
    background: rgba(124, 58, 237, 0.4);
    border: 2px solid #7C3AED;
    color: #FDE047;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    min-width: 50px;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(250, 204, 21, 0.3);
    border-color: #FACC15;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
}

.pagination-btn:disabled {
    background: rgba(75, 85, 99, 0.3);
    border-color: #4B5563;
    color: #6B7280;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-numbers {
    display: flex;
    gap: 6px;
}

.page-number {
    background: rgba(30, 27, 75, 0.6);
    border: 2px solid #7C3AED;
    color: #E9D5FF;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 42px;
    text-align: center;
}

.page-number:hover {
    background: rgba(124, 58, 237, 0.3);
    border-color: #FDE047;
    color: #FDE047;
}

.page-number.active {
    background: linear-gradient(135deg, #FACC15 0%, #FDE047 100%);
    border-color: #FACC15;
    color: #1e1b4b;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.4);
}

.page-ellipsis {
    padding: 8px 6px;
    color: #C4B5FD;
    font-size: 14px;
    user-select: none;
}

/* History Table */
.history-table-wrapper {
    overflow-x: auto;
    max-width: 1200px;
    margin: 0 auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(30, 27, 75, 0.6);
    border-radius: 15px;
    overflow: hidden;
}

.history-table thead {
    background: rgba(30, 27, 75, 0.8);
}

.history-table th {
    padding: 15px;
    text-align: center;
    font-weight: 800;
    color: #FDE047;
    border-bottom: 2px solid #FACC15;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.3);
    color: #E9D5FF;
    text-align: center;
}

.history-table tr {
    transition: all 0.2s ease;
}

.history-table tbody tr:hover {
    background: rgba(124, 58, 237, 0.2);
    box-shadow: 0 2px 8px rgba(250, 204, 21, 0.1);
}

.result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-weight: bold;
    border: none !important;
    background-size: 85% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    font-size: 0 !important;
    overflow: hidden !important;
    text-indent: -9999px !important;
    color: transparent !important;
    line-height: 0 !important;
}

/* Result badge segments - SOLO PNG */
.result-badge.segment-1 {
    background: url('../images/segments/1.png') center/85% no-repeat !important;
}

.result-badge.segment-2 {
    background: url('../images/segments/2.png') center/85% no-repeat !important;
}

.result-badge.segment-5 {
    background: url('../images/segments/5.png') center/85% no-repeat !important;
}

.result-badge.segment-10 {
    background: url('../images/segments/10.png') center/85% no-repeat !important;
}

.result-badge.segment-2rolls {
    background: url('../images/segments/2rolls.png') center/85% no-repeat !important;
}

.result-badge.segment-4rolls {
    background: url('../images/segments/4rolls.png') center/85% no-repeat !important;
}

.result-badge.segment-chance {
    background: url('../images/segments/chance.png') center/85% no-repeat !important;
}

.result-badges {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.result-badge.mini {
    font-size: 11px;
    padding: 4px 10px;
    width: auto;
    height: auto;
    border-radius: 20px;
    border: 2px solid;
    text-indent: 0;
    overflow: visible;
}

.cash-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 5px;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.no-data {
    text-align: center;
    padding: 30px !important;
    color: #C4B5FD;
    font-style: italic;
}

/* Last Update Info */
.last-update {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: rgba(30, 27, 75, 0.6);
    border-radius: 15px;
    max-width: 600px;
    margin: 40px auto 0;
    border: 2px solid rgba(124, 58, 237, 0.3);
}

.last-update p {
    margin: 10px 0;
    color: #C4B5FD;
    font-weight: 600;
}

.last-update strong {
    color: #FACC15;
}

/* Loader */
.monopoly-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 27, 75, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.monopoly-loader .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(250, 204, 21, 0.2);
    border-top-color: #FACC15;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.monopoly-loader p {
    color: #FDE047;
    margin-top: 20px;
    font-size: 18px;
    font-weight: 600;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.5;
        transform: scale(1.05);
    }
}

.stat-card:hover .stat-icon {
    animation: pulse 1s infinite;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    /* Box premium + Timeframe - Stack verticale */
    .timeframe-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .timeframe-selector {
        min-width: unset;
        max-width: 100%;
        width: 100%;
    }
    
    .premium-upgrade-box {
        width: 100%;
        max-width: 100%;
        min-width: unset;
    }
    
    /* Box dadi affiancate - 2 colonne su tablet */
    .dice-levels-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* TABLET ORIZZONTALE (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .monopoly-stats-wrapper {
        padding: 15px;
    }
    
    .frequency-timeline {
        padding: 70px 30px 90px;
    }
    
    .timeline-icon {
        width: 85px;
        height: 85px;
    }
    
    .timeline-icon img {
        width: 48px;
        height: 48px;
    }
    
    .dice-levels-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .dice-level-box {
        padding: 20px;
    }
}

/* MOBILE VERTICALE E ORIZZONTALE (max-width: 768px) */
@media (max-width: 768px) {
    .monopoly-stats-wrapper {
        padding: 15px;
    }
    
    .base-game-grid,
    .delays-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* FIX Timeline Frequenze - Mobile SPACING MASSIMO */
    .frequency-timeline {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 65px 15px;
        padding: 60px 15px 35px;
        justify-items: center;
        align-items: start;
    }
    
    .frequency-timeline::before {
        display: none;
    }
    
    .frequency-timeline::after,
    .stats-section:has(.frequency-timeline)::after {
        display: none;
    }
    
    .timeline-segment {
        width: 100%;
        max-width: 150px;
        margin-bottom: 0;
        position: relative;
        padding-top: 18px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .timeline-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
    
    .timeline-icon img {
        width: 45px;
        height: 45px;
    }
    
    .timeline-badge {
        top: -58px;
    }
    
    .badge-positive,
    .badge-negative,
    .badge-neutral {
        font-size: 11px;
        padding: 4px 9px;
        white-space: nowrap;
    }
    
    .timeline-label {
        font-size: 13px;
        margin-top: 16px;
        line-height: 1.3;
        position: static;
        bottom: auto;
        display: block;
    }
    
    .timeline-expected {
        font-size: 10px;
        margin-top: 7px;
        line-height: 1.4;
        position: static;
        bottom: auto;
    }
    
    /* FIX Bonus Stats - Mobile Grid 2 colonne */
    .bonus-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .bonus-stat-card {
        padding: 15px 12px;
    }
    
    .bonus-stat-label {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .bonus-stat-value {
        font-size: 26px;
    }
    
    .dice-bonus-section {
        padding: 25px 15px;
    }
    
    .dice-bonus-title {
        font-size: 24px;
    }
    
    /* Box dadi - 1 colonna su mobile */
    .dice-levels-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dice-list {
        grid-template-columns: 1fr;
    }
    
    .dice-item {
        padding: 12px;
    }
    
    .dice-mini {
        width: 40px;
        height: 40px;
    }
    
    .history-controls {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .per-page-selector {
        justify-content: center;
    }
    
    /* FIX Paginazione - Mobile */
    .pagination-controls {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .pagination-btn {
        padding: 10px 10px;
        font-size: 9px;
        min-width: 65px;
        white-space: nowrap;
    }
    
    .pagination-info {
        font-size: 12px;
    }
    
    .pagination-info span {
        font-size: 12px;
    }
    
    /* Modal responsive */
    .premium-modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .premium-modal-header h2 {
        font-size: 22px;
    }
    
    .premium-features li {
        font-size: 14px;
        padding: 10px 0;
    }
    
    .premium-upgrade-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    /* Box premium + Timeframe - Stack verticale */
    .timeframe-container {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .timeframe-selector {
        min-width: unset;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }
    
    .timeframe-label-wrapper {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .timeframe-label {
        font-size: 16px;
    }
    
    .timeframe-rows-wrapper {
        width: 100%;
    }
    
    .timeframe-row-short,
    .timeframe-row-long {
        justify-content: center;
    }
    
    .timeframe-btn {
        padding: 12px 16px;
        font-size: 12px;
        min-width: 85px;
    }
    
    .premium-upgrade-box {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        padding: 18px 20px;
    }
    
    .premium-box-title {
        font-size: 15px;
    }
    
    .premium-badge-inline {
        font-size: 12px;
        padding: 3px 12px;
    }
    
    .premium-box-text {
        font-size: 13px;
        margin-bottom: 14px;
    }
    
    .premium-box-btn {
        padding: 11px 20px;
        font-size: 14px;
    }
}

/* MOBILE ORIZZONTALE (landscape) */
@media (max-width: 768px) and (orientation: landscape) {
    .frequency-timeline {
        grid-template-columns: repeat(3, 1fr);
        gap: 55px 12px;
        padding: 55px 12px 30px;
    }
    
    .timeline-segment {
        max-width: 130px;
        padding-top: 15px;
    }
    
    .timeline-icon {
        width: 70px;
        height: 70px;
    }
    
    .timeline-icon img {
        width: 40px;
        height: 40px;
    }
    
    .timeline-badge {
        top: -52px;
    }
    
    .dice-levels-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bonus-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* MOBILE PICCOLO VERTICALE (max-width: 480px) */
@media (max-width: 480px) {
    .monopoly-stats-wrapper {
        padding: 12px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    /* FIX Timeline Frequenze - Mobile piccolo SPACING MASSIMO */
    .frequency-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 60px 12px;
        padding: 58px 12px 32px;
    }
    
    .timeline-segment {
        max-width: 145px;
        padding-top: 15px;
    }
    
    .timeline-icon {
        width: 75px;
        height: 75px;
    }
    
    .timeline-icon img {
        width: 42px;
        height: 42px;
    }
    
    .timeline-badge {
        top: -55px;
    }
    
    .badge-positive,
    .badge-negative,
    .badge-neutral {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .timeline-label {
        font-size: 12px;
        margin-top: 15px;
    }
    
    .timeline-expected {
        font-size: 10px;
        margin-top: 6px;
    }
    
    /* FIX Bonus Stats - Mobile piccolo */
    .bonus-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .bonus-stat-card {
        padding: 12px 10px;
    }
    
    .bonus-stat-label {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .bonus-stat-value {
        font-size: 22px;
    }
    
    .dice-bonus-title {
        font-size: 20px;
    }
    
    .dice-level-header {
        font-size: 16px;
    }
    
    .dice-label {
        font-size: 12px;
    }
    
    /* Box dadi - 1 colonna su mobile */
    .dice-levels-container {
        grid-template-columns: 1fr;
    }
    
    /* FIX Paginazione - Mobile piccolo */
    .pagination-controls {
        gap: 8px;
        width: 100%;
    }
    
    .pagination-btn {
        padding: 8px 8px;
        font-size: 8px;
        min-width: 55px;
        flex: 1;
        max-width: 75px;
    }
    
    .page-number {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 36px;
    }
    
    .pagination-info {
        font-size: 11px;
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .pagination-info span {
        font-size: 11px;
    }
    
    .per-page-selector select,
    #history-per-page {
        padding: 6px 30px 6px 12px;
        font-size: 13px;
    }
    
    .premium-modal-content {
        padding: 25px 15px;
    }
    
    .premium-modal-header h2 {
        font-size: 20px;
    }
    
    .premium-upgrade-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    /* Premium Box Mobile */
    .timeframe-container {
        gap: 15px;
    }
    
    .timeframe-selector {
        padding: 15px;
    }
    
    .timeframe-label-wrapper {
        margin-bottom: 12px;
    }
    
    .timeframe-label {
        font-size: 14px;
    }
    
    .timeframe-btn {
        padding: 10px 15px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .premium-upgrade-box {
        padding: 15px;
    }
    
    .premium-box-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .premium-box-title {
        font-size: 14px;
    }
    
    .premium-box-text {
        font-size: 12px;
    }
    
    .premium-box-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .base-game-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-card .stat-icon img {
        width: 80px;
        height: 50px;
    }
}

/* MOBILE PICCOLO ORIZZONTALE (landscape) */
@media (max-width: 480px) and (orientation: landscape) {
    .frequency-timeline {
        grid-template-columns: 1fr;
        gap: 50px 8px;
        padding: 52px 10px 28px;
    }
    
    .timeline-segment {
        max-width: 110px;
        padding-top: 12px;
    }
    
    .timeline-icon {
        width: 65px;
        height: 65px;
    }
    
    .timeline-icon img {
        width: 36px;
        height: 36px;
    }
    
    .timeline-badge {
        top: -50px;
    }
    
    .badge-positive,
    .badge-negative,
    .badge-neutral {
        font-size: 10px;
        padding: 3px 7px;
    }
    
    .timeline-label {
        font-size: 11px;
        margin-top: 12px;
    }
    
    .timeline-expected {
        font-size: 9px;
        margin-top: 5px;
    }
    
    .bonus-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .dice-levels-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* ============================================
   PAGINAZIONE - Stile unificato
   ============================================ */

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
    padding: 15px;
}

.pagination-btn {
    background: rgba(30, 27, 75, 0.8);
    border: 2px solid #7C3AED;
    color: #E9D5FF;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(124, 58, 237, 0.6);
    border-color: #FDE047;
    color: #FDE047;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.pagination-info-center {
    color: #FDE047;
    font-size: 15px;
    font-weight: 700;
    padding: 10px 20px;
    background: rgba(250, 204, 21, 0.1);
    border: 2px solid rgba(250, 204, 21, 0.3);
    border-radius: 8px;
}

.pagination-info-center #current-page {
    color: #FACC15;
    font-weight: 800;
}

/* RESPONSIVE - Tablet */
@media (max-width: 768px) {
    .pagination-controls {
        gap: 8px;
        padding: 10px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .pagination-info-center {
        font-size: 13px;
        padding: 8px 15px;
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
}

/* RESPONSIVE - Mobile */
@media (max-width: 480px) {
    .pagination-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .pagination-btn {
        width: 100%;
        max-width: 200px;
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .pagination-info-center {
        width: 100%;
        max-width: 200px;
        font-size: 14px;
        padding: 10px 15px;
        margin-bottom: 5px;
    }
    
    /* Nascondi Prima/Ultima su mobile piccolo per risparmiare spazio */
    #first-page, #last-page {
        display: none;
    }
}

/* RESPONSIVE - Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .pagination-controls {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-btn {
        width: auto;
        max-width: none;
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .pagination-info-center {
        width: auto;
        order: 0;
    }
    
    #first-page, #last-page {
        display: inline-block;
    }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    /* Box dadi - 2 colonne su tablet */
    .dice-levels-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .dice-level-box {
        padding: 20px;
    }
    
    .dice-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Mobile Verticale (max-width: 768px) */
@media (max-width: 768px) {
    .dice-bonus-section {
        padding: 25px 15px;
    }
    
    .dice-bonus-title {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .dice-bonus-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    /* Box dadi - 1 colonna COMPLETA su mobile */
    .dice-levels-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .dice-level-box {
        padding: 20px 15px;
    }
    
    .dice-level-header {
        font-size: 18px;
        margin-bottom: 6px;
        padding-bottom: 8px;
    }
    
    .dice-level-sub {
        font-size: 13px;
        margin-bottom: 18px;
    }
    
    /* Lista dadi - Stack verticale completo */
    .dice-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .dice-item {
        padding: 14px;
        gap: 12px;
    }
    
    .dice-pair {
        gap: 6px;
    }
    
    .dice-mini {
        width: 45px;
        height: 45px;
    }
    
    .dice-label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .dice-mini-bar {
        height: 8px;
    }
}

/* Mobile Landscape (max-width: 768px) */
@media (max-width: 768px) and (orientation: landscape) {
    .dice-bonus-section {
        padding: 20px 15px;
    }
    
    /* Box dadi - 2 colonne su mobile landscape */
    .dice-levels-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .dice-level-box {
        padding: 18px 12px;
    }
    
    .dice-level-header {
        font-size: 17px;
    }
    
    .dice-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .dice-item {
        padding: 12px;
    }
    
    .dice-mini {
        width: 40px;
        height: 40px;
    }
}

/* Mobile Piccolo Verticale (max-width: 480px) */
@media (max-width: 480px) {
    .dice-bonus-section {
        padding: 20px 12px;
        border-radius: 15px;
    }
    
    .dice-bonus-title {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .dice-bonus-subtitle {
        font-size: 13px;
        margin-bottom: 25px;
    }
    
    /* Box dadi - 1 colonna stretta */
    .dice-levels-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dice-level-box {
        padding: 18px 12px;
        border-radius: 12px;
    }
    
    .dice-level-header {
        font-size: 17px;
        margin-bottom: 6px;
        padding-bottom: 8px;
    }
    
    .dice-level-sub {
        font-size: 12px;
        margin-bottom: 16px;
    }
    
    .dice-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .dice-item {
        padding: 12px;
        gap: 10px;
    }
    
    .dice-pair {
        gap: 5px;
    }
    
    .dice-mini {
        width: 42px;
        height: 42px;
        border-radius: 6px;
    }
    
    .dice-label {
        font-size: 12px;
        margin-bottom: 7px;
    }
    
    .dice-mini-bar {
        height: 7px;
        border-radius: 8px;
    }
}

/* Mobile Piccolo Landscape (max-width: 480px) */
@media (max-width: 480px) and (orientation: landscape) {
    .dice-bonus-section {
        padding: 18px 12px;
    }
    
    /* Box dadi - 2 colonne compatte su mobile piccolo landscape */
    .dice-levels-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .dice-level-box {
        padding: 15px 10px;
    }
    
    .dice-level-header {
        font-size: 16px;
        margin-bottom: 5px;
        padding-bottom: 6px;
    }
    
    .dice-level-sub {
        font-size: 11px;
        margin-bottom: 14px;
    }
    
    .dice-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .dice-item {
        padding: 10px;
        gap: 8px;
    }
    
    .dice-mini {
        width: 38px;
        height: 38px;
    }
    
    .dice-label {
        font-size: 11px;
        margin-bottom: 6px;
    }
}

/* ============================================
   FIX RESPONSIVE - ROLL BONUS STATISTICS
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .rolls-stats-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 700px;
    }
    
    .rolls-stat-card {
        padding: 25px;
    }
    
    .rolls-stat-card h3 {
        font-size: 22px;
        margin-bottom: 18px;
    }
}

/* Mobile Verticale (max-width: 768px) */
@media (max-width: 768px) {
    .rolls-stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
    }
    
    .rolls-stat-card {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .rolls-stat-card h3 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .rolls-stat-row {
        padding: 8px 0;
        font-size: 14px;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .rolls-stat-row span:first-child {
        flex: 1;
        min-width: 0;
    }
    
    .rolls-stat-row span:last-child {
        font-weight: 700;
        color: #FACC15;
    }
    
    .top-properties {
        margin-top: 16px;
    }
    
    .property-item {
        padding: 10px;
        margin: 6px 0;
        border-radius: 8px;
        font-size: 13px;
        line-height: 1.4;
    }
}

/* Mobile Landscape (max-width: 768px) */
@media (max-width: 768px) and (orientation: landscape) {
    .rolls-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    
    .rolls-stat-card {
        padding: 18px 12px;
    }
    
    .rolls-stat-card h3 {
        font-size: 18px;
        margin-bottom: 14px;
    }
    
    .rolls-stat-row {
        font-size: 13px;
        padding: 7px 0;
    }
    
    .property-item {
        font-size: 12px;
        padding: 8px;
    }
}

/* Mobile Piccolo Verticale (max-width: 480px) */
@media (max-width: 480px) {
    .rolls-stats-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .rolls-stat-card {
        padding: 18px 12px;
        border-radius: 12px;
    }
    
    .rolls-stat-card h3 {
        font-size: 18px;
        margin-bottom: 14px;
    }
    
    .rolls-stat-row {
        padding: 7px 0;
        font-size: 13px;
        line-height: 1.5;
    }
    
    .rolls-stat-row span:first-child {
        flex: 1 1 60%;
        min-width: 0;
        word-break: break-word;
    }
    
    .rolls-stat-row span:last-child {
        flex: 0 0 auto;
        text-align: right;
    }
    
    .top-properties {
        margin-top: 14px;
    }
    
    .property-item {
        padding: 10px 8px;
        margin: 5px 0;
        border-radius: 8px;
        font-size: 12px;
        line-height: 1.5;
        word-break: break-word;
    }
}

/* Mobile Piccolo Landscape (max-width: 480px) */
@media (max-width: 480px) and (orientation: landscape) {
    .rolls-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .rolls-stat-card {
        padding: 15px 10px;
    }
    
    .rolls-stat-card h3 {
        font-size: 17px;
        margin-bottom: 12px;
    }
    
    .rolls-stat-row {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .property-item {
        font-size: 11px;
        padding: 8px 6px;
        margin: 4px 0;
    }
}

/* ============================================
   FIX AGGIUNTIVI - CHANCE STATS SECTION
   ============================================ */

/* Mobile Verticale (max-width: 768px) */
@media (max-width: 768px) {
    .chance-stats {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .chance-notice {
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 16px;
        font-size: 13px;
    }
    
    .chance-stat-row {
        padding: 12px 0;
        font-size: 15px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .chance-stat-row span:first-child {
        flex: 1;
        min-width: 0;
    }
    
    .chance-stat-row span:last-child {
        font-weight: 700;
    }
}

/* Mobile Piccolo Verticale (max-width: 480px) */
@media (max-width: 480px) {
    .chance-stats {
        padding: 18px 12px;
    }
    
    .chance-notice {
        padding: 10px;
        font-size: 12px;
        line-height: 1.5;
    }
    
    .chance-stat-row {
        padding: 10px 0;
        font-size: 14px;
    }
}

/* ============================================
   FIX AGGIUNTIVI - NO DATA MESSAGES
   ============================================ */

@media (max-width: 768px) {
    .no-data {
        padding: 25px 15px !important;
        font-size: 14px;
    }
    
    .no-data-small {
        padding: 30px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .no-data {
        padding: 20px 12px !important;
        font-size: 13px;
    }
    
    .no-data-small {
        padding: 25px 12px;
        font-size: 13px;
    }
}

/* ============================================
   FIX AGGIUNTIVI - SPACING GENERALE
   ============================================ */

@media (max-width: 768px) {
    .stats-section {
        padding: 20px 15px;
        margin-bottom: 20px;
        border-radius: 10px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .section-subtitle {
        font-size: 13px;
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .stats-section {
        padding: 18px 12px;
        margin-bottom: 18px;
    }
    
    .section-title {
        font-size: 18px;
        margin-bottom: 14px;
    }
    
    .section-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }
}


/* ============================================
   FIX CRITICO - MOBILE LANDSCAPE DICE LEVELS
   1 COLONNA FORZATA per 2Roll/4Roll in orizzontale
   ============================================ */

/* Mobile Landscape - Forza 1 colonna */
@media screen and (max-width: 900px) and (orientation: landscape) {
    .dice-levels-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .dice-level-box {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 18px 15px !important;
        box-sizing: border-box !important;
    }
    
    .dice-level-header {
        font-size: 18px !important;
        text-align: center !important;
    }
    
    .dice-level-sub {
        font-size: 13px !important;
        text-align: center !important;
    }
}

/* Mobile Piccolo Landscape (<768px) */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .dice-levels-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }
    
    .dice-level-box {
        padding: 16px 12px !important;
    }
    
    .dice-level-header {
        font-size: 17px !important;
    }
    
    .dice-level-sub {
        font-size: 12px !important;
    }
    
    .dice-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .dice-item {
        width: 100% !important;
        padding: 12px !important;
    }
}

/* Mobile Molto Piccolo Landscape (<600px height) */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .dice-levels-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .dice-level-box {
        padding: 14px 10px !important;
    }
    
    .dice-level-header {
        font-size: 16px !important;
        margin-bottom: 5px !important;
    }
    
    .dice-level-sub {
        font-size: 11px !important;
        margin-bottom: 12px !important;
    }
}

/* ============================================
   FIX CRITICO - MOBILE LANDSCAPE FREQUENZA PREVISTA VS REALE
   Stessa visualizzazione del verticale
   ============================================ */

/* Mobile Landscape - Base Game Grid e Frequency Timeline come verticale */
@media screen and (max-width: 900px) and (orientation: landscape) {
    /* Griglia segmenti - 2 colonne come in verticale */
    .base-game-grid,
    .delays-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .stat-card {
        padding: 15px 10px !important;
    }
    
    .stat-icon {
        width: 100px !important;
        min-height: 60px !important;
    }
    
    .stat-icon img {
        width: 50px !important;
        height: 50px !important;
    }
    
    /* Frequency Timeline - 2 colonne come verticale */
    .frequency-timeline {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 50px 15px !important;
        padding: 50px 15px 30px !important;
        justify-items: center !important;
    }
    
    .frequency-timeline::before,
    .frequency-timeline::after,
    .stats-section:has(.frequency-timeline)::after {
        display: none !important;
    }
    
    .timeline-segment {
        width: 100% !important;
        max-width: 140px !important;
    }
    
    .timeline-icon {
        width: 70px !important;
        height: 70px !important;
        margin: 0 auto !important;
    }
    
    .timeline-icon img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .timeline-expected {
        font-size: 11px !important;
    }
}

/* Mobile Piccolo Landscape (<768px) - Ancora più compatto */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .base-game-grid,
    .delays-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .stat-card {
        padding: 12px 8px !important;
    }
    
    .stat-icon {
        width: 90px !important;
        min-height: 50px !important;
        margin-bottom: 8px !important;
    }
    
    .stat-icon img {
        width: 45px !important;
        height: 45px !important;
    }
    
    .frequency-timeline {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 40px 12px !important;
        padding: 40px 12px 25px !important;
    }
    
    .timeline-segment {
        max-width: 130px !important;
    }
    
    .timeline-icon {
        width: 65px !important;
        height: 65px !important;
    }
    
    .timeline-icon img {
        width: 38px !important;
        height: 38px !important;
    }
    
    .timeline-expected {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
    
    .timeline-label {
        font-size: 11px !important;
    }
    
    .timeline-stats {
        font-size: 10px !important;
    }
}

/* Schermi molto bassi in landscape */
@media screen and (max-height: 450px) and (orientation: landscape) {
    .base-game-grid,
    .delays-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .stat-card {
        padding: 10px 6px !important;
    }
    
    .stat-icon {
        width: 80px !important;
        min-height: 45px !important;
    }
    
    .stat-icon img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .frequency-timeline {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 30px 10px !important;
        padding: 35px 10px 20px !important;
    }
    
    .timeline-icon {
        width: 55px !important;
        height: 55px !important;
    }
    
    .timeline-icon img {
        width: 32px !important;
        height: 32px !important;
    }
}