:root {
  --bg: #060a12;
  --panel: rgba(15, 23, 36, 0.84);
  --panel-2: rgba(21, 33, 50, 0.92);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(66, 223, 255, 0.28);
  --text: #eef5ff;
  --muted: #93a6c2;
  --cyan: #42dfff;
  --gold: #ffcf47;
  --green: #6cf0a0;
  --red: #ff7893;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 16px 36px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  background-image:
    radial-gradient(circle at 12% 0%, rgba(66, 223, 255, 0.18), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(255, 207, 71, 0.14), transparent 26%),
    linear-gradient(180deg, #070c16 0%, #050811 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

/* Topbar & Navigation Shell */
.rb-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 12, 22, 0.84);
  border-bottom: 1px solid var(--line);
}

.rb-topbar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.rb-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.rb-brand-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: #051018;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  font-weight: 900;
  font-size: 13px;
}

.rb-stats-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--muted);
}

.rb-chip strong {
  color: var(--gold);
  font-weight: 800;
}

.rb-chip.cyan strong {
  color: var(--cyan);
}

.rb-nav {
  background: rgba(10, 17, 30, 0.78);
  border-bottom: 1px solid var(--line);
}

.rb-nav-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.rb-nav-link {
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.rb-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.rb-nav-link.active {
  color: #f3fbff;
  background: rgba(66, 223, 255, 0.14);
  border-color: rgba(66, 223, 255, 0.35);
}

/* Main Container & Cards */
.rb-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 20px 18px 48px;
}

.rb-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.rb-hero h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.rb-hero p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.rb-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.rb-card {
  background: linear-gradient(180deg, var(--panel), rgba(10, 16, 27, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.rb-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.rb-stat-val {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* Buttons */
.rb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 207, 71, 0.35);
  background: linear-gradient(180deg, var(--gold), #f5b324);
  color: #061018;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, opacity 0.14s ease;
}

.rb-btn:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.rb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rb-btn.secondary {
  border-color: rgba(66, 223, 255, 0.35);
  background: linear-gradient(180deg, var(--cyan), #22b4d8);
  color: #041018;
}

.rb-btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: var(--text);
}

.rb-btn.danger {
  background: rgba(255, 120, 147, 0.14);
  border-color: rgba(255, 120, 147, 0.35);
  color: var(--red);
}

/* Toast Notification */
.rb-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: rgba(11, 20, 34, 0.96);
  color: var(--text);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rb-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Bottom Bar Mobile (Rumah, Stik Game, Garis 3) */
.rb-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(7, 12, 22, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

.rb-bottom-inner {
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rb-bottom-btn {
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.15s ease;
}

.rb-bottom-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rb-bottom-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

.rb-bottom-btn.active {
  color: var(--cyan);
  border-color: rgba(66, 223, 255, 0.42);
  background: rgba(66, 223, 255, 0.14);
}

/* Drawer Menu saat klik Garis 3 */
.rb-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(3, 7, 14, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.rb-drawer-backdrop.open {
  display: flex;
}

.rb-drawer-sheet {
  width: 100%;
  max-width: 520px;
  background: #0d1626;
  border-top: 1px solid var(--line-strong);
  border-radius: 20px 20px 0 0;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
}

.rb-drawer-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 900px) {
  .rb-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .rb-bottom-nav {
    display: block;
  }

  .rb-container {
    padding-bottom: 86px;
  }

  .rb-toast {
    bottom: 76px;
  }
}

@media (max-width: 520px) {
  .rb-container {
    padding: 14px 12px 86px;
  }

  .rb-grid-4 {
    grid-template-columns: 1fr;
  }
}
