/* ==================================
   MINZZ SHOP - FINAL FIXED STYLE
   ================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-dark: #0a0f2c;
  --bg-card: #0f172a;
  --primary: #00bfff;
  --border: #0056b3;
  --text-main: #fff;
  --text-dim: #94a3b8;
  --danger: #ff4d6d;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* --- HEADER --- */
.sticky-header {
  position: sticky; top: 0; z-index: 999;
  background-color: var(--bg-card); padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 2px solid var(--primary);
}
.left-header { display: flex; align-items: center; gap: 15px; }
.hamburger { font-size: 26px; color: var(--primary); cursor: pointer; display: flex; align-items: center;}
.logo img { height: 32px; } /* Logo disesuaikan */

.right-header { display: flex; align-items: center; gap: 12px; }
.search-container { display: none; } 
.profile-icon img { 
    width: 38px; height: 38px; 
    border-radius: 50%; 
    border: 2px solid var(--primary);
    object-fit: cover;
}

/* --- SIDEBAR --- */
#overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); z-index: 1000;
  opacity: 0; visibility: hidden; transition: 0.3s;
  backdrop-filter: blur(3px);
}
#overlay.active { opacity: 1; visibility: visible; }

.sidebar {
  position: fixed; top: 0; left: -280px; width: 260px; height: 100%;
  background: var(--bg-card); z-index: 1001; transition: 0.3s;
  padding: 20px; display: flex; flex-direction: column;
  box-shadow: 4px 0 15px rgba(0,0,0,0.5);
}
.sidebar.open { left: 0; }

.sidebar-header { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}
.sidebar-header h3 { font-size: 18px; color: var(--primary); display: flex; gap: 10px; align-items: center;}

.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.sidebar-menu li a {
  display: flex; gap: 12px; padding: 12px 10px; color: #ddd;
  font-size: 14px; align-items: center; border-radius: 8px;
  transition: 0.2s;
}
.sidebar-menu li a:hover, .sidebar-menu li a.active {
  background: rgba(0, 191, 255, 0.1); color: var(--primary);
}
.sidebar-menu i { width: 20px; text-align: center; }

/* Tombol Logout di Sidebar */
.menu-logout { color: var(--danger) !important; margin-top: 20px; border: 1px solid var(--danger); }

/* --- HERO BANNER --- */
.hero-section { padding: 16px; width: 100%; margin-bottom: 10px;}
.banner-slider { display: flex; overflow-x: auto; gap: 10px; scroll-snap-type: x mandatory; }
.banner-slide { min-width: 100%; scroll-snap-align: center; }
.banner-slide img { width: 100%; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.3);}
.banner-slider::-webkit-scrollbar { display: none; }

/* --- TITLES --- */
.section-title {
  font-size: 16px; font-weight: 700; margin: 25px 16px 15px;
  display: flex; align-items: center; gap: 10px;
  border-left: 4px solid var(--primary); padding-left: 12px;
  letter-spacing: 0.5px;
}

/* --- SEARCH BOX --- */
.search-wrapper { padding: 0 16px 10px; }
#searchGame {
    width: 100%; padding: 12px 15px; border-radius: 10px;
    background: #1e2b4a; border: 1px solid rgba(0,191,255,0.3);
    color: white; font-size: 14px; outline: none;
}
#searchGame:focus { border-color: var(--primary); }

/* --- 🔥 POPULAR GAME (SLIDER) --- */
.scrolling-wrapper-container {
  width: 100%; overflow: hidden; padding: 5px 0 20px;
}
.scrolling-wrapper {
  display: flex; gap: 12px; width: max-content;
  animation: scrollLeft 20s linear infinite; padding-left: 16px;
}
@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* Styling Card Popular (Sama dengan Mobile Game tapi fix width) */
.slider-card {
  width: 120px; flex-shrink: 0; position: relative;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(0,191,255,0.15); background: #1e2b4a;
}
.slider-img-wrapper { width: 100%; padding-top: 100%; position: relative; }
.slider-img { position: absolute; top:0; left:0; width:100%; height:100%; object-fit: cover; }

/* --- 🎮 GAME CARD STYLE (RApiKAN TEXT DISINI) --- */
.game-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); 
  gap: 12px; padding: 0 16px 30px;
}
.game-card {
  background: #1e2b4a; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(0,191,255,0.15); position: relative;
  transition: transform 0.1s;
}
.game-card:active { transform: scale(0.97); border-color: var(--primary); }

.game-img-wrapper { width: 100%; padding-top: 100%; position: relative; }
.game-img { position: absolute; top:0; left:0; width:100%; height:100%; object-fit: cover; }

/* Overlay Text yang Diperbaiki */
.game-overlay, .slider-overlay {
  position: absolute; bottom: 0; left: 0; width: 100%;
  /* Gradient lebih halus agar text terbaca */
  background: linear-gradient(to top, rgba(10, 15, 44, 0.95) 10%, rgba(10, 15, 44, 0.7) 50%, transparent 100%);
  padding: 35px 5px 8px; /* Padding atas luas untuk gradient */
  display: flex; align-items: flex-end; justify-content: center;
}

.game-title, .slider-title {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8); /* Shadow text biar timbul */
  line-height: 1.3;
  /* Pastikan text tidak berantakan */
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
  width: 95%;
}

/* --- FOOTER --- */
.footer {
  background: var(--bg-card); padding: 30px 20px 10px;
  margin-top: auto; border-top: 2px solid var(--primary);
}
.footer-container { display: flex; flex-wrap: wrap; gap: 25px; }
.footer-about { width: 100%; margin-bottom: 10px; text-align: center; }
.footer-about p { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-top: 10px;}
.footer-links-group { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; }
.footer-contact { width: 100%; margin-top: 5px; }
.footer h4 { color: #fff; margin-bottom: 12px; font-size: 15px; border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 3px; }
.footer a, .footer p { display: block; color: var(--text-dim); font-size: 13px; margin-bottom: 8px; }
.footer-bottom { text-align: center; margin-top: 30px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 12px; color: #777; }

/* Desktop Tweak */
@media (min-width: 768px) {
  .hamburger { display: none; }
  .search-container { display: block; }
  .game-grid { grid-template-columns: repeat(5, 1fr); max-width: 1200px; margin: 0 auto; }
  .hero-section { max-width: 1200px; margin: 0 auto; }
  .footer-container { flex-wrap: nowrap; max-width: 1200px; margin: auto;}
  .footer-about { width: 30%; text-align: left;}
  .footer-links-group { width: 40%; }
  .footer-contact { width: 30%; }
}
/* --- FIX UNTUK KAWAL VISIBILITI IKON PROFIL HEADER --- */
/* Ini diperlukan untuk override default display flex pada right-header */
#headerProfileContainer.hidden {
    display: none !important;
}

/* ==================================
   MODAL POP-UP (WELCOME)
   ================================== */
.modal-popup-minzz {
    position: fixed;
    z-index: 10000; /* Pastikan di atas semua elemen lain */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    display: none; /* Default tersembunyi */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.modal-popup-minzz.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-popup-content {
    background-color: var(--card-background); /* #1a1a1a */
    margin: auto;
    padding: 20px;
    border: 1px solid #333;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 400px; /* Batasi lebar agar fokus */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: fadeInScale 0.3s ease-out;
}

.modal-banner-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
}

.modal-title-minzz {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 10px;
    text-align: center;
}

.modal-text-minzz {
    color: var(--text-dim);
    font-size: 1rem;
    text-align: center;
    margin-bottom: 20px;
}

.close-button-minzz {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button-minzz:hover,
.close-button-minzz:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-close-btn-minzz {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    transition: background-color 0.2s ease;
}

.modal-close-btn-minzz:hover {
    background-color: #0099cc;
}

/* Animasi */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsif */
@media (max-width: 600px) {
    .modal-popup-content {
        width: 95%;
        padding: 15px;
    }
    .modal-title-minzz {
        font-size: 1.2rem;
    }
}
