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

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Poppins', sans-serif;
  background: #0d0020;
  min-height: 100vh;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ─── CSS Variables ─── */
:root {
  --pink:        #FF6B9D;
  --pink-light:  #FF8CC8;
  --pink-dark:   #E0558A;
  --green:       #00C97A;
  --green-dark:  #00A063;
  --red:         #FF4D6D;
  --blue:        #4D9EFF;
  --orange:      #FF8C42;
  --dark-bg:     #0d0020;
  --card-bg:     rgba(255,255,255,0.05);
  --border:      rgba(255,255,255,0.08);
  --radius:      16px;
  --radius-btn:  50px;
  --radius-sm:   8px;
  --transition:  0.25s ease;
  --shadow:      0 8px 32px rgba(0,0,0,0.4);
}

/* ─── Animations ─── */
@keyframes fadeIn    { from{opacity:0}         to{opacity:1} }
@keyframes slideUp   { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
@keyframes pulse     { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }
@keyframes spin      { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes popIn     { 0%{transform:scale(0.7);opacity:0} 80%{transform:scale(1.05)} 100%{transform:scale(1);opacity:1} }
@keyframes toastIn   { from{opacity:0;transform:translateX(60px)} to{opacity:1;transform:translateX(0)} }
@keyframes ping      { 0%{transform:scale(1);opacity:1} 100%{transform:scale(2.4);opacity:0} }
@keyframes glow      { 0%,100%{box-shadow:0 4px 20px rgba(0,201,122,0.45)} 50%{box-shadow:0 8px 44px rgba(0,201,122,0.75)} }
@keyframes orbDrift  { 0%,100%{transform:translateY(0) scale(1)} 50%{transform:translateY(-26px) scale(1.05)} }
@keyframes floatCard { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

/* ─── Spinner ─── */
.spinner {
  width: 40px; height: 40px;
  border: 4px solid rgba(255,107,157,0.3);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-btn);
  border: none; cursor: pointer; font-weight: 700; font-size: 15px;
  transition: var(--transition); user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-green {
  background: linear-gradient(135deg, var(--green) 0%, #00e68a 100%);
  color: #fff; box-shadow: 0 4px 16px rgba(0,201,122,0.4);
}
.btn-green:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,201,122,0.55); }
.btn-pink {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-light) 100%);
  color: #fff; box-shadow: 0 4px 16px rgba(255,107,157,0.4);
}
.btn-pink:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,107,157,0.55); }
.btn-ghost { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.14); }
.btn-full  { width: 100%; }
.btn-lg    { padding: 18px 40px; font-size: 17px; }
.btn-sm    { padding: 9px 20px; font-size: 13px; }

/* ─── Forms ─── */
.form-group  { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-label  { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.6); }
.form-input  {
  padding: 13px 16px; border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06);
  font-size: 15px; color: #fff; transition: border-color var(--transition); outline: none; width: 100%;
}
.form-input:focus  { border-color: var(--pink); }
.form-input::placeholder { color: rgba(255,255,255,0.3); }
.form-error  { font-size: 12px; color: var(--red); font-weight: 600; }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: #16002e; border: 1px solid rgba(255,107,157,0.15);
  border-radius: var(--radius); padding: 32px; width: 100%;
  max-width: 440px; max-height: 90vh; overflow-y: auto;
  animation: popIn 0.3s ease; position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.08); border: none; border-radius: 50%;
  width: 32px; height: 32px; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6); transition: var(--transition);
}
.modal-close:hover { background: rgba(255,107,157,0.2); color: var(--pink); }

/* ─── Toast ─── */
.toast-wrap  { position: fixed; top: 20px; right: 20px; z-index: 8888; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  padding: 14px 20px; border-radius: var(--radius-sm);
  color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4); animation: toastIn 0.3s ease;
  max-width: 320px; display: flex; align-items: center; gap: 10px; pointer-events: all;
}
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
.toast.info    { background: var(--blue); }

/* ─── Error Alert ─── */
.alert-error {
  background: rgba(255,77,109,0.12); border: 1px solid rgba(255,77,109,0.3);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 16px;
  font-size: 13px; color: #ff8099; display: none;
}
.alert-error.show { display: block; }

/* ─── Loading full screen ─── */
.loading-screen {
  position: fixed; inset: 0; background: #0d0020;
  display: flex; align-items: center; justify-content: center; z-index: 9999;
}

/* ─── Bottom Nav ─── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(8,0,20,0.97); backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; justify-content: space-around; align-items: center;
  padding: 10px 4px 16px;
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 12px; cursor: pointer; border: none;
  background: transparent; color: rgba(255,255,255,0.4);
  font-family: inherit; font-size: 11px; font-weight: 600;
  transition: all 0.2s; min-width: 52px; text-decoration: none;
}
.bottom-nav-item.active { color: var(--pink); background: rgba(255,107,157,0.1); }
.bottom-nav-item:hover:not(.active) { color: rgba(255,255,255,0.7); }
.bottom-nav-icon { font-size: 22px; line-height: 1; }

/* ─── Navbar ─── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,0,20,0.94); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.navbar-brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: var(--pink); text-decoration: none; }
.balance-badge {
  background: linear-gradient(135deg, var(--green) 0%, #00e68a 100%);
  color: #fff; padding: 7px 16px; border-radius: 50px;
  font-weight: 700; font-size: 14px; min-width: 110px; text-align: center;
  box-shadow: 0 2px 12px rgba(0,201,122,0.3);
}
.avatar-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink) 0%, #7b1fa2 100%);
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  cursor: pointer;
}

/* ─── Painel content ─── */
.painel-page     { min-height: 100vh; background: #0d0020; }
.painel-content  { max-width: 480px; margin: 0 auto; padding: 20px 16px 100px; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0d0020; }
::-webkit-scrollbar-thumb { background: rgba(255,107,157,0.3); border-radius: 50px; }

/* ─── Mobile ─── */
@media screen and (max-width: 768px) {
  input, select, textarea { font-size: 16px !important; }
}

/* ─── Utilities ─── */
.text-center  { text-align: center; }
.hidden       { display: none !important; }
.w-full       { width: 100%; }
.flex         { display: flex; }
.items-center { align-items: center; }
.gap-sm       { gap: 8px; }
.gap-md       { gap: 16px; }
.mt-md        { margin-top: 16px; }
.mt-lg        { margin-top: 24px; }
