/* --- BASE LAYOUT --- */
*,
*::before,
*::after {
  box-sizing: border-box; /* ensures padding/border don't break layout */
}

body {
  background: #0b111a;
  color: #fff;
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* --- HEADER --- */
.header { 
  display: flex;
  justify-content: space-between; 
  align-items: center; 
  background: #131b26; 
  padding: 15px 30px; 
  border-bottom: 1px solid #1e293b; 
  z-index: 9999; 
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  top: 0;
}

.logo img {
  height: 40px;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.nav li {
  cursor: pointer;
  color: #aaa;
  font-weight: 600;
  transition: color 0.2s;
}

.nav li:hover {
  color: #f7284a;
}

.header-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.header-buttons .signin {
  background: #1e2633;
  color: #fff;
  margin-right: 10px;
}

.header-buttons .signup {
  background: #ff002b;
  color: #000;
}

.header-buttons .signup:hover {
  background: #f7284a;
}

/* --- LOGGED-IN HEADER STYLE --- */
.user-dashboard {
  display: flex;
  align-items: center;
  gap: 12px;
}

.balance-box {
  display: flex;
  align-items: center;
  background: #1e2633;
  border-radius: 8px;
  padding: 6px 12px;
  gap: 6px;
  min-width: 90px;
}

.balance-icon {
  width: 20px;
  height: 20px;
}

.balance-amount {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
}

.deposit-btn {
  background: #ff002b;
  border: none;
  color: #000;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: 0.2s;
}

.deposit-btn:hover {
  background: #f7284a;
}

.icon-btn {
  background: #1e2633;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: #2a3343;
}

.profile-pic img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #f7284a;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.profile-pic img:hover {
  transform: scale(1.05);
}

/* --- HERO SECTION --- */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #131b26;
  margin: 90px auto 30px auto;
  max-width: 1100px;
  border-radius: 12px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  flex: 1 1 50%;
  max-width: 50%;
  z-index: 2;
}

.hero-content h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-content p {
  color: #ccc;
  line-height: 1.4;
  font-size: 16px;
}

.hero .highlight {
  color: #ff002b;
  font-weight: 700;
}

.join-btn {
  margin-top: 20px;
  background: #ff002b;
  color: #000;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.join-btn:hover {
  background: #f7284a;
}

.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 0 0 12px;
}

/* --- CATEGORY GRID --- */
.categories {
  max-width: 1100px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.bottom-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

/* --- CATEGORY CARD --- */
.category-card {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px #f7284a;
}

/* --- CARD OVERLAY --- */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px 20px;
  
  );
}

.overlay h3 {
  font-size: 33px;
  font-weight: 700;
  margin: 0;
  align-self: flex-start;
}

.overlay p {
  font-size: 14px;
  color: #ccc;
  margin: 0;
  align-self: flex-start;
}

/* --- BACKGROUND IMAGES --- */
.casino { background-image: url('../../img/casss'); }
.sports { background-image: url('../../img/sportss'); }
.poker { background-image: url('https://i.imgur.com/Vq9vLUi.jpeg'); }
.racing { background-image: url('https://i.imgur.com/hfJZz5I.jpeg'); }
.lottery { background-image: url('https://i.imgur.com/DyO9R4N.jpeg'); }
.updown { background-image: url('../../img/crash/redrocket.png'); }
.bingo { background-image: url('https://i.imgur.com/7CwU9V1.jpeg'); }

.category-card.large { height: 200px; }
.category-card.small { height: 150px; }

/* --- ORIGINALS SECTION --- */
.originals {
  max-width: 1100px;
  margin: 40px auto;
  position: relative;
}

.originals h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  margin-left:11px;
}

/* SCROLL AREA */
.game-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  position: relative;
  cursor: grab;
  scroll-snap-type: x proximity;
  margin-left:8px;
}

.game-scroll::-webkit-scrollbar {
  display: none;
}

/* GAME CARDS */
.game-card {
  position: relative;
  flex: 0 0 auto;
  width: 132px;
  height: 173px;
  border-radius: 12px;
  overflow: hidden;
  background: #1a2533;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: #fff;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 10px rgba(0, 255, 100, 0.4);
}

.game-name {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-weight: 700;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 6px;
  border-radius: 6px;
}

/* SCROLL BUTTONS */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(50, 50, 50, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: background 0.2s, opacity 0.3s ease;
  z-index: 5;
}

.scroll-btn:hover {
  background: rgba(80, 80, 80, 0.7);
}

.originals:hover .scroll-btn {
  opacity: 1;
}

.scroll-left {
  left: -15px;
}

.scroll-right {
  right: -15px;
}

/* --- FOOTER --- */
.footer {
  text-align: center;
  padding: 20px;
  background: #131b26;
  border-top: 1px solid #1e293b;
  color: #888;
  font-size: 14px;
}

/* --- MOBILE NAV --- */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #131b26;
  border-top: 1px solid #1e293b;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ccc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-item i {
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
}

.nav-item:hover {
  color: #00ff66;
}

/* --- LOGIN / REGISTER POPUPS --- */
.login-popup, .register-popup {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.login-popup-content, .register-popup-content {
  background: #131b26;
  border-radius: 12px;
  padding: 20px 30px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  position: relative;
  color: #fff;
  text-align: right;
  animation: slideUp 0.3s ease;
}

.login-popup-content input, .register-popup-content input, .register-popup-content select {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  margin-bottom: 14px;
  border: 1px solid #1e293b;
  border-radius: 6px;
  background-color: #0b111a;
  color: #fff;
  font-size: 14px;
}

.login-popup-content button, .register-popup-content button {
  width: 100%;
  padding: 12px;
  background: #ff002b;
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.login-popup-content button:hover, .register-popup-content button:hover {
  background: #f7284a;
}

.close, .close-r {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 26px;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover, .close-r:hover {
  color: #00ff66;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- RESPONSIVE (MOBILE) --- */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  body { padding-top: 5px; }

  .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background: #131b26;
    border-bottom: 1px solid #1e293b;
    z-index: 10000;
  }

  .logo img { height: 28px; }
  .nav { display: none; }
  .header-buttons { display: flex; align-items: center; gap: 8px; }
  .header-buttons .signin,
  .header-buttons .signup { font-size: 13px; padding: 6px 10px; }

  .hero {
    width: 96%;
    border-radius: 15px;
    flex-direction: row;
    align-items: flex-start;
    padding: 15px;
    min-height: 200px;
    margin-top: 90px;
  }
   .overlay p{display:none;}
  .hero-content { max-width: 60%; z-index: 2; }
  .hero-content h2 { font-size: 20px; margin-bottom: 6px; }
  .hero-content p { font-size: 14px; line-height: 1.3; }
  .join-btn { font-size: 14px; padding: 6px 12px; }
  .hero-image { position: absolute; top: 0; right: 0; width: 50%; height: 100%; z-index: 1; }
    .hero-image img {
        width: 130%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }

  .categories { padding-bottom: 80px; }
  .top-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .bottom-row { grid-template-columns: repeat(4, 1fr); gap: 8px; margin:0 auto; width:95.5%; }
  .category-card.large { height: 105px;margin:0 auto; width:93%}
  .category-card.small { height: 100px; }
  .overlay h3 { font-size: 22px; }
  .game-card { width: 96px; height: 132px; }
  .game-name { font-size: 12px; }
  .mobile-nav { display: flex; }
}
