/* ========================================
   MB66 Shared Page Layout
   Common header, footer bar, and base styles
   for Promotion, Account, Deposit pages
   ======================================== */

:root {
  --mb-primary: #d4453d;
  --mb-primary-dark: #b8302a;
  --mb-accent: #ff0000;
  --mb-gold: #ffd700;
  --mb-bg: #f5f5f5;
  --mb-card: #fff;
  --mb-text: #333;
  --mb-text-light: #666;
  --mb-text-muted: #999;
  --mb-border: #eee;
  --mb-radius: 10px;
  --mb-shadow: 0 2px 8px rgba(0,0,0,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--mb-bg);
  color: var(--mb-text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px; /* space for bottom bar */
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* --- Page Header --- */
.page-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center;
  height: 50px; padding: 0 12px;
  background: var(--mb-primary);
  color: #fff;
}
.page-header__back {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; border-radius: 50%;
  transition: background .2s;
}
.page-header__back:hover { background: rgba(255,255,255,.15); }
.page-header__title {
  flex: 1; text-align: center;
  font-size: 17px; font-weight: 600;
  margin-right: 36px; /* offset for back button centering */
}

/* --- Bottom Navigation Bar --- */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: stretch;
  height: 56px;
  background: #fff;
  border-top: 2px solid #e8e8e8;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-bar__item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; color: #888;
  transition: color .2s;
  position: relative;
}
.bottom-bar__item i { font-size: 18px; }
.bottom-bar__item--active { color: var(--mb-primary); font-weight: 600; }
.bottom-bar__item--deposit {
  margin-top: -18px;
}
.bottom-bar__item--deposit .deposit-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #ff4444, #d4453d);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(212,69,61,.4);
}
.bottom-bar__item--deposit .deposit-circle i {
  font-size: 22px; color: #fff;
}
.bottom-bar__item--deposit span { margin-top: 2px; }

/* --- Section / Card --- */
.page-content { padding: 12px; }

.card {
  background: var(--mb-card);
  border-radius: var(--mb-radius);
  box-shadow: var(--mb-shadow);
  overflow: hidden;
  margin-bottom: 12px;
}
.card__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  font-size: 15px; font-weight: 600;
  border-bottom: 1px solid var(--mb-border);
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 24px;
  border-radius: 22px; font-size: 15px; font-weight: 600;
  transition: opacity .2s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn--primary {
  background: linear-gradient(135deg, #ff4444, var(--mb-primary));
  color: #fff;
}
.btn--outline {
  border: 1.5px solid var(--mb-primary);
  color: var(--mb-primary);
  background: #fff;
}
.btn--block { width: 100%; }
.btn--sm { height: 36px; padding: 0 16px; font-size: 13px; border-radius: 18px; }

/* --- Tags / Badges --- */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
}
.badge--hot { background: var(--mb-accent); color: #fff; }
.badge--new { background: #ff9800; color: #fff; }
.badge--vip { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #333; }

/* --- Empty state --- */
.empty-state {
  text-align: center; padding: 48px 20px; color: var(--mb-text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }

/* --- Desktop widths --- */
@media (min-width: 768px) {
  .page-content { max-width: 480px; margin: 0 auto; }
  .bottom-bar { max-width: 480px; left: 50%; transform: translateX(-50%); }
}
