/* 
 * Crazy Time Statistics - Lightning Storm Style
 * Colori principali: Viola (#6B21A8, #7C3AED) e Giallo (#FACC15, #FDE047)
 */

/* Reset e container principale */
.cts-lightning-container {
    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;
}

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

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

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

.cts-main-title {
    font-size: 42px;
    font-weight: 800;
    color: #FACC15;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.5),
                 0 4px 8px rgba(0, 0, 0, 0.3);
    margin: 0 0 10px 0;
    letter-spacing: 1px;
    display: none; /* NASCOSTO */
}

.cts-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;
}

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

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

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

/* Filtri Container - Layout orizzontale */
.cts-filters-container {
    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;
}

.cts-filter-group {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

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

.cts-filter-group label {
    color: #FDE047;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cts-select {
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid #7C3AED;
    border-radius: 8px;
    background: rgba(30, 27, 75, 0.8);
    color: #FACC15;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cts-select:hover {
    background: rgba(91, 33, 182, 0.8);
    border-color: #FACC15;
}

.cts-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.3);
}

/* Timeframe buttons - Righe separate */
.cts-timeframe-row-short,
.cts-timeframe-row-long {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.cts-btn-timeframe {
    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: 80px;
}

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

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

.cts-btn-timeframe[data-timeframe="1h"].active,
.cts-btn-timeframe[data-timeframe="6h"].active,
.cts-btn-timeframe[data-timeframe="12h"].active,
.cts-btn-timeframe[data-timeframe="24h"].active,
.cts-btn-timeframe[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 */
.cts-btn-timeframe[data-timeframe="1m"],
.cts-btn-timeframe[data-timeframe="3m"],
.cts-btn-timeframe[data-timeframe="6m"],
.cts-btn-timeframe[data-timeframe="1y"] {
    border: 2px solid #FDE047;
    background: rgba(253, 224, 71, 0.1);
    color: #FDE047;
}

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

.cts-btn-timeframe[data-timeframe="1m"].active,
.cts-btn-timeframe[data-timeframe="3m"].active,
.cts-btn-timeframe[data-timeframe="6m"].active,
.cts-btn-timeframe[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 */
.cts-btn-timeframe.cts-btn-locked {
    cursor: not-allowed;
    background: rgba(30, 27, 75, 0.4) !important;
    border-color: rgba(124, 58, 237, 0.3) !important;
    color: rgba(233, 213, 255, 0.4) !important;
    opacity: 0.6;
}

.cts-btn-timeframe.cts-btn-locked:hover {
    transform: none;
}

.cts-lock-icon {
    margin-left: 6px;
    font-size: 11px;
}

/* Nasconde visivamente i bottoni 3H e 72h (3 GIORNI) */
.cts-btn-timeframe[data-timeframe="3h"],
.cts-btn-timeframe[data-timeframe="72h"] {
    display: none;
}

/* Box Premium Upgrade - Stile Monopoly */
.cts-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 */
.cts-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: cts-shimmer 3s linear infinite;
    pointer-events: none;
    z-index: -1;
}

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

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

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

.cts-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 */
.cts-premium-box-text {
    font-size: 14px;
    color: #C4B5FD;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Bottone upgrade nel box */
.cts-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;
}

.cts-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);
}

.cts-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);
}

/* Loading overlay */
.cts-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 27, 75, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
}

.cts-loading-overlay.active {
    display: flex;
}

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

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

.cts-loading-overlay p {
    margin-top: 20px;
    color: #FDE047;
    font-size: 18px;
    font-weight: 600;
}

/* Sezioni */
.cts-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);
}

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

/* Stats Grid */
.cts-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

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

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

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

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

/* Colori settori - più fedeli alla foto */
.cts-stat-card.numero-1 { border-color: #06B6D4; }  /* Teal */
.cts-stat-card.numero-2 { border-color: #F97316; }  /* Arancione */
.cts-stat-card.numero-5 { border-color: #EC4899; }  /* Rosa */
.cts-stat-card.numero-10 { border-color: #8B5CF6; } /* Viola */
.cts-stat-card.pachinko { border-color: #A855F7; }  /* Viola chiaro */
.cts-stat-card.cash-hunt { border-color: #10B981; } /* Verde */
.cts-stat-card.coin-flip { border-color: #3B82F6; } /* Blu */
.cts-stat-card.crazy-bonus { border-color: #DC2626; } /* Rosso */

.cts-stat-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

/* Immagini nella sezione Base Game Stats */
.cts-stat-card .cts-segment-image {
    width: 80px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.cts-stat-card:hover .cts-segment-image {
    transform: scale(1.1);
}

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

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

.cts-stat-delay.high-delay {
    color: #EF4444;
    font-weight: 700;
}

.cts-stat-delay.medium-delay {
    color: #F59E0B;
    font-weight: 700;
}

.cts-stat-delay.low-delay {
    color: #10B981;
    font-weight: 700;
}

/* Timeline Frequenze */
.cts-frequency-timeline-section {
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.2) 0%, rgba(49, 46, 129, 0.2) 100%);
}

.cts-timeline-header {
    text-align: center;
    margin-bottom: 30px;
}

.cts-timeline-subtitle {
    font-size: 14px;
    color: #C4B5FD;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cts-frequency-timeline {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 20px 40px;
    background: rgba(30, 27, 75, 0.4);
    border-radius: 16px;
    border: 2px solid rgba(124, 58, 237, 0.3);
}

.cts-timeline-line {
    position: absolute;
    top: 43%;
    left: 5%;
    right: 5%;
    height: 6px;
    background: linear-gradient(90deg, #00deff 0%, #da03ff 50%, #ff0000 100%);
    border-radius: 3px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.cts-timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
    transition: transform 0.3s ease;
}

.cts-timeline-item:hover {
    transform: translateY(-8px);
}

.cts-timeline-node {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 3px solid;
}

.cts-timeline-node:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Colori specifici nodi timeline */
.cts-timeline-node.segment-1 {
    background: linear-gradient(135deg, #06B6D4, #0891B2);
    border-color: #06B6D4;
}

.cts-timeline-node.segment-2 {
    background: linear-gradient(135deg, #F97316, #EA580C);
    border-color: #F97316;
}

.cts-timeline-node.segment-5 {
    background: linear-gradient(135deg, #EC4899, #DB2777);
    border-color: #EC4899;
}

.cts-timeline-node.segment-10 {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    border-color: #8B5CF6;
}

.cts-timeline-node.segment-pachinko {
    background: linear-gradient(135deg, #A855F7, #9333EA);
    border-color: #A855F7;
}

.cts-timeline-node.segment-cashhunt {
    background: linear-gradient(135deg, #10B981, #059669);
    border-color: #10B981;
}

.cts-timeline-node.segment-coinflip {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border-color: #3B82F6;
}

.cts-timeline-node.segment-crazybonus {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    border-color: #DC2626;
}

/* Immagini nella Timeline Frequenze */
.cts-timeline-item .cts-timeline-segment-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1);
}

.cts-timeline-percentage {
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 12px;
    color: white;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

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

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

.cts-timeline-label {
    margin-top: 18px;
    font-size: 12px;
    font-weight: 700;
    color: #FDE047;
    text-align: center;
    max-width: 90px;
}

.cts-timeline-expected {
    font-size: 10px;
    color: #C4B5FD;
    margin-top: 3px;
}

.cts-timeline-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    margin-bottom: 12px;
    border: 1px solid #FACC15;
}

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

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

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

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

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

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

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

/* Top Slot Grid */
.cts-top-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.cts-top-slot-card {
    background: rgba(30, 27, 75, 0.6);
    border: 2px solid #7C3AED;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: all 0.3s ease;
}

.cts-top-slot-card:hover {
    transform: translateY(-3px);
    border-color: #FACC15;
    box-shadow: 0 6px 18px rgba(250, 204, 21, 0.2);
}

/* Immagini nella sezione Top Slot Stats */
.cts-top-slot-card .cts-topslot-image {
    width: 75px;
    height: 70px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.cts-top-slot-card:hover .cts-topslot-image {
    transform: scale(1.1);
}

.cts-slot-stats {
    font-size: 13px;
}

.cts-slot-lands {
    font-weight: 700;
    margin-bottom: 6px;
    color: #FDE047;
}

.cts-slot-matches {
    color: #10B981;
    font-size: 13px;
    font-weight: 700;
}

/* Crazy Bonus Section */
.cts-crazy-bonus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

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

.cts-flapper-card:hover {
    transform: translateY(-5px);
    border-color: #FACC15;
    box-shadow: 0 10px 30px rgba(250, 204, 21, 0.2);
}

.cts-flapper-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

/* Immagini nella sezione Crazy Time Color (Flappers) */
.cts-flapper-card .cts-flapper-image {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 10px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.cts-flapper-card:hover .cts-flapper-image {
    transform: scale(1.1) rotate(5deg);
}

.cts-flapper-average {
    font-size: 32px;
    font-weight: 800;
    color: #FACC15;
    margin-top: 12px;
    text-shadow: 0 3px 8px rgba(250, 204, 21, 0.4);
}

.cts-flapper-count {
    font-size: 13px;
    color: #C4B5FD;
    margin-top: 8px;
    font-weight: 600;
}

/* Cash Hunt Grid */
.cts-cash-hunt-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 6px;
    font-size: 13px;
    width: 100%;
}

.cts-multiplier {
    padding: 10px 5px;
    text-align: center;
    border-radius: 6px;
    background: rgba(30, 27, 75, 0.6);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: #FDE047;
    font-weight: 600;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cts-multiplier:hover {
    transform: scale(1.05);
    border-color: #FACC15;
    box-shadow: 0 2px 8px rgba(250, 204, 21, 0.3);
}

.cts-multiplier.highlight-green {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10B981;
    color: #10B981;
    font-weight: 800;
}

.cts-multiplier.highlight-red {
    background: rgba(220, 38, 38, 0.3);
    border-color: #DC2626;
    color: #DC2626;
    font-weight: 800;
}

/* Coin Flip */
.cts-coin-flip-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.cts-coin-option {
    flex: 1;
    max-width: 320px;
    min-width: 250px;
    background: rgba(30, 27, 75, 0.6);
    border: 2px solid #7C3AED;
    padding: 30px 25px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.cts-coin-option:hover {
    transform: translateY(-8px);
    border-color: #FACC15;
    box-shadow: 0 12px 36px rgba(250, 204, 21, 0.3);
}

.cts-coin-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

/* Immagini nella sezione Coin Flip */
.cts-coin-option .cts-coinflip-image {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    transition: transform 0.4s ease;
}

.cts-coin-option:hover .cts-coinflip-image {
    transform: scale(1.15) rotateY(180deg);
}

.cts-percentage {
    font-size: 40px;
    font-weight: 800;
    color: #FACC15;
    margin-bottom: 15px;
    text-shadow: 0 3px 10px rgba(250, 204, 21, 0.5);
}

.cts-average-value {
    font-size: 16px;
    color: #C4B5FD;
    font-weight: 600;
}

.cts-average-multiplier {
    color: #FDE047;
    font-weight: 700;
    font-size: 22px;
}

.cts-coin-count {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 10px;
    font-weight: 600;
}

/* History Table */
.cts-history-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.cts-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cts-history-table th,
.cts-history-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.3);
    text-align: center;
    vertical-align: middle;
}

.cts-history-table th {
    background: rgba(30, 27, 75, 0.8);
    color: #FDE047;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    border-bottom: 2px solid #FACC15;
}

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

.cts-history-table tbody tr:hover {
    background: rgba(91, 33, 182, 0.2);
    box-shadow: 0 2px 8px rgba(250, 204, 21, 0.1);
}

/* Immagini nella sezione Spins History */
table.cts-history-table tbody td img.cts-history-segment-only,
.cts-history-table tbody td img.cts-history-segment-only,
.cts-history-table td img.cts-history-segment-only,
.cts-history-table img.cts-history-segment-only,
.cts-history-table .cts-history-segment-only {
    width: 42px;
    height: 42px;
    max-width: 42px;
    max-height: 42px;
    object-fit: contain;
    border-radius: 6px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}

table.cts-history-table tbody td img.cts-history-segment-only:hover,
.cts-history-table .cts-history-segment-only:hover {
    transform: scale(1.08);
}

.cts-multiplier-value,
.cts-multiplier-range {
    display: inline-block;
    background: transparent;
    color: white;
    padding: 0;
    border-radius: 0;
    font-weight: 800;
    font-size: 15px;
    min-width: auto;
    text-align: center;
    box-shadow: none;
    transition: transform 0.2s ease;
}

.cts-multiplier-value:hover,
.cts-multiplier-range:hover {
    transform: scale(1.05);
}

/* Moltiplicatori Crazy Time & Cash Hunt */
.cts-mult-max {
    color: #22C55E;
    font-weight: 700;
    font-size: 15px;
}

.cts-mult-min {
    color: #EF4444;
    font-weight: 700;
    font-size: 15px;
}

.cts-mult-separator {
    color: #9CA3AF;
    margin: 0 4px;
    font-weight: 600;
}

.cts-multiplier-crazy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    flex-wrap: wrap;
    justify-content: center;
}

.cts-crazy-green {
    color: #22C55E;
    font-weight: 700;
    font-size: 15px;
    text-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.cts-crazy-blue {
    color: #3B82F6;
    font-weight: 700;
    font-size: 15px;
    text-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.cts-crazy-yellow {
    color: #FACC15;
    font-weight: 700;
    font-size: 15px;
    text-shadow: 0 2px 4px rgba(250, 204, 21, 0.3);
}

.cts-crazy-separator {
    color: #6B7280;
    margin: 0 2px;
    font-weight: 500;
}

.cts-multiplier-range:hover .cts-mult-max,
.cts-multiplier-range:hover .cts-mult-min,
.cts-multiplier-crazy:hover .cts-crazy-green,
.cts-multiplier-crazy:hover .cts-crazy-blue,
.cts-multiplier-crazy:hover .cts-crazy-yellow {
    transform: scale(1.1);
    display: inline-block;
    transition: transform 0.2s ease;
}

.match-yes {
    color: #10B981;
    font-weight: 800;
    text-transform: uppercase;
}

.match-no {
    color: #EF4444;
    font-weight: 800;
    text-transform: uppercase;
}

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

/* Pagination */
.cts-pagination-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px !important;
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-wrap: wrap !important;
}

.cts-pagination-info {
    display: none;
}

.cts-pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.cts-pagination-btn {
    padding: 8px 16px;
    border: 1px solid rgba(138, 43, 226, 0.5);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cts-pagination-btn:hover:not(:disabled) {
    background: transparent;
    color: #ffd700;
    border-color: #ffd700;
}

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

.cts-page-indicator {
    color: #ffd700;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cts-page-current {
    color: #ffd700;
    font-weight: 800;
}

.cts-page-separator {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
}

.cts-page-total {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
}

/* Membership & Premium Features */
.cts-membership-notice {
    margin-top: 15px;
    padding: 12px 18px;
    background: rgba(250, 204, 21, 0.1);
    border: 2px solid rgba(250, 204, 21, 0.3);
    border-radius: 8px;
    font-size: 13px;
    color: #FDE047;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.cts-upgrade-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FACC15 0%, #FDE047 100%);
    color: #1e1b4b;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cts-upgrade-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.4);
}

/* Modal Overlay */
.cts-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.cts-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 3px solid #FACC15;
    border-radius: 16px;
    padding: 40px 30px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

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

.cts-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #9CA3AF;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s ease;
}

.cts-modal-close:hover {
    color: #FDE047;
    transform: rotate(90deg);
}

.cts-modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.cts-modal-title {
    font-size: 28px;
    font-weight: 800;
    color: #FACC15;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 8px rgba(250, 204, 21, 0.3);
}

.cts-modal-text {
    font-size: 16px;
    color: #E9D5FF;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.cts-modal-text strong {
    color: #FACC15;
    font-weight: 800;
}

.cts-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cts-modal-btn {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cts-modal-btn-primary {
    background: linear-gradient(135deg, #FACC15 0%, #FDE047 100%);
    color: #1e1b4b;
    border-color: #FACC15;
}

.cts-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 204, 21, 0.4);
}

.cts-modal-btn-secondary {
    background: transparent;
    color: #E9D5FF;
    border-color: #7C3AED;
}

.cts-modal-btn-secondary:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: #FDE047;
    color: #FDE047;
}

/* Fix Allineamento Header Tabella History */
.cts-lightning-container .cts-history-table th,
.cts-section .cts-history-table th,
table.cts-history-table th,
.cts-history-table thead th {
    text-align: center !important;
    font-weight: 800 !important;
    color: #FDE047 !important;
}

.cts-lightning-container .cts-history-table td,
.cts-section .cts-history-table td,
table.cts-history-table td,
.cts-history-table tbody td {
    text-align: center !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .cts-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .cts-frequency-timeline {
        padding: 40px 15px 30px;
    }
    
    .cts-timeline-node {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 1024px) {
    .cts-timeframe-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cts-filters-container {
        min-width: unset;
        max-width: 100%;
        width: 100%;
    }
    
    .cts-premium-upgrade-box {
        width: 100%;
        max-width: 100%;
        min-width: unset;
    }
}

@media (max-width: 768px) {
    /* ... altre regole ... */
    
    /* FIX Timeline Frequenze - Mobile SPACING MASSIMO */
    .cts-frequency-timeline {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 65px 15px;
        padding: 60px 15px 35px;
        justify-items: center;
        align-items: start;
    }
    
    .cts-timeline-item {
        width: 100%;
        max-width: 150px;
        margin-bottom: 0;
        position: relative;
        padding-top: 18px;
    }
    
    .cts-timeline-node {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
    
    .cts-timeline-item .cts-timeline-segment-image {
        width: 45px;
        height: 45px;
    }
    
    .cts-timeline-percentage {
        top: -58px;
        font-size: 11px;
        padding: 4px 9px;
        white-space: nowrap;
    }
    
    .cts-timeline-label {
        font-size: 13px;
        margin-top: 16px;
        font-weight: 800;
        color: #FACC15;
        line-height: 1.3;
    }
    
    .cts-timeline-expected {
        font-size: 10px;
        margin-top: 7px;
        color: #C4B5FD;
        white-space: nowrap;
        line-height: 1.4;
    }
    
     /* FIX Paginazione - Mobile */
    .cts-pagination-container {
        gap: 12px !important;
        padding: 12px 10px !important;
    }
    
    .cts-pagination-controls {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .cts-pagination-btn {
        padding: 10px 10px;
        font-size: 9px;
        min-width: 65px;
        white-space: nowrap;
    }
    
    .cts-page-indicator {
        font-size: 12px;
        gap: 5px;
        white-space: nowrap;
    }
    
    .cts-page-current,
    .cts-page-separator,
    .cts-page-total {
        font-size: 12px;
    }
  
    /* FIX Bonus Stats - Mobile Grid 2 colonne */
    .cts-bonus-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .cts-bonus-card {
        padding: 15px 12px;
    }
    
    .cts-bonus-name {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .cts-bonus-count {
        font-size: 26px;
    }
    
    .cts-main-title {
        font-size: 32px;
    }
    
    .cts-filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cts-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .cts-frequency-timeline {
        flex-wrap: wrap;
        justify-content: center;
        gap: 25px;
        padding: 30px 10px;
    }
    
    .cts-timeline-line {
        display: none;
    }
    
    .cts-timeline-node {
        width: 55px;
        height: 55px;
    }
    
    .cts-bonus-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .cts-coin-flip-container {
        flex-direction: column;
        gap: 25px;
    }
    
    .cts-pagination-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .cts-cash-hunt-grid {
        gap: 3px;
        font-size: 11px;
    }
    
    .cts-multiplier {
        padding: 6px 2px;
        min-height: 28px;
    }
    
    .cts-multiplier-crazy {
        font-size: 11px;
    }
    
    .cts-crazy-green,
    .cts-crazy-blue,
    .cts-crazy-yellow,
    .cts-mult-max,
    .cts-mult-min {
        font-size: 12px;
    }
    
    .cts-premium-upgrade-box {
        padding: 18px 20px;
    }
    
    .cts-premium-box-title {
        font-size: 15px;
    }
    
    .cts-premium-badge-inline {
        font-size: 12px;
        padding: 3px 12px;
    }
    
    .cts-premium-box-text {
        font-size: 13px;
        margin-bottom: 14px;
    }
    
    .cts-premium-box-btn {
        padding: 11px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    
    /* FIX Timeline Frequenze - Mobile piccolo SPACING MASSIMO */
    .cts-frequency-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 60px 12px;
        padding: 58px 12px 32px;
    }
    
    .cts-timeline-item {
        max-width: 145px;
        padding-top: 15px;
    }
    
    .cts-timeline-node {
        width: 75px;
        height: 75px;
    }
    
    .cts-timeline-item .cts-timeline-segment-image {
        width: 42px;
        height: 42px;
    }
    
    .cts-timeline-percentage {
        font-size: 11px;
        padding: 4px 8px;
        top: -55px;
    }
    
    .cts-timeline-label {
        font-size: 12px;
        margin-top: 15px;
    }
    
    .cts-timeline-expected {
        font-size: 10px;
        margin-top: 6px;
    }
    
    .cts-pagination-container {
        gap: 10px !important;
        padding: 10px 8px !important;
    }
    
    .cts-pagination-controls {
        gap: 8px;
        width: 100%;
    }
    
    .cts-pagination-btn {
        padding: 8px 10px;
        font-size: 11px;
        min-width: 60px;
        flex: 1;
        max-width: 80px;
    }
    
    .cts-page-indicator {
        font-size: 11px;
        gap: 4px;
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }
    
    .cts-page-current,
    .cts-page-separator,
    .cts-page-total {
        font-size: 11px;
    }
  
    //* FIX Paginazione - Mobile piccolo */
    .cts-pagination-container {
        gap: 10px !important;
        padding: 10px 8px !important;
    }
    
    .cts-pagination-controls {
        gap: 8px;
        width: 100%;
    }
    
    .cts-pagination-btn {
        padding: 8px 8px;
        font-size: 6px;
        min-width: 55px;
        flex: 1;
        max-width: 75px;
    }
    
    .cts-page-indicator {
        font-size: 11px;
        gap: 4px;
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }
    
    .cts-page-current,
    .cts-page-separator,
    .cts-page-total {
        font-size: 11px;
    }
  
    /* FIX Bonus Stats - Mobile piccolo */
    .cts-bonus-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .cts-bonus-card {
        padding: 12px 10px;
    }
    
    .cts-bonus-name {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .cts-bonus-count {
        font-size: 22px;
    }
    
    .cts-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .cts-stat-card {
        padding: 15px 10px;
    }
    
    .cts-segment-image {
        width: 60px;
        height: 45px;
    }
    
    .cts-stat-percentage {
        font-size: 24px;
    }
    
    .cts-section {
        padding: 18px;
    }
    
    .cts-section-title {
        font-size: 20px;
    }
    
    .cts-cash-hunt-grid {
        gap: 2px;
        font-size: 7px;
    }
    
    .cts-multiplier {
        padding: 4px 1px;
        min-height: 22px;
    }
    
    .cts-history-table {
        font-size: 11px;
    }
    
    .cts-history-table th,
    .cts-history-table td {
        padding: 8px 4px;
    }
    
    table.cts-history-table tbody td img.cts-history-segment-only,
    .cts-history-table .cts-history-segment-only {
        width: 35px;
        height: 35px;
        max-width: 35px;
        max-height: 35px;
    }
    
    .cts-multiplier-crazy {
        font-size: 10px;
        gap: 2px;
    }
    
    .cts-crazy-green,
    .cts-crazy-blue,
    .cts-crazy-yellow,
    .cts-mult-max,
    .cts-mult-min {
        font-size: 11px;
    }
    
    .cts-crazy-separator,
    .cts-mult-separator {
        margin: 0 1px;
    }
    
    .cts-modal-content {
        padding: 30px 20px;
    }
    
    .cts-modal-title {
        font-size: 24px;
    }
    
    .cts-modal-text {
        font-size: 14px;
    }
    
    .cts-modal-actions {
        flex-direction: column;
    }
    
    .cts-modal-btn {
        width: 100%;
    }
    
    .cts-membership-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .cts-upgrade-link {
        width: 100%;
        justify-content: center;
    }
    
    .cts-timeframe-container {
        gap: 15px;
    }
    
    .cts-filters-container {
        padding: 15px;
    }
    
    .cts-premium-upgrade-box {
        padding: 15px;
    }
    
    .cts-premium-box-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cts-premium-box-title {
        font-size: 14px;
    }
    
    .cts-premium-box-text {
        font-size: 12px;
    }
    
    .cts-premium-box-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}