/* GymMate — Premium Mobile-First UI */
:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface2:#fbfcff;
  --text:#0f172a;
  --muted:#5b6470;
  --border:rgba(15,23,42,.12);
  --shadow:0 14px 40px rgba(15,23,42,.10);
  --shadow2:0 22px 70px rgba(15,23,42,.14);

  --primary:#2563eb;
  --accent:#22c55e;
  --danger:#ef4444;
  --warning:#f59e0b;

  --radius:18px;
  --radius2:22px;

  --tap:56px;
}

.theme-dark{
  --bg:#0b1220;
  --surface:#0f172a;
  --surface2:#0b1220;
  --text:#e5e7eb;
  --muted:#aab2bf;
  --border:rgba(255,255,255,.12);
  --shadow:0 18px 60px rgba(0,0,0,.45);
  --shadow2:0 28px 90px rgba(0,0,0,.55);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:var(--bg);
  color:var(--text);
}
a{color:inherit;text-decoration:none}
.container{
  width:min(980px, 100%);
  margin:0 auto;
  padding:18px 14px 92px;
}
.app-shell{
  min-height:100dvh;
  display:flex;
  flex-direction:column;
}

/* Topbar */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-bottom:1px solid var(--border);
}
.topbar-inner{
  width:min(980px, 100%);
  margin:0 auto;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand{
  display:flex;align-items:center;gap:10px;font-weight:900;letter-spacing:.2px
}
.brand-badge{
  width:34px;height:34px;border-radius:12px;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent)));
  box-shadow: 0 12px 26px rgba(37,99,235,.25);
}
.brand small{display:block;color:var(--muted);font-weight:700;letter-spacing:.2px}
.icon-btn{
  width:44px;height:44px;border-radius:14px;
  border:1px solid var(--border);
  background:var(--surface);
  display:inline-flex;align-items:center;justify-content:center;
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
  cursor:pointer;
}
.icon-btn:active{transform:translateY(1px)}
.pill{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 12px;border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  font-weight:800;
}

/* Cards */
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius2);
  box-shadow:var(--shadow);
}
.card-pad{padding:16px}
.title{font-size:18px;font-weight:900;margin:0 0 10px}
.sub{color:var(--muted);font-size:13px;line-height:1.35;margin:0}

/* Inputs */
.input, textarea, select{
  width:100%;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--surface2);
  color:var(--text);
  padding:12px 12px;
  outline: none;
}
.input:focus, textarea:focus, select:focus{
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
}
.row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:740px){.row{grid-template-columns:1fr}}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  height:48px;
  padding:0 14px;
  border-radius:16px;
  border:1px solid transparent;
  background:var(--primary);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.btn.secondary{background:var(--surface); color:var(--text); border-color:var(--border)}
.btn.danger{background:var(--danger)}
.btn:active{transform:translateY(1px)}
.btn.wide{width:100%}

.badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 10px;border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface2);
  font-weight:800;font-size:12px;color:var(--muted)
}

/* Bottom nav */
.bottom-nav{
  position:fixed; left:0; right:0; bottom:0;
  z-index:60;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top:1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.bottom-nav-inner{
  width:min(980px, 100%);
  margin:0 auto;
  padding:10px 12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.nav-item{
  flex:1;
  height:52px;
  border-radius:18px;
  border:1px solid var(--border);
  background:var(--surface);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;
  font-size:12px;font-weight:900;
  box-shadow: 0 10px 22px rgba(15,23,42,.06);
}
.nav-item.active{
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: 0 14px 30px rgba(37,99,235,.14);
}

/* Swipe deck */
.deck{
  margin-top:16px;
  display:flex;
  justify-content:center;
}
.profile-card{
  width:min(420px, 92vw);
  aspect-ratio: 3 / 4.2;
  border-radius: 26px;
  overflow:hidden;
  background: #111827;
  box-shadow: var(--shadow2);
  position:relative;
  touch-action: pan-y;
}
.profile-card .photo{
  position:absolute; inset:0;
  background-size:cover;
  background-position:center;
  filter: saturate(1.06);
}
.profile-card .gradient{
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.78) 100%);
}
.profile-card .meta{
  position:absolute; left:0; right:0; bottom:0;
  padding:16px;
  color:#fff;
}
.meta h2{margin:0;font-size:22px;letter-spacing:.2px}
.meta .meta2{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.tag{
  display:inline-flex;align-items:center;
  padding:8px 10px;border-radius:999px;
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  color:#fff;
  font-size:12px;font-weight:900;
}
.choice{
  position:absolute; top:18px; left:18px;
  padding:10px 12px;border-radius:14px;
  border:2px solid rgba(255,255,255,.7);
  font-weight:1000; letter-spacing:2px;
  transform: rotate(-14deg);
  opacity:0;
}
.choice.like{color:#22c55e;border-color:#22c55e}
.choice.nope{color:#ef4444;border-color:#ef4444; transform: rotate(14deg); left:auto; right:18px}

.swipe-actions{
  width:min(420px, 92vw);
  margin:14px auto 0;
  display:flex;justify-content:center;gap:12px;
}
.action-btn{
  width:64px;height:64px;border-radius:22px;
  border:1px solid var(--border);
  background:var(--surface);
  display:flex;align-items:center;justify-content:center;
  box-shadow:var(--shadow);
  cursor:pointer;
}
.action-btn.like{border-color: color-mix(in srgb, var(--accent) 45%, var(--border))}
.action-btn.nope{border-color: color-mix(in srgb, var(--danger) 45%, var(--border))}
.action-btn:active{transform:translateY(1px)}
.small{font-size:12px;color:var(--muted)}

/* Photo grid */
.photo-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
.photo-box{
  border-radius:18px;
  border:1px dashed var(--border);
  background:var(--surface2);
  aspect-ratio: 9/16;
  overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  position:relative;
}
.photo-box img{width:100%;height:100%;object-fit:cover}
.photo-box .slot{
  position:absolute;top:10px;left:10px;
  padding:6px 8px;border-radius:999px;
  background:rgba(0,0,0,.55);
  color:#fff;font-size:11px;font-weight:900;
}
.photo-box .rm{
  position:absolute;top:10px;right:10px;
  width:32px;height:32px;border-radius:12px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(0,0,0,.38);
  color:#fff;font-weight:900;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
}

/* Drawer */
.drawer{
  position:fixed; inset:0;
  background: rgba(0,0,0,.45);
  display:none;
  z-index:80;
}
.drawer.open{display:block}
.drawer-panel{
  position:absolute; top:0; right:0;
  width:min(360px, 92vw);
  height:100%;
  background:var(--surface);
  border-left:1px solid var(--border);
  box-shadow: var(--shadow2);
  padding:16px;
  overflow:auto;
}
.drawer h3{margin:0 0 10px;font-size:16px;font-weight:1000}
hr{border:none;border-top:1px solid var(--border);margin:14px 0}
