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

:root {
  --bg: #0a0a0a;
  --surface: rgba(11, 13, 20, 0.78);
  --border: rgba(255,255,255,0.18);
  --text: #f4f4f6;
  --text-muted: #aab0c0;
  --accent: #00ff88;
  --danger: #ff4444;
  --radius: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

.hidden { display: none !important; }

.ui-card {
  position: absolute;
  z-index: 1000;
  background: rgba(12, 14, 22, 0.76);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.07);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-left {
  top: calc(var(--safe-top) + 12px);
  left: 12px;
}

.top-right {
  top: calc(var(--safe-top) + 12px);
  right: 12px;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

@media (max-width: 520px) {
  #user-panel { right: 12px; justify-content: space-between; }
  #user-info  { display: none; }
}

.banner {
  position: absolute;
  top: calc(var(--safe-top) + 68px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  background: rgba(12, 14, 22, 0.82);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.07);
  white-space: nowrap;
}

.banner.warn { border-color: #ffaa00; color: #ffaa00; }
.banner.error { border-color: var(--danger); color: var(--danger); }
.banner.info  { border-color: var(--accent); color: var(--accent); }

.toast {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 110px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  background: rgba(12, 14, 22, 0.84);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 20px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.07);
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.4s;
  pointer-events: none;
}

.toast.fade { opacity: 0; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.overlay-card {
  background: rgba(12, 14, 22, 0.86);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

.app-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin-bottom: 12px;
}

.tagline {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #333;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-google:hover { opacity: 0.9; }
