/* Video Slots Popular Section - Persis Seperti Referensi */
.popular-games {
    display: flex;
    gap: 20px;
    background: #000;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.95));
    padding: 30px 20px;
    margin: 0;
    position: relative;
    overflow: hidden;
    height: 345px;
}

/* Left Sidebar - Fixed Width */
.popular-games [data-section="left"] {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

/* Section Title */
.section-title {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-transform: capitalize;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.section-title i[data-icon="play"] {
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fff"><path d="M8 5v14l11-7z"/></svg>') no-repeat center;
    background-size: contain;
    display: inline-block;
}

/* Jackpot Winners Container */
.jackpot-winners {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.jackpot-winner-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.jackpot-winner-title i[data-icon="trophy"] {
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23d4af37"><path d="M20 7h-2.18c.11-.31.18-.65.18-1a2.996 2.996 0 0 0-5.5-1.65l-.5.67-.5-.68C10.96 3.54 10.05 3 9 3 7.34 3 6 4.34 6 6c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V9c0-1.11-.89-2-2-2z"/></svg>') no-repeat center;
    background-size: contain;
    display: inline-block;
}

/* Winners Ticker Container */
.winners-ticker-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
}

.winners-ticker {
    height: 100%;
    overflow: hidden;
}

.winners-ticker ul {
    list-style: none;
    margin: 0;
    padding: 0;
    animation: scroll-winners 30s linear infinite;
}

@keyframes scroll-winners {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.winners-ticker:hover ul {
    animation-play-state: paused;
}

.winners-ticker li {
    display: flex;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.winners-ticker li:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(212, 175, 55, 0.2);
}

.winners-ticker li picture,
.winners-ticker li img {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.winner-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 0;
}

.winner-info > div:first-child {
    font-weight: bold;
    color: #fff;
    font-size: 11px;
}

.winner-info > div:nth-child(2) {
    color: #4CAF50;
    font-weight: bold;
    font-size: 11px;
}

.winner-info > div:last-child {
    color: #666;
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.winner-amount {
    font-family: 'Open24DisplaySt', Arial, sans-serif;
}

/* Arcade Link */
.popular-games [data-section="left"] .arcade-link {
    display: block;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.popular-games [data-section="left"] .arcade-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(212, 175, 55, 0.3);
}

.popular-games [data-section="left"] .arcade-link picture,
.popular-games [data-section="left"] .arcade-link img {
    display: block;
    width: 100%;
    height: auto;
}

/* Right Content Area */
.popular-games [data-section="right"] {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    overflow: hidden;
}

/* Tabs Navigation */
.nav-tabs.target-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: none;
    margin-bottom: 15px;
    list-style: none;
    padding: 0;
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-tabs.target-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tabs.target-tabs li {
    flex: 0 0 auto;
}

.nav-tabs.target-tabs li a {
    display: block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-tabs.target-tabs li a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
}

.nav-tabs.target-tabs li.active a {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}

.nav-tabs.target-tabs li a picture,
.nav-tabs.target-tabs li a img {
    display: block;
    height: 28px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
}

/* Tab Content */
.tab-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.tab-pane {
    display: none;
    position: relative;
    height: 100%;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animated Mascot Image - Besar di Kanan, Memenuhi Tinggi Container */
.animated-image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: auto;
    height: 100%;
    max-height: 285px;
    max-width: 450px;
    z-index: 10;
    opacity: 1;
    pointer-events: none;
    filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.4)) drop-shadow(0 0 80px rgba(212, 175, 55, 0.2));
    object-fit: contain;
    object-position: bottom right;
}

/* Popular Game List - 2 kolom x 3 baris (6 games) */
.popular-game-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    position: relative;
    z-index: 1;
    max-width: 400px;
    height: 100%;
    max-height: 280px;
}

.popular-game-list .game-item {
    position: relative;
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: 100%;
}

.popular-game-list .game-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-color: rgba(212, 175, 55, 0.3);
    z-index: 5;
}

.popular-game-list .game-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.popular-game-list .game-wrapper picture,
.popular-game-list .game-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.popular-game-list .game-item:hover .game-wrapper img {
    transform: scale(1.05);
}

.popular-game-list .link-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popular-game-list .game-item:hover .link-container {
    opacity: 1;
}

.popular-game-list .play-now {
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    color: #000;
    padding: 8px 20px;
    border-radius: 18px;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.popular-game-list .play-now:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.6);
}

/* Responsive Styles */
@media (max-width: 1400px) {
    .animated-image {
        max-height: 270px;
        max-width: 420px;
    }
    
    .popular-game-list {
        max-width: 380px;
        max-height: 270px;
    }
}

@media (max-width: 1200px) {
    .popular-games {
        padding: 25px 15px;
        gap: 15px;
        height: 320px;
    }
    
    .popular-games [data-section="left"] {
        flex: 0 0 220px;
    }
    
    .popular-game-list {
        gap: 8px;
        max-width: 360px;
        max-height: 260px;
    }
    
    .animated-image {
        max-height: 260px;
        max-width: 380px;
    }
}

@media (max-width: 992px) {
    .popular-games {
        flex-direction: column;
        padding: 20px 15px;
        height: auto;
    }
    
    .popular-games [data-section="left"] {
        flex: 0 0 auto;
        height: auto;
    }
    
    .jackpot-winners {
        min-height: 280px;
    }
    
    .winners-ticker-container {
        max-height: 280px;
    }
    
    .popular-game-list {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        max-width: 100%;
        max-height: 400px;
    }
    
    .animated-image {
        max-height: 300px;
        max-width: 350px;
        right: 10px;
        bottom: 10px;
    }
}

@media (max-width: 768px) {
    .popular-games {
        padding: 15px 10px;
    }
    
    .section-title {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .jackpot-winners {
        padding: 10px;
        min-height: 250px;
    }
    
    .jackpot-winner-title {
        font-size: 10px;
    }
    
    .winners-ticker li {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .winners-ticker li picture,
    .winners-ticker li img {
        width: 40px;
        height: 40px;
    }
    
    .nav-tabs.target-tabs {
        gap: 6px;
    }
    
    .nav-tabs.target-tabs li a {
        padding: 5px 10px;
    }
    
    .nav-tabs.target-tabs li a img {
        height: 24px;
        max-width: 70px;
    }
    
    .popular-game-list {
        gap: 8px;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        max-height: 350px;
    }
    
    .animated-image {
        max-height: 250px;
        max-width: 280px;
        right: 5px;
        bottom: 5px;
    }
}

@media (max-width: 576px) {
    .popular-games {
        padding: 12px 8px;
    }
    
    .popular-games [data-section="left"] {
        gap: 12px;
    }
    
    .section-title {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .jackpot-winners {
        min-height: 220px;
    }
    
    .winners-ticker-container {
        max-height: 220px;
    }
    
    .popular-game-list {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 8px;
        max-height: none;
    }
    
    .popular-game-list .game-wrapper picture,
    .popular-game-list .game-wrapper img {
        aspect-ratio: 1;
        height: auto;
    }
    
    .animated-image {
        display: none;
    }
}
