/* LookCat - Base Styles */

:root {
  --orange: #F5A623;
  --orange-warm: #FF9800;
  --orange-light: #FFF3E0;
  --orange-glow: rgba(245,166,35,.25);
  --green: #4A8B3F;
  --green-light: #66BB6A;
  --green-pale: #E8F5E9;
  --green-glow: rgba(74,139,63,.2);
  --text: #2D2D2D;
  --text-soft: #777;
  --card: #FFFFFF;
  --shadow-soft: 0 4px 20px rgba(0,0,0,.06);
  --shadow-card: 0 8px 32px rgba(0,0,0,.08);
  --radius: 20px;
  --radius-lg: 28px;
  --nav-h: 72px;
  --top-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; min-height: calc(100% + env(safe-area-inset-top, 0px)); background: #fff; }
body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  font-family: 'Quicksand', 'Nunito', sans-serif;
  background: #fff; color: var(--text);
  display: flex; flex-direction: column;
}

/* === TOP BAR === */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: calc(var(--top-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--card); border-bottom: 1px solid #F0EDE8;
  display: flex; align-items: center; justify-content: space-between;
  padding-left: 16px; padding-right: 16px;
  z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.top-bar.hidden { display: none; }
.top-logo { height: 36px; width: auto; }
.top-child-info {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.top-child-name {
  font-family: 'Nunito', sans-serif; font-size: 20px; font-weight: 900; color: var(--text);
}
.top-avatar-ring {
  position: relative; width: 60px; height: 60px; flex-shrink: 0;
}
.top-avatar-ring svg { width: 60px; height: 60px; transform: rotate(-90deg); }
.top-avatar-ring .ring-bg { fill: none; stroke: #EEE; stroke-width: 3; }
.top-avatar-ring .ring-fill { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.top-avatar-img {
  position: absolute; inset: 4px; border-radius: 50%; overflow: hidden;
}
.top-avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.top-level-badge {
  position: absolute; top: -6px; right: -10px;
  background: var(--orange); color: #fff; font-family: 'Nunito', sans-serif;
  font-size: 16px; font-weight: 900; min-width: 27px; height: 27px;
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  padding: 0 6px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15);
  line-height: 1;
}
.top-child-text {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0;
  margin-top: -3px;
}
.top-coins { margin-top: -1px; }
.top-coins {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #fff; font-family: 'Nunito', sans-serif; font-weight: 900;
  font-size: 13px; padding: 3px 10px; border-radius: 12px;
  box-shadow: 0 1px 4px rgba(255,165,0,.35);
  cursor: pointer; user-select: none;
  transition: transform .15s ease;
}
.top-coins:active { transform: scale(0.95); }
.top-coins-icon { font-size: 14px; line-height: 1; }
.top-coins-value { line-height: 1; min-width: 12px; text-align: center; }
.top-coins.coin-pop { animation: coinPop .6s ease; }
@keyframes coinPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); box-shadow: 0 4px 12px rgba(255,200,0,.7); }
  100% { transform: scale(1); }
}

/* === COIN TOAST === */
.coin-toast {
  position: fixed; top: calc(var(--top-h) + var(--safe-top) + 12px);
  left: 50%; transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #fff; font-family: 'Nunito', sans-serif; font-weight: 900;
  padding: 12px 18px; border-radius: 18px;
  box-shadow: 0 6px 20px rgba(255,165,0,.45);
  display: flex; align-items: center; gap: 10px;
  opacity: 0; pointer-events: none; z-index: 200;
  transition: opacity .3s ease, transform .4s cubic-bezier(.22,1,.36,1);
}
.coin-toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.coin-toast-icon { font-size: 28px; }
.coin-toast-amount { font-size: 22px; line-height: 1; }
.coin-toast-source { font-size: 12px; opacity: .9; margin-top: 2px; }

/* === SCREENS === */
.screen { display: none; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding: calc(var(--top-h) + var(--safe-top) + 12px) 20px calc(var(--nav-h) + var(--safe-bottom) + 12px); }
.screen.no-topbar { padding-top: calc(var(--safe-top) + 20px); }
.screen.active { display: flex; flex-direction: column; }
.screen.active { animation: screenIn .4s cubic-bezier(.22,1,.36,1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
