/* ============================================================= THE GRID
   Tron Legacy aesthetic: deep black, neon cyan, a glowing grid, and an
   orange "derezzed" state for completed titles. Phone-first.
   ============================================================= */
:root {
  --bg:          #04070d;
  --cyan:        #39d7ff;
  --cyan-bright: #c7f5ff;
  --cyan-dim:    #1f6f88;
  --orange:      #ffb14e;
  --orange-bright:#ffd9a3;
  --line:        rgba(57,215,255,.22);
  --line-soft:   rgba(57,215,255,.10);
  --panel:       rgba(8,18,28,.66);
  --panel-solid: #060d16;
  --txt:         #cdeafb;
  --muted:       #6a93a6;
  --glow:        0 0 12px rgba(57,215,255,.55);
  --glow-orange: 0 0 12px rgba(255,177,78,.6);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: "Rajdhani", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2 { font-family: "Orbitron", sans-serif; margin: 0; }
button { font-family: inherit; }
a { color: var(--cyan); }

/* ---- Background: the Grid ---- */
.grid-bg {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(57,215,255,.20), transparent 55%),
    radial-gradient(ellipse at 50% 120%, rgba(57,215,255,.10), transparent 55%),
    var(--bg);
}
.grid-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 72%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 72%, transparent);
  animation: grid-pan 20s linear infinite;
}
@keyframes grid-pan {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 44px, 44px 0; }
}
/* faint moving scanline */
.scanline {
  position: fixed; left: 0; right: 0; height: 140px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(57,215,255,.05), transparent);
  animation: scan 7s linear infinite;
}
@keyframes scan { 0% { top: -140px; } 100% { top: 100%; } }

/* ---- Brand bar ---- */
.brandbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 10px; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 26px; height: 26px; border: 2px solid var(--cyan); border-radius: 50%;
  position: relative; box-shadow: var(--glow), inset 0 0 8px rgba(57,215,255,.4);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: var(--glow);
}
h1 { font-size: 20px; font-weight: 900; letter-spacing: .34em; color: var(--cyan-bright); text-shadow: var(--glow); }
.tagline { margin: 3px 0 0; font-size: 10px; letter-spacing: .42em; color: var(--muted); }
.region-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; color: var(--cyan); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 700;
  letter-spacing: .14em; cursor: pointer; transition: .2s;
}
.region-btn:hover, .region-btn:active { border-color: var(--cyan); box-shadow: var(--glow); }
#region-flag { font-size: 15px; }

/* ---- TMDB offline banner ---- */
.banner {
  margin: 0 16px 8px; padding: 10px 14px; border: 1px solid var(--line);
  border-left: 3px solid var(--orange); border-radius: 10px;
  background: rgba(255,177,78,.06); color: var(--orange-bright);
  font-size: 13px; letter-spacing: .02em; line-height: 1.4;
}
.banner code { color: var(--cyan-bright); background: rgba(57,215,255,.12); padding: 1px 5px; border-radius: 4px; }

/* ---- Sticky controls (search + filters) ---- */
.controls {
  position: sticky; top: 0; z-index: 30;
  padding: 8px 16px 10px;
  background: linear-gradient(180deg, rgba(4,7,13,.96) 70%, rgba(4,7,13,0));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.search-shell { position: relative; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: var(--cyan); box-shadow: 0 0 20px rgba(57,215,255,.32); }
.search-box .ico {
  width: 19px; height: 19px; flex: none; fill: none;
  stroke: var(--cyan); stroke-width: 2; stroke-linecap: round;
}
.search-box input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
  color: var(--cyan-bright); font-size: 17px; font-weight: 600; letter-spacing: .1em;
}
.search-box input::placeholder { color: var(--muted); letter-spacing: .16em; }
.clear-btn {
  background: transparent; border: 0; color: var(--muted); font-size: 16px;
  cursor: pointer; padding: 2px 4px;
}
.spin {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--cyan);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Search results dropdown ---- */
.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; box-shadow: 0 22px 50px rgba(0,0,0,.7), 0 0 0 1px rgba(57,215,255,.05);
  max-height: 62vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.result {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px;
  cursor: pointer; border-bottom: 1px solid var(--line-soft);
}
.result:last-child { border-bottom: 0; }
.result:hover, .result.active { background: rgba(57,215,255,.09); }
.result .thumb {
  width: 40px; height: 60px; flex: none; border-radius: 6px;
  background: #0b1622 center / cover no-repeat; border: 1px solid var(--line-soft);
}
.result .thumb.ph { display: grid; place-items: center; color: var(--cyan-dim); font-size: 18px; font-family: "Orbitron"; }
.result .r-main { min-width: 0; flex: 1; }
.result .r-title { font-weight: 700; color: var(--cyan-bright); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result .r-meta { font-size: 12px; color: var(--muted); letter-spacing: .1em; margin-top: 2px; }
.result.manual { color: var(--cyan); font-weight: 600; letter-spacing: .04em; }
.result.manual .plus { font-size: 20px; width: 40px; text-align: center; color: var(--cyan); }

.badge {
  display: inline-block; font-family: "Orbitron"; font-size: 9px; font-weight: 700;
  letter-spacing: .16em; padding: 2px 6px; border-radius: 5px; vertical-align: middle;
  border: 1px solid var(--line); color: var(--cyan);
}
.badge.tv { color: var(--orange); border-color: rgba(255,177,78,.4); }

/* ---- Filters ---- */
.filters { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; white-space: nowrap;
  font-family: "Orbitron"; font-size: 10px; font-weight: 700; letter-spacing: .16em;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 13px; cursor: pointer; transition: .18s;
}
.chip:hover { color: var(--cyan); border-color: var(--cyan); }
.chip.active { color: #021018; background: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow); }
.chip .count {
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: rgba(57,215,255,.14); color: var(--cyan-bright);
}
.chip.active .count { background: rgba(2,16,24,.25); color: #021018; }

/* ---- List toolbar (search + sort) ---- */
.list-toolbar {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.list-search-wrap {
  flex: 1; min-width: 120px; display: flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 10px; transition: border-color .2s;
}
.list-search-wrap:focus-within { border-color: var(--cyan); }
.list-search-ico {
  width: 14px; height: 14px; flex: none; fill: none;
  stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
}
#list-search {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
  color: var(--cyan-bright); font-size: 13px; font-weight: 600; letter-spacing: .08em;
}
#list-search::placeholder { color: var(--muted); letter-spacing: .14em; font-size: 12px; }
.sort-row { display: flex; gap: 4px; flex-shrink: 0; }
.sort-btn {
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-family: "Orbitron"; font-size: 9px; letter-spacing: .14em;
  padding: 7px 10px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.sort-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.sort-btn.active { background: rgba(57,215,255,.12); border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow); }

/* ---- Stats strip ---- */
.stats-strip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding: 6px 2px 0;
  font-family: "Orbitron"; font-size: 9px; letter-spacing: .14em; color: var(--muted);
}
.stats-strip .dot { color: var(--line); }

/* ---- List + cards ---- */
.list { display: flex; flex-direction: column; gap: 12px; padding: 6px 16px 0; }
.divider {
  display: flex; align-items: center; gap: 12px; margin: 6px 2px 0;
  font-family: "Orbitron"; font-size: 10px; letter-spacing: .3em; color: var(--orange);
}
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, rgba(255,177,78,.4), transparent); }

.card {
  position: relative; display: flex; gap: 14px; padding: 12px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(57,215,255,.04);
  animation: rezz .45s ease both;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--cyan); box-shadow: var(--glow);
}
@keyframes rezz {
  from { opacity: 0; transform: translateY(10px) scaleY(.96); filter: blur(2px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.card.done { opacity: .6; }
.card.done::before { background: var(--orange); box-shadow: var(--glow-orange); }

.poster {
  width: 66px; height: 99px; flex: none; border-radius: 10px;
  background: #0b1622 center / cover no-repeat; border: 1px solid var(--line);
  box-shadow: 0 0 12px rgba(0,0,0,.5); position: relative;
}
.poster.ph { display: grid; place-items: center; color: var(--cyan-dim); font-family: "Orbitron"; font-size: 26px; }
.card.done .poster { filter: grayscale(.6) brightness(.8); }

/* ---- Who added — initials badge ---- */
.added-by {
  position: absolute; bottom: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(4,7,13,.82); border: 1px solid var(--cyan-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: "Orbitron"; font-size: 7px; font-weight: 700; letter-spacing: 0;
  color: var(--cyan); line-height: 1;
}
.card.done .added-by { border-color: rgba(255,177,78,.5); color: var(--orange); }

.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.title { font-family: "Orbitron"; font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--cyan-bright); }
.card.done .title { color: var(--orange-bright); text-decoration: line-through; text-decoration-color: rgba(255,177,78,.55); }
.meta { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }

.providers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.prov-tag {
  font-family: "Orbitron"; font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-soft);
}
.prov-tag.stream { color: var(--cyan); }
.prov-tag.rentbuy { color: var(--orange); border-color: rgba(255,177,78,.3); }
.prov-tag.none { color: var(--muted); }
.prov { display: inline-flex; align-items: center; }
.prov img {
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line-soft);
  background: #0b1622; object-fit: cover;
}
.prov.logo-ph {
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line-soft);
  background: #0b1622; justify-content: center; color: var(--cyan-dim);
  font-family: "Orbitron"; font-size: 12px;
}
.prov-more { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.jw {
  font-size: 11px; letter-spacing: .06em; text-decoration: none; color: var(--cyan);
  border-bottom: 1px dashed var(--cyan-dim); padding-bottom: 1px;
}

/* card actions column */
.actions { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px; }
.check {
  width: 36px; height: 36px; flex: none; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--cyan); background: transparent; box-shadow: var(--glow);
  display: grid; place-items: center; transition: .2s;
}
.check svg { width: 18px; height: 18px; stroke: var(--cyan); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: .15s; }
.check:hover { background: rgba(57,215,255,.12); }
.card.done .check { border-color: var(--orange); background: var(--orange); box-shadow: var(--glow-orange); }
.card.done .check svg { stroke: #2a1600; opacity: 1; }
.mini {
  background: transparent; border: 0; cursor: pointer; padding: 4px;
  color: var(--muted); width: 28px; height: 28px; border-radius: 8px; line-height: 1;
  display: grid; place-items: center; transition: .15s;
}
.mini svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mini:hover { color: var(--cyan); background: rgba(57,215,255,.1); }
.mini.del:hover { color: #ff5f6d; background: rgba(255,95,109,.1); }
.mini.spin-now svg { animation: spin .7s linear infinite; }

/* ---- Note section (pre-watch) ---- */
.note-section {
  margin-top: 4px; display: flex; flex-direction: column; gap: 5px;
}

/* ---- Rating section (post-watch) ---- */
.rating-section {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 6px;
}
.star-row { display: flex; align-items: center; gap: 2px; }
.star {
  background: none; border: none; cursor: pointer; font-size: 20px; padding: 2px 3px;
  color: var(--line); transition: color .12s, transform .12s; line-height: 1;
}
.star.filled { color: var(--orange); text-shadow: var(--glow-orange); }
.star:hover, .star:focus { color: var(--orange); transform: scale(1.2); outline: none; }
.star-clear {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: 12px; padding: 2px 5px; margin-left: 4px; transition: color .12s;
}
.star-clear:hover { color: #ff5f6d; }

/* ---- Note / Review shared ---- */
.review-wrap { display: flex; flex-direction: column; gap: 5px; }
.review-toggle {
  background: none; border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted); font-family: "Orbitron"; font-size: 9px; letter-spacing: .15em;
  padding: 4px 10px; cursor: pointer; align-self: flex-start; transition: .15s;
}
.review-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.review-ta {
  width: 100%; background: rgba(0,0,0,.4); border: 1px solid var(--line);
  border-radius: 8px; color: var(--txt); font-family: "Rajdhani"; font-size: 13px;
  padding: 8px 10px; resize: vertical; min-height: 60px; outline: none;
  transition: border-color .15s;
}
.review-ta:focus { border-color: var(--cyan); }
.review-save {
  background: var(--cyan); color: #021018; border: none; border-radius: 8px;
  font-family: "Orbitron"; font-size: 10px; letter-spacing: .15em;
  padding: 6px 14px; cursor: pointer; align-self: flex-start; font-weight: 700;
}
.review-preview {
  margin: 0; font-size: 12px; color: var(--muted); font-style: italic;
  line-height: 1.4; white-space: pre-wrap; word-break: break-word;
}

/* ---- Suggestions tab chip ---- */
.chip[data-filter="suggest"] { color: var(--orange); }
.chip[data-filter="suggest"].active { background: var(--orange); color: #1a0a00; border-color: var(--orange); box-shadow: var(--glow-orange); }

/* ---- Suggestions panel ---- */
.suggest-panel { padding: 0 16px 24px; }
.suggest-header { padding: 6px 0 16px; }
.suggest-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.suggest-label {
  font-family: "Orbitron"; font-size: 12px; letter-spacing: .22em;
  color: var(--orange); text-shadow: var(--glow-orange);
}
.sug-refresh-btn {
  background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-family: "Orbitron"; font-size: 9px; letter-spacing: .1em;
  padding: 5px 10px; cursor: pointer; transition: .15s;
}
.sug-refresh-btn:hover { border-color: var(--orange); color: var(--orange); }
.suggest-sub { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.suggestions-section { display: flex; flex-direction: column; gap: 10px; }
.suggestion-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; position: relative; animation: rezz .3s ease both;
}
.sug-poster {
  width: 44px; height: 60px; flex: none; border-radius: 8px;
  background: var(--panel-solid); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: "Orbitron"; font-size: 16px; color: var(--orange);
  text-shadow: var(--glow-orange);
}
.sug-body { flex: 1; min-width: 0; }
.sug-title { font-weight: 700; font-size: 15px; line-height: 1.2; margin-bottom: 3px; }
.sug-meta { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.sug-reason { font-size: 12px; color: var(--muted); line-height: 1.4; }
.sug-add {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: none; border: 2px solid var(--orange); color: var(--orange);
  font-size: 20px; line-height: 1; cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: .15s;
  box-shadow: var(--glow-orange);
}
.sug-add:hover { background: var(--orange); color: #021018; }
.sug-loading {
  display: flex; align-items: center; gap: 10px; padding: 32px 0;
  color: var(--muted); font-size: 14px; letter-spacing: .06em; justify-content: center;
}
.sug-empty {
  padding: 32px 0; text-align: center; color: var(--muted);
  font-size: 13px; line-height: 1.6; max-width: 280px; margin: 0 auto;
}

/* ---- Empty + footer ---- */
.empty { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty-ring {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  border: 2px solid var(--line); box-shadow: var(--glow), inset 0 0 18px rgba(57,215,255,.12);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { box-shadow: var(--glow), inset 0 0 18px rgba(57,215,255,.12); } 50% { box-shadow: 0 0 24px rgba(57,215,255,.8), inset 0 0 26px rgba(57,215,255,.2); } }
.empty p { font-family: "Orbitron"; letter-spacing: .26em; color: var(--cyan-bright); margin: 0 0 6px; }
.empty span { font-size: 14px; letter-spacing: .04em; }
.footer {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 24px 16px 28px; font-family: "Orbitron"; font-size: 10px;
  letter-spacing: .22em; color: var(--muted); text-transform: uppercase;
}
.footer .dot { color: var(--cyan-dim); }

/* ---- Name picker modal ---- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: end center;
  background: rgba(2,6,12,.74); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%; max-width: 520px; background: var(--panel-solid);
  border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0,0,0,.6); animation: rise .26s ease;
}
@keyframes rise { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.modal-card h2 { font-size: 14px; letter-spacing: .26em; color: var(--cyan-bright); text-shadow: var(--glow); }
.modal-sub { margin: 6px 0 16px; font-size: 13px; color: var(--muted); }

/* Name picker specifics */
.name-modal-card { text-align: center; }
.name-modal-icon {
  font-size: 36px; color: var(--cyan); text-shadow: var(--glow);
  margin-bottom: 12px; display: block;
}
.name-input {
  width: 100%; background: rgba(0,0,0,.4); border: 1px solid var(--line);
  border-radius: 10px; color: var(--cyan-bright); font-family: "Orbitron"; font-size: 16px;
  letter-spacing: .14em; padding: 12px 16px; outline: none; text-align: center;
  transition: border-color .2s, box-shadow .2s; margin-bottom: 14px;
}
.name-input:focus { border-color: var(--cyan); box-shadow: var(--glow); }
.name-input::placeholder { color: var(--muted); }
.name-save-btn {
  width: 100%; background: var(--cyan); color: #021018; border: none;
  border-radius: 12px; font-family: "Orbitron"; font-size: 13px; font-weight: 700;
  letter-spacing: .22em; padding: 14px; cursor: pointer;
  box-shadow: var(--glow); transition: .15s;
}
.name-save-btn:hover { background: var(--cyan-bright); }

/* Region picker */
.region-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.region-opt {
  display: flex; align-items: center; gap: 9px; justify-content: flex-start;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--txt); cursor: pointer; font-weight: 600;
  letter-spacing: .03em; font-size: 13px; transition: .15s;
}
.region-opt .ro-flag { flex: none; font-size: 15px; }
.region-opt .ro-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-opt:hover { border-color: var(--cyan); }
.region-opt.active { background: var(--cyan); color: #021018; border-color: var(--cyan); box-shadow: var(--glow); }
.ghost-btn {
  width: 100%; padding: 13px; background: transparent; border: 1px solid var(--line);
  border-radius: 12px; color: var(--cyan); font-family: "Orbitron"; font-size: 12px;
  letter-spacing: .2em; cursor: pointer; transition: .15s;
}
.ghost-btn:hover { border-color: var(--cyan); box-shadow: var(--glow); }

/* ---- Install banner ---- */
.install-banner {
  position: fixed; bottom: calc(80px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); z-index: 110;
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  background: var(--panel-solid); border: 1px solid var(--cyan);
  border-radius: 14px; padding: 12px 14px;
  color: var(--txt); font-size: 13px; font-weight: 500; letter-spacing: .04em;
  box-shadow: 0 8px 32px rgba(0,0,0,.7), var(--glow);
  max-width: 90vw; animation: toast-in .3s ease;
}
.install-btn {
  flex: none; background: var(--cyan); color: #021018; border: none;
  border-radius: 8px; padding: 7px 14px; font-family: "Orbitron"; font-size: 11px;
  font-weight: 700; letter-spacing: .15em; cursor: pointer; white-space: nowrap;
}
.install-dismiss {
  flex: none; background: transparent; border: none; color: var(--muted);
  font-size: 16px; cursor: pointer; padding: 2px 4px; line-height: 1;
}

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 120; background: var(--panel-solid); border: 1px solid var(--line);
  border-left: 3px solid var(--cyan); border-radius: 12px; padding: 12px 18px;
  color: var(--cyan-bright); font-weight: 600; letter-spacing: .06em; max-width: 88vw;
  box-shadow: 0 12px 40px rgba(0,0,0,.6), var(--glow); animation: toast-in .25s ease;
}
.toast.err { border-left-color: #ff5f6d; color: #ffd5d9; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%); } }

/* ---- Schedule UI on cards ---- */
.sched-wrap { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.sched-badge {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: rgba(57,215,255,.06); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 8px;
}
.sched-ico { font-size: 13px; flex: none; }
.sched-date { font-size: 12px; font-weight: 600; color: var(--cyan-bright); letter-spacing: .04em; flex: 1; min-width: 0; }
.sched-gcal {
  font-family: "Orbitron"; font-size: 8px; letter-spacing: .12em;
  color: var(--cyan); border: 1px solid var(--line); border-radius: 5px;
  padding: 3px 7px; text-decoration: none; white-space: nowrap; transition: .15s;
}
.sched-gcal:hover { background: var(--cyan); color: #021018; border-color: var(--cyan); }
.sched-remove {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 12px; padding: 2px 4px; transition: color .12s; line-height: 1;
}
.sched-remove:hover { color: #ff5f6d; }
.sched-toggle {
  background: none; border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted); font-family: "Orbitron"; font-size: 9px; letter-spacing: .15em;
  padding: 4px 10px; cursor: pointer; align-self: flex-start; transition: .15s;
}
.sched-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.sched-editor {
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(0,0,0,.3); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.sched-label {
  font-family: "Orbitron"; font-size: 9px; letter-spacing: .16em; color: var(--muted);
}
.sched-input, .sched-note-input {
  background: rgba(0,0,0,.4); border: 1px solid var(--line); border-radius: 8px;
  color: var(--cyan-bright); font-family: "Rajdhani"; font-size: 14px;
  padding: 8px 10px; outline: none; width: 100%; transition: border-color .15s;
  -webkit-appearance: none;
}
.sched-input:focus, .sched-note-input:focus { border-color: var(--cyan); }
.sched-note-input::placeholder { color: var(--muted); }
::-webkit-calendar-picker-indicator { filter: invert(1) opacity(0.5); cursor: pointer; }
.sched-editor-btns { display: flex; gap: 8px; margin-top: 2px; }
.sched-save-btn {
  background: var(--cyan); color: #021018; border: none; border-radius: 8px;
  font-family: "Orbitron"; font-size: 10px; letter-spacing: .15em;
  padding: 8px 16px; cursor: pointer; font-weight: 700;
}
.sched-cancel-btn {
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-family: "Orbitron"; font-size: 10px; letter-spacing: .12em;
  padding: 8px 12px; cursor: pointer; transition: .15s;
}
.sched-cancel-btn:hover { border-color: var(--muted); }

/* ---- Calendar panel ---- */
.calendar-panel { padding: 0 16px 32px; }
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 14px;
}
.cal-month-label {
  font-family: "Orbitron"; font-size: 14px; letter-spacing: .2em;
  color: var(--cyan-bright); text-shadow: var(--glow);
}
.cal-nav {
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  color: var(--cyan); font-size: 20px; width: 36px; height: 36px;
  cursor: pointer; display: grid; place-items: center; line-height: 1;
  transition: .15s;
}
.cal-nav:hover { background: rgba(57,215,255,.1); border-color: var(--cyan); box-shadow: var(--glow); }
.cal-grid-wrap {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; margin-bottom: 16px;
}
.cal-dow-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: rgba(57,215,255,.06); border-bottom: 1px solid var(--line);
  text-align: center;
}
.cal-dow-row span {
  font-family: "Orbitron"; font-size: 8px; letter-spacing: .14em; color: var(--muted);
  padding: 8px 0;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day {
  min-height: 52px; padding: 6px 4px 4px;
  border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: default;
}
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.today .cal-num {
  background: var(--cyan); color: #021018; border-radius: 50%;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.cal-day.has-sched { background: rgba(57,215,255,.05); cursor: pointer; }
.cal-day.has-sched:hover { background: rgba(57,215,255,.1); }
.cal-num { font-size: 12px; color: var(--txt); line-height: 1; min-height: 22px; display: flex; align-items: center; }
.cal-dots { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; }
.cal-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--orange); box-shadow: var(--glow-orange);
}
.cal-dot.more { background: var(--muted); box-shadow: none; }

/* Upcoming list */
.cal-upcoming { display: flex; flex-direction: column; gap: 8px; }
.cal-upcoming-label {
  font-family: "Orbitron"; font-size: 10px; letter-spacing: .3em; color: var(--orange);
  padding: 4px 2px;
}
.cal-no-sched {
  text-align: center; color: var(--muted); font-size: 13px;
  line-height: 1.6; padding: 32px 0;
}
.cal-event {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; animation: rezz .3s ease both;
}
.cal-event.past { opacity: .5; }
.cal-event-time {
  display: flex; flex-direction: column; align-items: center; min-width: 54px;
  flex: none; text-align: center;
}
.cal-event-day { font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.cal-event-clock { font-family: "Orbitron"; font-size: 11px; color: var(--cyan); }
.cal-event-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cal-event-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event-note { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-gcal-btn {
  flex: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--cyan); font-family: "Orbitron"; font-size: 8px; letter-spacing: .1em;
  padding: 6px 8px; text-decoration: none; white-space: nowrap; transition: .15s;
}
.cal-gcal-btn:hover { background: var(--cyan); color: #021018; border-color: var(--cyan); }

/* ---- Sync indicator dot ---- */
.sync-dot {
  position: fixed; top: 18px; right: 58px; z-index: 50;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: var(--glow);
  animation: pulse-dot 1s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

@media (min-width: 620px) {
  .controls, .brandbar, .banner, .list, .empty, .footer, .suggest-panel { max-width: 620px; margin-left: auto; margin-right: auto; }
  h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .grid-bg::after, .scanline, .empty-ring, .card { animation: none; }
}

/* ======================================================
   AUTH + GROUPS + HEADER — new styles
   ====================================================== */

/* ---- Header right side ---- */
.header-right {
  display: flex; align-items: center; gap: 8px;
}

.region-btn {
  display: flex; align-items: center; gap: 4px;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); font-family: "Orbitron"; font-size: 10px; letter-spacing: .14em;
  padding: 6px 10px; cursor: pointer; transition: .15s;
}
.region-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.region-ico { font-size: 12px; }

/* ---- Group selector button (header) ---- */
.group-selector-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(57,215,255,.07); border: 1px solid var(--cyan-dim);
  border-radius: 10px; color: var(--cyan-bright);
  font-family: "Orbitron"; font-size: 10px; letter-spacing: .12em; font-weight: 700;
  padding: 6px 11px; cursor: pointer; transition: .15s;
  max-width: 160px; overflow: hidden;
}
.group-selector-btn:hover { background: rgba(57,215,255,.14); border-color: var(--cyan); box-shadow: var(--glow); }
#group-name-display {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px;
}
.group-chevron { color: var(--cyan-dim); font-size: 12px; flex: none; }

/* ---- Group dropdown ---- */
.group-dropdown {
  position: fixed; top: 56px; right: 16px; z-index: 200;
  min-width: 220px; max-width: 290px;
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.7), 0 0 0 1px rgba(57,215,255,.06);
  overflow: hidden; animation: fade .15s ease;
}
.group-dropdown-list { display: flex; flex-direction: column; }
.dd-group-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; background: transparent; border: 0; border-bottom: 1px solid var(--line-soft);
  color: var(--txt); cursor: pointer; text-align: left; transition: .15s; width: 100%;
}
.dd-group-item:hover { background: rgba(57,215,255,.09); }
.dd-group-item.active { background: rgba(57,215,255,.12); }
.dd-group-name { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-group-role { font-family: "Orbitron"; font-size: 8px; letter-spacing: .14em; color: var(--cyan-dim); margin-left: 8px; flex: none; }
.dd-empty { padding: 14px; color: var(--muted); font-size: 13px; text-align: center; }
.group-dropdown-actions { display: flex; flex-direction: column; }
.group-dd-btn {
  padding: 11px 14px; background: transparent; border: 0; border-top: 1px solid var(--line-soft);
  color: var(--cyan); font-family: "Orbitron"; font-size: 9px; letter-spacing: .14em;
  cursor: pointer; text-align: left; transition: .15s; font-weight: 700;
}
.group-dd-btn:hover { background: rgba(57,215,255,.09); }

/* ---- User avatar button ---- */
.user-avatar-btn {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255,255,255,.15); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: "Orbitron"; font-size: 11px; font-weight: 700;
  color: #021018; letter-spacing: 0; transition: .15s;
}
.user-avatar-btn:hover { border-color: rgba(255,255,255,.5); box-shadow: 0 0 12px rgba(57,215,255,.3); }

/* ---- User menu ---- */
.user-menu {
  position: fixed; top: 56px; right: 16px; z-index: 200;
  min-width: 200px;
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.7), 0 0 0 1px rgba(57,215,255,.06);
  overflow: hidden; animation: fade .15s ease;
}
.user-menu-header { padding: 14px 14px 10px; border-bottom: 1px solid var(--line-soft); }
.um-name { font-weight: 700; font-size: 15px; color: var(--cyan-bright); margin-bottom: 2px; }
.um-email { font-size: 11px; color: var(--muted); letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-trial { padding: 8px 14px; font-size: 11px; letter-spacing: .06em; color: var(--muted); font-family: "Orbitron"; border-bottom: 1px solid var(--line-soft); }
.um-trial-warn { color: var(--orange); }
.user-menu-divider { height: 1px; background: var(--line-soft); }
.um-item {
  display: block; width: 100%; padding: 11px 14px;
  background: transparent; border: 0; border-bottom: 1px solid var(--line-soft);
  color: var(--txt); font-family: "Orbitron"; font-size: 9px; letter-spacing: .14em;
  cursor: pointer; text-align: left; transition: .15s; font-weight: 700;
}
.um-item:last-child { border-bottom: 0; }
.um-item:hover { background: rgba(57,215,255,.09); color: var(--cyan); }
.um-logout { color: var(--muted); }
.um-logout:hover { background: rgba(255,95,109,.09); color: #ff5f6d; }

/* ---- Auth modal ---- */
.auth-card {
  text-align: center; max-width: 400px;
}
.auth-logo {
  font-family: "Orbitron"; font-size: 40px; color: var(--cyan);
  text-shadow: var(--glow); margin-bottom: 6px; display: block;
}
.auth-card h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: .3em; }
.auth-tagline { margin: 0 0 20px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.auth-tabs {
  display: flex; gap: 0; margin-bottom: 20px;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.auth-tab {
  flex: 1; padding: 10px 0; background: transparent; border: 0;
  color: var(--muted); font-family: "Orbitron"; font-size: 9px; letter-spacing: .18em;
  cursor: pointer; transition: .15s;
}
.auth-tab.active { background: var(--cyan); color: #021018; font-weight: 700; }
.auth-tab:not(.active):hover { background: rgba(57,215,255,.08); color: var(--cyan); }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-input {
  width: 100%; background: rgba(0,0,0,.4); border: 1px solid var(--line);
  border-radius: 10px; color: var(--cyan-bright); font-family: "Rajdhani"; font-size: 16px;
  font-weight: 600; letter-spacing: .06em; padding: 12px 14px; outline: none;
  transition: border-color .2s, box-shadow .2s; box-sizing: border-box;
}
.auth-input:focus { border-color: var(--cyan); box-shadow: var(--glow); }
.auth-input::placeholder { color: var(--muted); }
.auth-error {
  background: rgba(255,95,109,.1); border: 1px solid rgba(255,95,109,.3);
  border-radius: 8px; padding: 9px 12px; color: #ffd5d9;
  font-size: 13px; line-height: 1.4; text-align: left;
}
.auth-btn {
  width: 100%; background: var(--cyan); color: #021018; border: none;
  border-radius: 12px; font-family: "Orbitron"; font-size: 12px; font-weight: 700;
  letter-spacing: .2em; padding: 14px; cursor: pointer; transition: .15s;
  box-shadow: var(--glow); margin-top: 4px;
}
.auth-btn:hover { background: var(--cyan-bright); }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; }
.auth-btn-sm {
  flex: none; background: var(--cyan); color: #021018; border: none;
  border-radius: 10px; font-family: "Orbitron"; font-size: 10px; font-weight: 700;
  letter-spacing: .14em; padding: 12px 14px; cursor: pointer; transition: .15s;
  white-space: nowrap;
}
.auth-btn-sm:hover { background: var(--cyan-bright); }
.auth-btn-sm:disabled { opacity: .5; cursor: not-allowed; }
.auth-fine { margin: 6px 0 0; font-size: 11px; color: var(--muted); letter-spacing: .04em; }

/* ---- Group setup modal ---- */
.group-setup-card { text-align: center; max-width: 400px; }
.group-setup-card h2 { margin-bottom: 4px; }
.group-setup-label {
  display: block; font-family: "Orbitron"; font-size: 9px; letter-spacing: .2em;
  color: var(--muted); margin-bottom: 8px; text-align: left;
}
.group-setup-section { display: flex; flex-direction: column; }
.group-setup-row { display: flex; gap: 8px; }
.group-setup-row .auth-input { flex: 1; }
.group-setup-divider {
  display: flex; align-items: center; gap: 12px; margin: 14px 0;
  color: var(--muted); font-family: "Orbitron"; font-size: 9px; letter-spacing: .2em;
}
.group-setup-divider::before, .group-setup-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ---- Generic modal actions ---- */
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

/* ---- Trial banner ---- */
.trial-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 16px; background: rgba(255,177,78,.08); border-bottom: 1px solid rgba(255,177,78,.25);
  color: var(--orange); font-size: 13px; font-weight: 600; letter-spacing: .04em;
}
.trial-upgrade-btn {
  flex: none; background: var(--orange); color: #1a0a00; border: none;
  border-radius: 8px; font-family: "Orbitron"; font-size: 9px; font-weight: 700;
  letter-spacing: .12em; padding: 6px 12px; cursor: pointer; white-space: nowrap;
  transition: .15s;
}
.trial-upgrade-btn:hover { background: var(--orange-bright); }

/* ---- Expired modal ---- */
.expired-card { text-align: center; max-width: 360px; }
.expired-icon { font-size: 42px; margin-bottom: 12px; }
.expired-price {
  font-family: "Orbitron"; font-size: 32px; font-weight: 900; color: var(--cyan-bright);
  text-shadow: var(--glow); margin: 16px 0 20px;
}
.expired-price span { font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: .08em; }

/* ---- Members modal ---- */
.members-card { max-width: 480px; }
.members-card h2 { margin-bottom: 14px; }
.invite-section { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.invite-label { font-family: "Orbitron"; font-size: 9px; letter-spacing: .2em; color: var(--muted); margin-bottom: 8px; }
.invite-code-row { display: flex; align-items: center; gap: 8px; }
.invite-code-text {
  flex: 1; font-family: "Orbitron"; font-size: 20px; font-weight: 900;
  letter-spacing: .3em; color: var(--cyan-bright); text-shadow: var(--glow);
}
.invite-copy-btn {
  background: var(--cyan); color: #021018; border: none; border-radius: 8px;
  font-family: "Orbitron"; font-size: 9px; font-weight: 700; letter-spacing: .14em;
  padding: 7px 12px; cursor: pointer; transition: .15s;
}
.invite-copy-btn:hover { background: var(--cyan-bright); }
.invite-regen-btn {
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-size: 16px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s; line-height: 1;
}
.invite-regen-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.members-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.member-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px;
}
.member-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: "Orbitron"; font-size: 12px; font-weight: 700; color: #021018;
}
.member-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.member-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-role {
  display: inline-block; font-family: "Orbitron"; font-size: 8px; letter-spacing: .16em;
  padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line);
}
.member-role.role-owner { color: var(--orange); border-color: rgba(255,177,78,.4); }
.member-role.role-admin { color: var(--cyan); border-color: var(--cyan-dim); }
.member-role.role-member { color: var(--muted); }
.member-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.member-role-btn {
  background: transparent; border: 1px solid var(--line); border-radius: 7px;
  color: var(--muted); font-family: "Orbitron"; font-size: 8px; letter-spacing: .12em;
  padding: 5px 9px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.member-role-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.member-kick-btn {
  background: transparent; border: 1px solid rgba(255,95,109,.3); border-radius: 7px;
  color: #ff5f6d; font-family: "Orbitron"; font-size: 8px; letter-spacing: .12em;
  padding: 5px 9px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.member-kick-btn:hover { background: rgba(255,95,109,.1); border-color: #ff5f6d; }

/* ---- Responsive tweaks for new header elements ---- */
@media (max-width: 380px) {
  .group-selector-btn { max-width: 100px; }
  #group-name-display { max-width: 70px; }
}

/* Update brandbar to accommodate new right-side buttons */
.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ======================================================
   PROFILE MODAL
   ====================================================== */

.profile-card { max-width: 480px; padding-top: 16px; }

/* ---- Profile tabs ---- */
.profile-tabs {
  display: flex; gap: 0; margin-bottom: 20px;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.profile-tab {
  flex: 1; padding: 10px 0; background: transparent; border: 0;
  color: var(--muted); font-family: "Orbitron"; font-size: 9px; letter-spacing: .16em;
  cursor: pointer; transition: .15s;
}
.profile-tab.active { background: var(--cyan); color: #021018; font-weight: 700; }
.profile-tab:not(.active):hover { background: rgba(57,215,255,.08); color: var(--cyan); }

/* ---- ptab panels ---- */
.ptab { display: flex; flex-direction: column; gap: 10px; }

/* ---- Avatar large ---- */
.profile-avatar-wrap { display: flex; justify-content: center; margin-bottom: 4px; }
.profile-avatar-large {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: "Orbitron"; font-size: 28px; font-weight: 900; color: #021018;
  border: 3px solid rgba(255,255,255,.2); box-shadow: 0 0 24px rgba(57,215,255,.25);
  transition: background .2s;
}

/* ---- Color swatches ---- */
.profile-color-swatches {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.color-swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s, border-color .15s;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.chosen { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.4); transform: scale(1.1); }

/* ---- Bio textarea ---- */
.profile-bio-input {
  width: 100%; background: rgba(0,0,0,.4); border: 1px solid var(--line);
  border-radius: 10px; color: var(--cyan-bright); font-family: "Rajdhani"; font-size: 15px;
  font-weight: 500; padding: 11px 14px; outline: none; resize: none; min-height: 70px;
  transition: border-color .2s; box-sizing: border-box;
}
.profile-bio-input:focus { border-color: var(--cyan); }
.profile-bio-input::placeholder { color: var(--muted); }

/* ---- Email row ---- */
.profile-email-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: rgba(0,0,0,.2); border: 1px solid var(--line-soft); border-radius: 10px;
}
.profile-email-label {
  font-family: "Orbitron"; font-size: 9px; letter-spacing: .18em; color: var(--muted); flex: none;
}
.profile-email-val { font-size: 13px; color: var(--txt); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---- Tastes sections ---- */
.tastes-section { display: flex; flex-direction: column; gap: 8px; }
.tastes-label {
  font-family: "Orbitron"; font-size: 9px; letter-spacing: .2em; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.tastes-hint { font-size: 8px; letter-spacing: .1em; color: var(--line); font-family: "Rajdhani"; }

/* ---- Content type toggle ---- */
.content-type-row {
  display: flex; gap: 6px;
}
.ct-btn {
  flex: 1; padding: 10px 6px; background: transparent; border: 1px solid var(--line);
  border-radius: 10px; color: var(--muted); font-family: "Orbitron"; font-size: 9px;
  letter-spacing: .1em; cursor: pointer; transition: .15s; text-align: center;
}
.ct-btn:hover { border-color: var(--cyan-dim); color: var(--cyan-dim); }
.ct-btn.ct-active { background: rgba(57,215,255,.12); border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow); }

/* ---- Genre / streamer chips ---- */
.taste-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.taste-chip {
  padding: 6px 12px; background: transparent; border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 600;
  letter-spacing: .04em; cursor: pointer; transition: .15s; white-space: nowrap;
}
.taste-chip:hover { border-color: var(--orange-dim, rgba(255,177,78,.5)); color: var(--orange); }
.taste-chip.taste-on {
  background: rgba(255,177,78,.12); border-color: var(--orange); color: var(--orange);
  box-shadow: var(--glow-orange);
}

/* ---- Invite hero ---- */
.invite-hero { text-align: center; padding: 12px 0 16px; }
.invite-hero-label {
  font-family: "Orbitron"; font-size: 9px; letter-spacing: .24em; color: var(--muted); margin-bottom: 10px;
}
.invite-hero-code {
  font-family: "Orbitron"; font-size: 36px; font-weight: 900; letter-spacing: .4em;
  color: var(--cyan-bright); text-shadow: var(--glow); margin-bottom: 6px;
}
.invite-hero-group { font-size: 12px; color: var(--muted); letter-spacing: .06em; }

/* ---- Share grid ---- */
.invite-share-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.share-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 8px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; cursor: pointer; transition: .15s;
}
.share-btn:hover { border-color: var(--cyan); background: rgba(57,215,255,.07); }
.share-icon { font-size: 22px; line-height: 1; }
.share-label {
  font-family: "Orbitron"; font-size: 8px; letter-spacing: .14em; color: var(--muted);
}
.share-btn:hover .share-label { color: var(--cyan); }

/* ---- Invite preview text ---- */
.invite-preview-text {
  background: rgba(0,0,0,.3); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 10px 12px; font-size: 12px; color: var(--muted); line-height: 1.6;
  white-space: pre-line; word-break: break-word; margin-top: 4px;
}

