/* CSS untuk tombol kontrol musik */
.music-control-btn {
    position: fixed; /* Membuat tombol tetap di posisinya saat di-scroll */
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: #8a2be2; /* Warna ungu yang sama dengan tombol Beli Fitur */
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999; /* Memastikan tombol di atas elemen lain */
    transition: transform 0.3s;
}

.music-control-btn:hover {
    transform: scale(1.1);
}

/* General CSS */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Roboto', sans-serif;
    background-color: #121212;
    color: #fff;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden; /* Prevent horizontal scroll from overflow */
}
header {
    background-color: #1e1e1e;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid gold;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo { 
    font-size: 28px; 
    font-weight: bold; 
    color: gold;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo i {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}
nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
}
nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: gold;
    transition: width 0.3s;
}
nav ul li a:hover::after {
    width: 100%;
}
nav ul li a:hover {
    color: gold;
}
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}
.auth-buttons button {
    margin-left: 10px;
    padding: 8px 18px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.login { background-color: #333; color: white; }
.login:hover { background-color: #555; transform: translateY(-2px); }
.register { background-color: red; color: white; }
.register:hover { background-color: darkred; transform: translateY(-2px); }
.banner {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}
.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.slide.active { opacity: 1; z-index: 1; }
.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.6);
    padding: 40px 60px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.banner-text h1 { 
    font-size: 36px; 
    margin-bottom: 10px; 
    color: gold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.banner-text p { 
    font-size: 18px; 
    color: #ddd;
    margin-bottom: 20px;
}
.banner-btn {
    padding: 12px 30px;
    background-color: gold;
    color: black;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}
.banner-btn:hover {
    background-color: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}
.content {
    padding: 40px 20px;
    max-width: 1100px;
    margin: auto;
}
.content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: gold;
    border-left: 4px solid gold;
    padding-left: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cards {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}
.card {
    background-color: #1f1f1f;
    padding: 20px;
    border-radius: 10px;
    flex: 1 1 calc(33.333% - 20px);
    min-width: 280px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, gold, red);
}
.card h3 { 
    color: gold; 
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card p { color: #ccc; }
.newsletter {
    margin-top: 50px;
    background-color: #1b1b1b;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #333;
}
.newsletter h2 {
    color: gold;
    margin-bottom: 15px;
}
.newsletter p {
    margin-bottom: 20px;
    color: #aaa;
}
.newsletter-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.newsletter input {
    padding: 12px;
    width: 300px;
    border-radius: 5px;
    border: none;
    background-color: #333;
    color: white;
}
.newsletter button {
    padding: 12px 25px;
    background-color: gold;
    color: black;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.newsletter button:hover {
    background-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(255, 215, 0, 0.3);
}
.game-carousel {
    margin: 40px 0;
}
.game-carousel h2 {
    margin-bottom: 30px;
}
.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.carousel-container::-webkit-scrollbar {
    display: none;
}
.game-item {
    min-width: 250px;
    background-color: #1f1f1f;
    border-radius: 10px;
    overflow: hidden;
    scroll-snap-align: start;
    transition: all 0.3s;
    position: relative;
}
.game-item:hover {
    transform: scale(1.05);
}
.game-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.game-info {
    padding: 15px;
}
.game-info h3 {
    color: gold;
    margin-bottom: 5px;
}
.game-info p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 10px;
}
.game-rating {
    color: gold;
    display: flex;
    align-items: center;
    gap: 5px;
}
.game-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: red;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}
.live-streams {
    margin: 40px 0;
}
.stream-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.stream-card {
    background-color: #1f1f1f;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}
.stream-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}
.stream-thumbnail {
    position: relative;
}
.stream-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.live-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: red;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}
.viewer-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.stream-info {
    padding: 15px;
}
.stream-info h3 {
    color: white;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.streamer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.streamer-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.streamer-name {
    color: #aaa;
    font-size: 14px;
}
.stats {
    display: flex;
    gap: 30px;
    margin: 50px 0;
    text-align: center;
    justify-content: center;
    flex-wrap: wrap;
}
.stat-item {
    background-color: #1f1f1f;
    padding: 20px 30px;
    border-radius: 10px;
    min-width: 150px;
}
.stat-number {
    font-size: 36px;
    color: gold;
    font-weight: bold;
    margin-bottom: 5px;
}
.stat-label {
    color: #aaa;
    font-size: 14px;
}
footer {
    background-color: #1a1a1a;
    padding: 40px 25px;
    margin-top: 50px;
    border-top: 2px solid gold;
}
.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}
.footer-column h3 {
    color: gold;
    margin-bottom: 15px;
    font-size: 18px;
}
.footer-column ul {
    list-style: none;
}
.footer-column ul li {
    margin-bottom: 10px;
}
.footer-column ul li a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-column ul li a:hover {
    color: gold;
}
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}
.social-links a {
    color: white;
    background-color: #333;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.social-links a:hover {
    background-color: gold;
    color: black;
    transform: translateY(-3px);
}
.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #777;
}
.dark-mode {
    background-color: #000;
    color: white;
}
.toggle-darkmode {
    cursor: pointer;
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toggle-darkmode:hover {
    background-color: #444;
}
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: gold;
    color: black;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.back-to-top.visible {
    opacity: 1;
}
.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 2px solid gold;
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}
.close-modal:hover {
    color: gold;
}
.modal h2 {
    color: gold;
    margin-bottom: 20px;
    text-align: center;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
}
.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #333;
    border: none;
    border-radius: 5px;
    color: white;
}
.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: gold;
    color: black;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.submit-btn:hover {
    background-color: #ffd700;
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    .header-top {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .mobile-menu-btn {
        display: block;
    }
    nav {
        width: 100%;
        display: none;
        margin-top: 15px;
    }
    nav.active {
        display: block;
    }
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    .auth-buttons {
        margin-top: 15px;
        width: 100%;
        justify-content: center;
    }
    .banner-text {
        padding: 20px;
        width: 90%;
    }
    .banner-text h1 {
        font-size: 24px;
    }
    .banner-text p {
        font-size: 16px;
    }
    .newsletter-form {
        flex-direction: column;
    }
    .newsletter input {
        width: 100%;
    }
    .newsletter button {
        width: 100%;
    }
}
/* Tambahkan di bagian akhir file style.css */
.header-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.header-credits {
    background-color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid gold;
}

.header-credits .fa-coins {
    color: gold;
}

.profile-link {
    color: gold;
    text-decoration: none;
    font-weight: bold;
}

.topup-btn {
    background-color: #2E8B57; /* Hijau */
}

.header-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* ===== CSS UNTUK LIVE CHAT ===== */
#chat-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

#chat-bubble {
    width: 60px;
    height: 60px;
    background-color: gold;
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

#chat-bubble:hover {
    transform: scale(1.1);
}

#chat-window {
    position: absolute;
    bottom: 80px; /* Jarak dari bubble */
    right: 0;
    width: 350px;
    height: 450px;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
    transform-origin: bottom right;
}

#chat-window.hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.chat-header {
    background-color: #333;
    color: gold;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

#close-chat-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.4;
}

.message.sent {
    background-color: gold;
    color: black;
    align-self: flex-end; /* Pesan terkirim di kanan */
    border-bottom-right-radius: 4px;
}

.message.received {
    background-color: #3a3a3a;
    color: white;
    align-self: flex-start; /* Pesan diterima di kiri */
    border-bottom-left-radius: 4px;
}

.chat-footer {
    padding: 10px;
    background-color: #333;
    border-top: 1px solid #444;
}

#chat-form {
    display: flex;
    gap: 10px;
}

#chat-input {
    flex-grow: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #555;
    background-color: #1e1e1e;
    color: white;
}

#chat-form button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background-color: gold;
    color: black;
    font-size: 18px;
    cursor: pointer;
}