@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Unbounded:wght@500;600;700;800&display=swap');

:root {
  --bg: #090611;
  --panel: #171024;
  --panel-2: #21152f;
  --gold: #e9c782;
  --gold-light: #fff0bf;
  --purple: #a66cff;
  --muted: #9f93b4;
  --border: rgba(194,150,255,.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: #f8f3ff;
  font-family: 'Manrope', sans-serif;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(112,45,190,.3), transparent 45%),
    radial-gradient(ellipse at 100% 55%, rgba(74,28,125,.14), transparent 45%),
    var(--bg);
}

.container {
  max-width: 520px;
  margin: auto;
  padding: 22px 18px 110px;
}

header {
  text-align: center;
  padding: 22px 0 30px;
}

.logo {
  font-size: 56px;
  filter: drop-shadow(0 0 22px rgba(169,95,255,.45));
}

h1 {
  font-family: 'Unbounded', sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold);
  margin: 12px 0;
  text-shadow: 0 0 28px rgba(233,199,130,.2);
}

.subtitle {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--muted);
}

.banner {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 30px 24px;
  margin-bottom: 24px;
  border-radius: 24px;
  border: 1px solid rgba(233,199,130,.3);
  background:
    radial-gradient(circle at 90% 20%, rgba(170,100,255,.4), transparent 42%),
    linear-gradient(125deg, #29143f, #100a1d);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.banner::after {
  content: '✦';
  position: absolute;
  right: 24px;
  bottom: 12px;
  font-size: 95px;
  color: rgba(233,199,130,.1);
}

.banner h2 {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  line-height: 1.4;
  color: var(--gold-light);
  margin: 0 0 14px;
}

.banner p {
  color: #c7b6dc;
  font-size: 13px;
  line-height: 1.7;
  max-width: 260px;
}

#product-search {
  width: 100%;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  outline: none;
  background: rgba(255,255,255,.035);
  color: white;
  font-family: inherit;
  font-size: 13px;
  transition: border-color .2s, box-shadow .2s;
}

#product-search:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(166,108,255,.1);
}

.categories {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 20px 0 24px;
}

.categories::-webkit-scrollbar { display: none; }

.categories button {
  flex-shrink: 0;
  padding: 12px 17px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  color: #c6b9d8;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}

.categories button.active {
  background: linear-gradient(135deg, #f5d99c, #c89b51);
  color: #1b1025;
  border-color: transparent;
  box-shadow: 0 5px 25px rgba(233,199,130,.2);
}

.section-title {
  font-family: 'Unbounded', sans-serif;
  color: #fff;
  font-size: 17px;
  margin: 6px 0 20px;
}

#catalog { display: grid; gap: 14px; }

.product-card {
  position: relative;
  display: grid;
  gap: 13px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(166,108,255,.08), transparent 65%),
    var(--panel);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  transition: transform .2s, border-color .2s;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(233,199,130,.35);
}

.product-card h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 15px;
  margin: 0;
}

.product-card p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  line-height: 1.6;
}

.product-card strong {
  color: var(--gold-light);
  font-family: 'Unbounded', sans-serif;
  font-size: 19px;
}

.product-card button {
  padding: 15px;
  border: 1px solid rgba(233,199,130,.35);
  border-radius: 12px;
  background: linear-gradient(135deg, #e9c782, #bd8f48);
  color: #1c1225;
  font-family: inherit;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.cart-bar {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 19px 16px calc(19px + env(safe-area-inset-bottom));
  text-align: center;
  background: rgba(15,9,26,.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
}

/* MEDUZZZZA BOTTOM NAVIGATION */
body {
  padding-bottom: 90px;
}

.bottom-navigation {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  background: #110b1d;
  border-top: 1px solid rgba(255,255,255,.09);
}

.bottom-navigation .nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #858096;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.bottom-navigation .nav-item.active {
  background: #252044;
  color: #a78bfa;
}

.bottom-navigation .nav-icon {
  font-size: 23px;
  line-height: 1;
}

.bottom-navigation .nav-count {
  position: absolute;
  top: 2px;
  right: 16%;
  min-width: 17px;
  padding: 2px 4px;
  border-radius: 10px;
  background: #8056f5;
  color: white;
  font-size: 10px;
  text-align: center;
}

.cart-bar {
  bottom: calc(70px + env(safe-area-inset-bottom));
}

.store-page {
  padding: 24px 20px 110px;
}

.store-page[hidden],
main.container[hidden] {
  display: none !important;
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.cart-controls button {
  padding: 9px 13px;
  border-radius: 10px;
}

.checkout-button {
  width: 100%;
  padding: 16px;
  margin-top: 16px;
  border-radius: 14px;
  font-weight: 700;
}

.nav-count[hidden] {
  display: none !important;
}

/* FIXED BOTTOM MENU */
html, body {
  min-height: 100%;
}

body {
  padding-bottom: calc(85px + env(safe-area-inset-bottom)) !important;
}

.bottom-navigation {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  z-index: 99999 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 7px 9px calc(7px + env(safe-area-inset-bottom)) !important;
  background: #120c20 !important;
  border-top: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 -8px 25px rgba(0,0,0,.35) !important;
}

.bottom-navigation .nav-item {
  appearance: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  min-height: 55px !important;
  padding: 6px 2px !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #8e879f !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

.bottom-navigation .nav-item.active {
  background: #292044 !important;
  color: #d1b3ff !important;
}

.bottom-navigation .nav-icon {
  display: block !important;
  font-size: 23px !important;
  line-height: 1 !important;
}

.bottom-navigation .nav-count[hidden] {
  display: none !important;
}

.store-page {
  padding-bottom: 100px !important;
}

/* SEARCH AND CART PAGES */
#search-page,
#cart-page {
  min-height: calc(100dvh - 175px);
  padding: 22px 20px 105px;
  box-sizing: border-box;
}

#search-page h2,
#cart-page h2 {
  font-size: 25px;
  font-weight: 800;
  margin: 0 0 22px;
}

#page-search-input {
  display: block;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 15px;
  background: #1c1628;
  color: #fff;
  outline: none;
  box-sizing: border-box;
}

#page-search-input:focus {
  border-color: #a78bfa;
}

#popular-searches {
  margin-top: 35px;
}

#popular-searches h3 {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #777084;
}

#search-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

#search-category-chips button {
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 25px;
  background: #1b1723;
  color: #aaa3b6;
  font-size: 13px;
}

#search-results {
  margin-top: 24px;
}

#search-results:empty {
  display: none;
}

/* MEDUZZZZA CART DESIGN */
#cart-page {
  padding-top: 0 !important;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 15px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 16px;
}

.cart-header h2 {
  margin: 0 !important;
}

.cart-clear {
  background: transparent !important;
  color: #9990a8 !important;
  border: none !important;
  font-size: 13px;
}

.cart-empty {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.cart-empty-icon {
  font-size: 65px;
  opacity: .45;
}

.cart-empty h3 {
  font-size: 25px;
  margin: 0;
}

.cart-empty p {
  max-width: 250px;
  color: #9990a8;
  line-height: 1.6;
  margin: 0;
}

.cart-back {
  margin-top: 10px;
  padding: 13px 22px;
  border: 1px solid #8662d8 !important;
  border-radius: 13px;
  background: #251b3c !important;
  color: #c8a9ff !important;
}

.cart-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: #1d152a;
}

.cart-product-details {
  min-width: 0;
}

.cart-product-details h3 {
  font-size: 14px;
  margin: 0 0 9px;
}

.cart-product-details strong {
  color: #d6ae69;
  font-size: 14px;
}

.cart-product-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.cart-remove {
  background: #3a1d2b !important;
  color: #ff7b91 !important;
  border: 0 !important;
  border-radius: 8px;
  padding: 4px 9px;
}

.cart-quantity {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #17121f;
  border-radius: 9px;
  padding: 4px;
}

.cart-quantity button {
  border: 0 !important;
  background: transparent !important;
  color: white !important;
  padding: 4px 7px;
}

.cart-quantity span {
  font-size: 13px;
  font-weight: 700;
}

.cart-summary {
  margin-top: 15px;
  padding: 19px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: #1d152a;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 14px;
}

.cart-summary-total {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 6px;
  padding-top: 15px;
  font-weight: 700;
}

.cart-summary-total strong {
  color: #d6ae69;
  font-size: 21px;
}

.cart-checkout {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 17px;
  border: 0 !important;
  border-radius: 15px;
  background: linear-gradient(135deg,#e9c783,#c69b51) !important;
  color: #160e21 !important;
  font-size: 15px;
  font-weight: 800;
}

/* MEDUZZZZA STORE — PROFILE */
#profile-page {
  padding: 18px 15px 105px;
  color: #f5f3ff;
}

#profile-page[hidden] {
  display: none !important;
}

.profile-heading {
  font-size: 25px;
  font-weight: 800;
  margin: 0 0 20px;
}

#profile-status {
  color: #c4b5fd;
  font-size: 13px;
}

#profile-status:empty {
  display: none;
}

.profile-user-card {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  border: 2px solid #a78bfa;
}

.profile-user-info h3 {
  font-size: 19px;
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}

.profile-user-info span {
  color: #a1a1aa;
  font-size: 13px;
}

.profile-balance-card {
  background: linear-gradient(125deg, #3b176e, #6d28d9);
  border: 1px solid #8b5cf6;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 15px;
  box-shadow: 0 10px 35px rgba(109,40,217,.18);
}

.profile-balance-card > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ddd6fe;
}

.profile-balance-card h2 {
  font-size: 35px;
  font-weight: 800;
  margin: 12px 0 20px;
}

#profile-topup {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #4c1d95;
  font-size: 15px;
  font-weight: 800;
}

#profile-topup:disabled {
  opacity: .65;
}

.profile-promo-card,
.profile-history-card {
  background: #181820;
  border: 1px solid #30303d;
  border-radius: 17px;
  padding: 18px;
  margin-bottom: 15px;
}

.profile-promo-card h3,
.profile-history-card h3 {
  font-size: 16px;
  margin: 0 0 15px;
}

.profile-promo-form {
  display: flex;
  gap: 8px;
}

.profile-promo-form input {
  min-width: 0;
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #3f3f50;
  background: #101018;
  color: #fff;
  font-size: 13px;
}

.profile-promo-form button {
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: #7c3aed;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.profile-promo-form button:disabled,
.profile-promo-form input:disabled {
  opacity: .65;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 15px;
}

.profile-stat {
  background: #181820;
  border: 1px solid #30303d;
  border-radius: 15px;
  padding: 18px 14px;
  text-align: center;
}

.profile-stat span {
  display: block;
  color: #a1a1aa;
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 11px;
}

.profile-stat strong {
  font-size: 22px;
  color: #c4b5fd;
}

#profile-deposits,
#profile-purchases {
  color: #9696a5;
  font-size: 13px;
  line-height: 1.6;
}

.profile-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #30303d;
}

.profile-history-item strong {
  color: #f5f3ff;
  overflow-wrap: anywhere;
}

.profile-history-item span {
  flex-shrink: 0;
  color: #c4b5fd;
}

.profile-links {
  background: #181820;
  border: 1px solid #30303d;
  border-radius: 17px;
  overflow: hidden;
  margin-top: 18px;
}

.profile-links a,
.profile-links button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 17px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #30303d;
  color: #f5f3ff;
  text-decoration: none;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.profile-links > :last-child {
  border-bottom: 0;
}

.profile-links button:disabled {
  opacity: .5;
  cursor: default;
}

.profile-links a span:last-child,
.profile-links button span:last-child {
  font-size: 23px;
  color: #a78bfa;
}

/* MEDUZZZZA STORE — FAQ MODAL */
.faq-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.faq-modal {
  width: 100%;
  max-width: 520px;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  background: #181820;
  border: 1px solid #393047;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .6);
}

.faq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #30303d;
}

.faq-header h2 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.faq-close {
  border: 0;
  background: #30273e;
  color: #fff;
  border-radius: 10px;
  width: 35px;
  height: 35px;
  font-size: 18px;
  cursor: pointer;
}

.faq-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  color: #d4d4df;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-line;
}

.faq-content > p:first-child {
  margin-top: 0;
}

.faq-section {
  padding: 18px 0;
  border-top: 1px solid #373040;
}

.faq-section h3 {
  margin: 0 0 12px;
  color: #c4b5fd;
  font-size: 15px;
}

.faq-section p {
  margin: 0;
}

.faq-footer {
  text-align: center;
  color: #a78bfa;
  font-weight: 700;
  padding-top: 15px;
}

/* PROFILE — compact bottom spacing */
#profile-page {
  padding-bottom: 20px !important;
  min-height: 0 !important;
  height: auto !important;
}

#profile-page .profile-links {
  margin-bottom: 0 !important;
}
