/* ==================== Variables ==================== */
:root {
  --bg: #f6fbff;
  --card: #ffffff;
  --blue-1: #e6f0ff;
  --blue-2: #2b6ef6;
  --accent: #0b63e5;
  --muted: #6b7280;
  --shadow: 0 8px 22px rgba(37,78,190,0.07);
  --glass: rgba(255,255,255,0.8);
  --radius: 14px;
}

/* ==================== Global ==================== */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  color: #0f172a;
  background: var(--bg);
}

/* ==================== Topbar ==================== */
.topbar {
  background: linear-gradient(90deg, var(--blue-1), var(--blue-2));
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 6px 18px rgba(43,110,246,0.08);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  padding: 6px;
}

.brand-text {
  color: white;
  font-weight: 600;
  font-size: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.balance {
  background: rgba(255,255,255,0.12);
  padding: 8px 12px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
}

.icon-btn, .menu-btn {
  background: transparent;
  border: 0;
  color: white;
  cursor: pointer;
}

.icon-btn { font-size: 18px; }
.menu-btn { font-size: 20px; }

.badge {
  background: #ff3b3b;
  color: white;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 12px;
  margin-left: 6px;
}

/* ==================== Drawer ==================== */
.drawer {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 320px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: 2px 12px 40px rgba(2,6,23,0.12);
  z-index: 80;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.drawer.show { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-sm { width: 40px; height: 40px; }

.drawer-title { font-weight: 700; }

.close-btn {
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.drawer-nav {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-nav a {
  padding: 12px;
  border-radius: 10px;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
}

.drawer-footer {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
}

/* ==================== Page / Hero ==================== */
.page { max-width: 1100px; margin: 22px auto; padding: 0 18px; }

.hero {
  display: flex;
  gap: 20px;
  align-items: center;
}

.hero-left h1 {
  margin: 0;
  font-size: 28px;
  color: #0b2f5a;
}

.lead { color: var(--muted); margin-top: 6px; }

.promo-card {
  background: linear-gradient(135deg, #2563eb, #0b2f5a);
  color: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-bottom: 12px;
}

/* ==================== Notifications ==================== */
.inpage-notif {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  display: none;
  z-index: 9999;
  transition: all 0.3s ease-in-out;
}

.hidden { display: none !important; }

/* Floating notifications */
.notif-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  z-index: 9999;
}

.notif-card {
  background: linear-gradient(135deg, #2563eb, #0b2f5a);
  color: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.2);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: start;
  opacity: 0;
  transform: translateX(120%);
  transition: all 0.4s cubic-bezier(0.68,-0.55,0.27,1.55);
  pointer-events: auto;
}

.notif-card.show { opacity: 1; transform: translateX(0); }

.notif-card .notif-text { flex: 1; padding-right: 8px; }

.notif-card .close-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 12px;
  flex-shrink: 0;
  font-size: 12px;
}

/* Inbox notifications */
.notif-inbox {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 320px;
  max-height: 60vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.15);
  overflow-y: auto;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.notif-inbox.hidden { display: none; }

.notif-inbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 1px solid #e5e7eb;
}

.notif-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
}

.notif-inbox-list .notif {
  background: #f6f9ff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: #0b2f5a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
}

/* Slide-in animation for inbox */
@keyframes slideIn {
  0% { opacity: 0; transform: translateX(50px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ==================== Games ==================== */
.games { margin-top: 20px; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.game-card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-thumb {
  height: 140px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef5ff;
}

.game-title { font-weight: 700; }

.game-desc { color: var(--muted); font-size: 14px; }

.play-btn {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 10px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.preview-btn {
  background: transparent;
  border: 1px solid #dbeafe;
  padding: 8px;
  border-radius: 10px;
  color: var(--accent);
  cursor: pointer;
}

/* ==================== Footer ==================== */
.footer {
  margin-top: 34px;
  padding: 18px 0;
  background: transparent;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  color: var(--muted);
}

/* ==================== Responsive ==================== */
@media (max-width: 700px) {
  .topbar-inner { padding: 0 10px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); }
}
.section-title {
  margin-top: 25px;
  padding-left: 5px;
  font-size: 18px;
  color: #bcdcff;
  font-weight: bold;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 25px;
}

.ugame-card {
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}

.ugame-card:hover {
  transform: translateY(-4px);
}

.ugame-thumb {
  width: 100%;
  height: 95px;
  object-fit: cover;
  background: #1e293b;
}

.ugame-body {
  padding: 10px;
  color: #e5e7eb;
}

.ugame-body b {
  font-size: 15px;
}

.ugame-type {
  font-size: 12px;
  color: #60a5fa;
}