* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0A0A14;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  overscroll-behavior-y: none;
}

#app {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  background: #12121F;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 76px;
}

@media (max-width: 480px) {
  #app { max-width: 100%; }
}

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

.glass {
  background: #1A1A2E;
  border: 1px solid #3D3D66;
  border-radius: 18px;
  padding: 20px 16px;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}

.glass-accent {
  background: #1A1A2E;
  border: 1px solid #00F5D4;
  border-radius: 18px;
  padding: 20px 16px;
}

.screen { padding: 20px 16px; color: #fff; }

.center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; }

.logo-badge {
  width: 60px; height: 60px; border-radius: 50%;
  border: 1px solid #00F5D4;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 16px;
}

h1, h2, h3 { font-weight: 500; margin: 0 0 8px; }
.title { text-align: center; font-size: 18px; margin-bottom: 4px; }
.subtitle { text-align: center; font-size: 12px; color: #8888AA; margin-bottom: 20px; }

.field {
  background: #1A1A2E;
  border: 1px solid #3D3D66;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.field input {
  background: transparent; border: none; outline: none;
  color: #fff; width: 100%; font-size: 14px;
}
.field input::placeholder { color: #6B6B8F; }

.btn {
  width: 100%; padding: 13px; border-radius: 12px; border: none;
  font-size: 14px; font-weight: 500; cursor: pointer;
  background: #1E1E33; color: #fff;
  border: 1px solid #3D3D66;
  transition: transform .15s ease;
}
.btn:hover { background: #262645; }
.btn:active { transform: scale(0.97); }
.btn-solid { background: #00F5D4; color: #0A0A14; border: none; }
.btn-solid:hover { background: #33F7DC; }

.btn-google {
  width: 100%; padding: 12px; border-radius: 12px;
  background: #fff; color: #1A1A2E; border: none;
  font-size: 13px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 12px;
}
.btn-google:active { transform: scale(0.97); }

.divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: #6B6B8F; font-size: 11px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #3D3D66; }

.link-muted { text-align: center; font-size: 12px; color: #8888AA; margin-top: 14px; }
.link-muted span { color: #00F5D4; font-weight: 500; cursor: pointer; }

.error { color: #FF6B9D; font-size: 12px; margin: -4px 0 10px; }

.row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 12px; color: #8888AA; }
.row-between label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.row-between span.link { color: #00F5D4; cursor: pointer; font-style: normal; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.streak { display: flex; align-items: center; gap: 4px; background: #1E1E33; border: 1px solid #3D3D66; border-radius: 14px; padding: 4px 10px; font-size: 12px; color: #00F5D4; }

.balance-card { text-align: center; margin-bottom: 16px; border-color: #00F5D4 !important; }
.balance-card .label { font-size: 11px; color: #8888AA; margin: 0; }
.balance-card .amount { font-size: 26px; font-weight: 500; margin: 4px 0 0; color: #00F5D4; }

.ring-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }

.row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #2A2A45;
  font-size: 13px;
}
.row:last-child { border-bottom: none; }

.tiles { display: flex; gap: 10px; margin-top: 16px; }
.tile {
  flex: 1; text-align: center; padding: 12px; border-radius: 14px; cursor: pointer;
  background: #1A1A2E; border: 1px solid #3D3D66;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}
.tile:hover { transform: translateY(-3px); }

.bottom-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-around;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: #0F0F1A; border-top: 1px solid #2A2A45;
}
.bottom-nav .nav-item { font-size: 20px; opacity: 0.4; cursor: pointer; transition: opacity .15s ease; }
.bottom-nav .nav-item.active { opacity: 1; }

.msg-toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: #1E1E33; border: 1px solid #3D3D66; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; z-index: 999;
}

.progress-bar { display: flex; gap: 4px; margin: 10px 0; }
.progress-bar .seg { flex: 1; height: 5px; border-radius: 3px; background: #2A2A45; }
.progress-bar .seg.filled { background: #00F5D4; }

.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.auth-card { width: 100%; padding: 14px; }
.auth-logo {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid #00F5D4;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin: 0 auto 10px;
}
.auth-title { text-align: center; font-size: 13px; font-weight: 500; margin: 0; color: #fff; }
.auth-subtitle { text-align: center; font-size: 10px; color: #8888AA; margin: 3px 0 18px; }

.field-sm {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid #3D3D66;
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 9px;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.field-sm:focus-within,
.field-sm.filled {
  border-color: #00F5D4;
  box-shadow: 0 0 0 1px #00F5D4, 0 0 8px rgba(0,245,212,0.35);
}
.field-sm input {
  background: transparent; border: none; outline: none;
  color: #fff; width: 100%; font-size: 11px;
}
.field-sm input::placeholder { color: #6B6B8F; }

.auth-row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 10px; color: #8888AA; }
.auth-row-between label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.auth-row-between span.link { color: #00F5D4; cursor: pointer; font-style: normal; }

.btn-fit {
  display: block; margin: 0 auto 12px; width: auto;
  padding: 9px 28px; border-radius: 11px;
  font-size: 11px; font-weight: 500; cursor: pointer;
  background: rgba(0,245,212,0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #00F5D4; border: 1px solid #00F5D4;
  box-shadow: 0 0 10px rgba(0,245,212,0.25);
  transition: background .2s ease, transform .15s ease;
}
.btn-fit:hover { background: rgba(0,245,212,0.18); }
.btn-fit:active { transform: scale(0.97); }

.btn-google-fit {
  display: flex; margin: 0 auto 12px; width: auto;
  padding: 9px 18px; border-radius: 10px;
  background: #fff; color: #1A1A2E; border: none;
  font-size: 11px; font-weight: 500; cursor: pointer;
  align-items: center; justify-content: center; gap: 6px;
}
.btn-google-fit:active { transform: scale(0.97); }

.auth-divider { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: #6B6B8F; font-size: 10px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #3D3D66; }

.auth-link { text-align: center; font-size: 11px; color: #8888AA; }
.auth-link span { color: #00F5D4; font-weight: 500; cursor: pointer; }
