@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg:         #000;
  --bg-card:    #0d0d0d;
  --bg-el:      #1a1a1a;
  --bg-input:   #111;
  --border:     #222;
  --border-lt:  #2a2a2a;

  --red:        #e03030;
  --red-dim:    rgba(224,48,48,.1);
  --red-border: rgba(224,48,48,.22);

  --tab-blue:   #4da6ff;

  --text:       #f0f0f0;
  --text-sub:   #888;
  --text-muted: #444;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --font: 'Inter', sans-serif;
  --nav-h: 52px;
  --tab-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}
::-webkit-scrollbar { width: 0; }

/* ── SPLASH ─────────────────── */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
}
#splash.hidden { display: none !important; }
.splash-logo {
  font-size: 2.4rem; font-weight: 700; letter-spacing: .06em;
}
.splash-logo span { color: var(--red); }

/* ── ONBOARDING ──────────────── */
#onboarding {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg);
  display: flex; align-items: flex-end;
}
#onboarding.hidden { display: none !important; }
.onboarding-inner {
  width: 100%; padding: 0 0 48px;
  display: flex; flex-direction: column; gap: 32px;
}
.ob-slides { position: relative; overflow: hidden; height: 260px; }
.ob-slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 0 36px; gap: 16px;
  opacity: 0; transform: translateX(40px);
  transition: opacity .3s, transform .3s;
}
.ob-slide.active { opacity: 1; transform: none; }
.ob-icon { font-size: 3.6rem; }
.ob-title { font-size: 1.3rem; font-weight: 700; }
.ob-text { font-size: .88rem; color: var(--text-sub); line-height: 1.6; }
.ob-dots { display: flex; justify-content: center; gap: 7px; }
.ob-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border-lt); transition: background .2s, width .2s;
}
.ob-dot.active { background: var(--red); width: 18px; border-radius: 3px; }
.ob-actions {
  display: flex; justify-content: space-between;
  align-items: center; padding: 0 24px;
}

/* ── FULLPAGE ────────────────── */
.fullpage {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.fullpage.visible { transform: none; }
.fullpage.hidden { display: none !important; }

/* ── TOPBAR (subpages) ────────── */
.subpage-topbar, .auth-topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); flex-shrink: 0;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.subpage-title {
  font-size: .95rem; font-weight: 600;
}
.subpage-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: none; border: none;
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.back-btn:hover { background: var(--bg-el); }

/* ── AUTH PAGES ──────────────── */
.auth-content {
  flex: 1; overflow-y: auto; padding: 32px 24px 48px;
  display: flex; flex-direction: column;
}
.auth-logo {
  font-size: 2rem; font-weight: 700; letter-spacing: .05em;
  margin-bottom: 28px;
}
.auth-logo span { color: var(--red); }
.auth-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: .84rem; color: var(--text-sub); }

/* ── FORMS ───────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: .72rem; font-weight: 500;
  color: var(--text-sub); letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 6px;
}
.form-input {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  font-family: var(--font); font-size: .88rem;
  padding: 10px 13px; outline: none;
  transition: border-color .15s;
}
.form-input:focus { border-color: var(--red); }
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { resize: none; min-height: 76px; }

.games-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.game-input-row { display: flex; gap: 7px; align-items: center; }
.game-input-row .game-ac-wrap { flex: 1; position: relative; }
.btn-remove-game {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--bg-el); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-sub); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
  transition: color .15s, border-color .15s;
}
.btn-remove-game:hover { color: var(--red); border-color: var(--red-border); }
.btn-add-game {
  width: 100%; background: none;
  border: 1px dashed var(--border-lt);
  border-radius: var(--r-sm); color: var(--text-sub);
  font-size: .8rem; font-family: var(--font);
  padding: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: border-color .15s, color .15s; margin-top: 4px;
}
.btn-add-game:hover { border-color: var(--red-border); color: var(--red); }

/* ── BUTTONS ─────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font); font-weight: 500; border: none; cursor: pointer;
  border-radius: var(--r-sm); transition: opacity .15s; white-space: nowrap;
}
.btn-primary {
  width: 100%; background: var(--red); color: #fff;
  font-weight: 600; padding: 12px; font-size: .9rem;
}
.btn-primary:hover { opacity: .88; }
.btn-primary:active { opacity: .75; }
.btn-secondary {
  background: var(--bg-el); color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 14px; font-size: .84rem;
}
.btn-secondary:hover { border-color: var(--border-lt); }
.btn-ghost {
  background: none; color: var(--text-sub);
  padding: 8px 14px; font-size: .84rem;
}
.btn-ghost:hover { color: var(--text); }
.btn-danger {
  background: var(--red-dim); color: var(--red);
  border: 1px solid var(--red-border);
  padding: 8px 14px; font-size: .82rem;
}
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn-link {
  background: none; border: none; color: var(--red);
  font-size: .84rem; cursor: pointer; font-family: var(--font);
}

/* ── MAIN APP ────────────────── */
#app { position: fixed; inset: 0; }
#app.hidden { display: none !important; }
.app-wrapper {
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ── TOP NAV ─────────────────── */
.top-nav {
  position: fixed;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 100;
}
.nav-logo { font-size: 1.35rem; font-weight: 700; letter-spacing: .05em; }
.nav-logo span { color: var(--red); }
.nav-actions { display: flex; gap: 6px; align-items: center; }
.nav-icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: none; border: none; color: var(--text-sub); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s; position: relative;
}
.nav-icon-btn:hover { background: var(--bg-el); color: var(--text); }
.nav-login-btn {
  background: var(--red); color: #fff; border: none;
  border-radius: var(--r-sm); padding: 6px 14px;
  font-family: var(--font); font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: opacity .15s;
}
.nav-login-btn:hover { opacity: .88; }
.notif-badge {
  position: absolute; top: 1px; right: 1px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--bg);
}

/* ── PAGES ───────────────────── */
.page {
  display: none;
  position: fixed;
  top: var(--nav-h);
  bottom: var(--tab-h);
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1;
}
.page.active { display: block; }

/* ── BOTTOM TABS ─────────────── */
.bottom-tabs {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: var(--tab-h);
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  z-index: 100;
}
.tab-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: .6rem; font-family: var(--font);
  font-weight: 500; transition: color .15s; position: relative;
}
.tab-btn.active { color: var(--tab-blue); }
.tab-btn.active::after {
  content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 2px;
  background: var(--tab-blue); border-radius: 0 0 2px 2px;
}
.tab-svg { transition: none; }

/* ── FAB ─────────────────────── */
.fab {
  position: fixed;
  bottom: calc(var(--tab-h) + 14px);
  right: max(14px, calc(50vw - 240px + 14px));
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--red); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 50; transition: opacity .15s;
  box-shadow: 0 2px 12px rgba(224,48,48,.35);
}
.fab:hover { opacity: .88; }
.fab.hidden { display: none !important; }
.filter-strip {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px 8px;
  flex-shrink: 0;
}
.filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-chip {
  flex-shrink: 0; background: var(--bg-el); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text-sub);
  font-size: .74rem; font-family: var(--font); font-weight: 500;
  padding: 4px 13px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.filter-chip:hover { border-color: var(--border-lt); color: var(--text); }
.filter-chip.active { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.filter-time-wrap { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.filter-time-label { font-size: .7rem; color: var(--text-muted); white-space: nowrap; }
.filter-time-input {
  background: var(--bg-el); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  font-family: var(--font); font-size: .74rem;
  padding: 4px 7px; outline: none; width: 74px;
  transition: border-color .15s;
}
.filter-time-input:focus { border-color: var(--red); }
.filter-time-sep { color: var(--text-muted); font-size: .76rem; }
.filter-time-clear {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: .78rem; padding: 2px 3px; transition: color .15s;
}
.filter-time-clear:hover { color: var(--red); }
#game-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }

/* ── FEED ────────────────────── */
.feed-container { padding: 6px 0 80px; }

/* ── POST CARD ───────────────── */
.post-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.post-card:active { background: var(--bg-card); }

.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-el); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 600; color: var(--text);
  flex-shrink: 0; overflow: hidden; cursor: pointer;
}
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-meta { flex: 1; min-width: 0; }
.post-username {
  font-weight: 600; font-size: .86rem; color: var(--text); cursor: pointer;
}
.post-time { font-size: .7rem; color: var(--text-muted); }
.post-game-badge {
  background: var(--red-dim); border: 1px solid var(--red-border);
  border-radius: 20px; color: var(--red);
  font-size: .68rem; font-weight: 600; padding: 2px 9px; white-space: nowrap;
}

.post-body { margin-bottom: 11px; }
.post-time-range {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-el); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 11px;
  font-size: .8rem; font-weight: 500; margin-bottom: 6px;
}
.post-text { font-size: .84rem; color: var(--text-sub); line-height: 1.5; }

.post-footer { display: flex; align-items: center; gap: 4px; }
.post-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: .76rem;
  font-family: var(--font); padding: 5px 6px;
  border-radius: var(--r-sm); transition: color .15s;
}
.post-action-btn:hover { color: var(--text-sub); }
.post-action-btn.btn-comment:hover { color: var(--red); }
.post-action-btn.btn-save.saved { color: var(--red); }
.post-expires { font-size: .66rem; color: var(--text-muted); margin-left: auto; }
.btn-msg-post {
  margin-left: auto; background: none;
  border: 1px solid var(--border-lt); border-radius: 20px;
  color: var(--text-sub); font-size: .74rem; font-weight: 500;
  padding: 3px 12px; cursor: pointer; font-family: var(--font);
  transition: all .15s;
}
.btn-msg-post:hover { border-color: var(--red-border); color: var(--red); }

/* ── DISCOVER ────────────────── */
.discover-search-wrap {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
}
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-el); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 9px 14px;
  transition: border-color .15s;
}
.search-bar:focus-within { border-color: var(--border-lt); }
.search-bar svg { color: var(--text-muted); flex-shrink: 0; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font); font-size: .88rem;
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: .8rem; padding: 2px;
}
.discover-section-title {
  padding: 14px 16px 8px;
  font-size: .7rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em;
}
.game-cards-grid { padding: 4px 12px 80px; display: flex; flex-direction: column; gap: 8px; }
.game-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px 16px; cursor: pointer;
  transition: border-color .15s;
}
.game-card:hover { border-color: var(--border-lt); }
.game-card-name { font-size: .95rem; font-weight: 600; margin-bottom: 3px; }
.game-card-stats { font-size: .74rem; color: var(--text-muted); margin-bottom: 8px; }
.stat-num { color: var(--red); font-weight: 600; }
.game-card-players { display: flex; }
.mini-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-el); border: 2px solid var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 600; color: var(--text);
  margin-left: -4px; overflow: hidden;
}
.mini-avatar:first-child { margin-left: 0; }
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Arama sonuçları */
.search-result-section { padding: 14px 16px 6px; font-size: .7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background .1s;
}
.search-result-item:hover { background: var(--bg-card); }
.search-result-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-el); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .88rem; font-weight: 600; flex-shrink: 0; overflow: hidden;
}
.search-result-avatar img { width: 100%; height: 100%; object-fit: cover; }
.search-result-name { font-weight: 600; font-size: .86rem; }
.search-result-sub { font-size: .73rem; color: var(--text-muted); }

/* ── COMMUNITY PAGE ──────────── */
#community-feed-container { padding-bottom: 30px; }
.community-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.community-header h2 { font-size: 1.2rem; font-weight: 700; }
.community-header p { font-size: .8rem; color: var(--text-muted); margin-top: 3px; }

/* ── PROFILE PAGE ────────────── */
.profile-page-content { padding-bottom: 80px; }
.profile-hero { padding: 20px 16px 14px; border-bottom: 1px solid var(--border); }
.profile-top-row { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar-lg {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg-el); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 700; overflow: hidden;
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-edit-btn {
  position: absolute; bottom: 0; right: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-sub); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s;
}
.profile-photo-edit-btn:hover { color: var(--red); }
.profile-info { flex: 1; }
.profile-username-row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.profile-username { font-size: 1.1rem; font-weight: 700; }
.profile-edit-name-btn {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 2px;
  display: flex; align-items: center; transition: color .15s;
}
.profile-edit-name-btn:hover { color: var(--red); }
.profile-score-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .73rem; font-weight: 600; color: #e8b800;
}
.profile-stats { display: flex; gap: 20px; }
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-item.clickable { cursor: pointer; }
.stat-item.clickable:hover .stat-value { opacity: .7; }
.stat-value { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: .62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 1px; }
.profile-section { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.profile-section-title {
  font-size: .68rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px;
}
.games-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.game-tag {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg-el); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 11px; font-size: .76rem;
}
.game-tag .btn-remove-tag {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: .78rem; line-height: 1; padding: 0; transition: color .15s;
}
.game-tag .btn-remove-tag:hover { color: var(--red); }
.add-game-inline { display: flex; gap: 7px; margin-top: 8px; }
.add-game-inline .game-ac-wrap { flex: 1; position: relative; }
.profile-tabs { display: flex; border-bottom: 1px solid var(--border); }
.profile-tab {
  flex: 1; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); font-family: var(--font); font-size: .82rem;
  font-weight: 500; padding: 10px 0; cursor: pointer;
  transition: color .15s, border-color .15s; margin-bottom: -1px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.profile-tab.active { color: var(--red); border-bottom-color: var(--red); }
.guest-cta-strip {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--red-dim); border: 1px solid var(--red-border);
  border-radius: var(--r-md); padding: 10px 14px; margin-top: 12px;
  font-size: .78rem; color: var(--text-sub); width: 100%;
}
.guest-cta-strip .btn-link { font-size: .78rem; font-weight: 600; }

/* Yeni misafir profil tasarımı */
.guest-profile-hero {
  padding: 28px 16px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.guest-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--bg-el); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin-bottom: 4px;
}
.guest-profile-name { font-size: 1.1rem; font-weight: 700; }
.guest-profile-tag {
  font-size: .72rem; color: var(--text-muted);
  background: var(--bg-el); border: 1px solid var(--border);
  border-radius: 20px; padding: 2px 10px; margin-bottom: 4px;
}
.guest-hero-btns { display: flex; gap: 8px; margin-top: 8px; }
.guest-limits-box {
  margin: 0 16px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.guest-limits-title {
  font-size: .7rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px;
}
.guest-limit-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: .84rem; color: var(--text-sub);
}
.guest-limit-item:last-child { border-bottom: none; }
.guest-limit-icon { font-size: 1rem; width: 22px; text-align: center; }

.guest-profile-prompt {
  padding: 40px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.guest-profile-prompt p { font-size: .88rem; color: var(--text-sub); line-height: 1.6; }

/* ── USER PROFILE (subpage) ───── */
.up-hero { padding: 20px 16px 14px; border-bottom: 1px solid var(--border); }
.up-top-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.up-avatar {
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--bg-el); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; flex-shrink: 0; overflow: hidden;
}
.up-avatar img { width: 100%; height: 100%; object-fit: cover; }
.up-info { flex: 1; }
.up-username { font-size: 1rem; font-weight: 700; margin-bottom: 3px; }
.up-score { font-size: .73rem; color: #e8b800; font-weight: 600; }
.up-stats { display: flex; gap: 18px; }
.up-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-follow {
  flex: 1; background: var(--red-dim); border: 1px solid var(--red-border);
  border-radius: var(--r-sm); color: var(--red);
  font-size: .82rem; font-weight: 600; padding: 8px;
  cursor: pointer; font-family: var(--font); transition: opacity .15s;
  text-align: center;
}
.btn-follow:hover { opacity: .8; }
.btn-follow.following {
  background: var(--bg-el); border-color: var(--border); color: var(--text-sub);
}
.btn-msg-profile {
  flex: 1; background: var(--bg-el); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  font-size: .82rem; font-weight: 500; padding: 8px;
  cursor: pointer; font-family: var(--font); transition: border-color .15s;
  text-align: center;
}
.btn-msg-profile:hover { border-color: var(--border-lt); }
.btn-give-score {
  background: rgba(232,184,0,.08); border: 1px solid rgba(232,184,0,.2);
  border-radius: var(--r-sm); color: #e8b800;
  font-size: .78rem; font-weight: 600; padding: 8px 12px;
  cursor: pointer; font-family: var(--font);
  display: inline-flex; align-items: center; gap: 4px; transition: opacity .15s;
}
.btn-give-score:hover { opacity: .8; }
.btn-give-score:disabled { opacity: .3; cursor: not-allowed; }

/* ── CONVERSATIONS ───────────── */
.tab-msg-badge {
  position: absolute; top: -4px; right: -8px;
  background: var(--red); color: #fff;
  font-size: .55rem; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; pointer-events: none;
}
.messages-tab-header {
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.messages-tab-header h2 { font-size: 1.2rem; font-weight: 700; }

/* ── CONVERSATIONS ─────────── */
.conv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background .1s;
}
.conv-item:hover { background: var(--bg-card); }
.conv-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-el); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 600; flex-shrink: 0; overflow: hidden;
}
.conv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 600; font-size: .88rem; }
.conv-last { font-size: .76rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-unread {
  background: var(--red); color: #fff; font-size: .62rem; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ── CHAT ────────────────────── */
.chat-topbar-user { display: flex; align-items: center; gap: 9px; }
.chat-topbar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-el); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 600; overflow: hidden;
}
.chat-topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-messages-container {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.chat-input-row {
  display: flex; gap: 8px; padding: 10px 14px;
  border-top: 1px solid var(--border); background: var(--bg); flex-shrink: 0;
}
.chat-input-row .form-input { border-radius: 20px; padding: 8px 14px; }
.chat-bubble { max-width: 72%; padding: 8px 13px; border-radius: 16px; font-size: .85rem; line-height: 1.4; }
.chat-bubble-wrap { display: flex; gap: 7px; align-items: flex-end; }
.chat-bubble-wrap.mine { flex-direction: row-reverse; }
.chat-bubble-wrap.mine .chat-bubble { background: var(--red); color: #fff; border-bottom-right-radius: 3px; }
.chat-bubble-wrap.theirs .chat-bubble { background: var(--bg-el); color: var(--text); border-bottom-left-radius: 3px; }
.chat-time { font-size: .6rem; color: var(--text-muted); padding-bottom: 2px; }
.btn-send {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%;
  background: var(--red); border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: opacity .15s;
}
.btn-send:hover { opacity: .85; }

/* ── NOTIFICATIONS ───────────── */
.notif-item {
  display: flex; gap: 11px; padding: 13px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s;
}
.notif-item:hover { background: var(--bg-card); }
.notif-unread { background: rgba(224,48,48,.03); }
.notif-icon { font-size: 1.1rem; flex-shrink: 0; }
.notif-body { flex: 1; }
.notif-text { font-size: .83rem; }
.notif-game { font-size: .73rem; color: var(--red); margin-top: 1px; }
.notif-time { font-size: .68rem; color: var(--text-muted); margin-top: 3px; }

/* ── COMMENTS ────────────────── */
.comment-post-preview {
  padding: 14px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
#comments-list-container { padding: 10px 16px; }
.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item { display: flex; gap: 10px; }
.comment-avatar {
  border-radius: 50%; background: var(--bg-el); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; flex-shrink: 0; overflow: hidden;
}
.comment-avatar-md { width: 30px; height: 30px; font-size: .74rem; }
.comment-avatar-sm { width: 24px; height: 24px; font-size: .6rem; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-bubble { flex: 1; }
.comment-bubble-username { font-size: .79rem; font-weight: 600; color: var(--red); margin-bottom: 2px; }
.comment-bubble-text { font-size: .83rem; color: var(--text); line-height: 1.45; }
.btn-reply {
  background: none; border: none; color: var(--text-muted);
  font-size: .7rem; cursor: pointer; padding: 3px 0 0;
  display: block; font-family: var(--font); transition: color .15s;
}
.btn-reply:hover { color: var(--red); }
.comment-reply { margin-left: 34px; margin-top: -2px; }

/* ── FOLLOW LIST ─────────────── */
.follow-item {
  display: flex; align-items: center; gap: 11px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s;
}
.follow-item:hover { background: var(--bg-card); }
.follow-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-el); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 600; flex-shrink: 0; overflow: hidden;
}
.follow-avatar img { width: 100%; height: 100%; object-fit: cover; }
.follow-name { font-weight: 600; font-size: .86rem; }
.follow-games { font-size: .72rem; color: var(--text-muted); }

/* ── AUTOCOMPLETE ────────────── */
.game-ac-wrap { position: relative; }
.game-dropdown {
  display: none; position: absolute;
  top: calc(100% + 3px); left: 0; right: 0;
  background: #1a1a1a; border: 1px solid var(--border-lt);
  border-radius: var(--r-md); overflow: hidden; z-index: 600;
  max-height: 220px; overflow-y: auto;
}
.game-dropdown.open { display: block; }
.game-dropdown-item {
  padding: 10px 14px; font-size: .83rem; color: var(--text-sub);
  cursor: pointer; border-bottom: 1px solid #1e1e1e; transition: background .1s, color .1s;
}
.game-dropdown-item:last-child { border-bottom: none; }
.game-dropdown-item:hover, .game-dropdown-item.active { background: #222; color: var(--text); }
.game-dropdown-item mark { background: none; color: var(--red); font-weight: 600; }
.game-dropdown-loading {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: .76rem; color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── MODAL ───────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #111; border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 22px 20px;
  width: 100%; max-width: 320px;
}
.modal-title { font-size: .98rem; font-weight: 700; margin-bottom: 7px; }
.modal-msg { font-size: .82rem; color: var(--text-sub); margin-bottom: 18px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── MISC ────────────────────── */
.time-range-row { display: flex; align-items: center; gap: 7px; }
.time-range-row .form-input { flex: 1; }
.time-sep { color: var(--text-muted); }

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 50px 24px; text-align: center; gap: 8px;
}
.empty-state-icon { font-size: 2.2rem; opacity: .28; }
.empty-state-title { font-size: 1rem; color: var(--text-sub); font-weight: 600; }
.empty-state-text { font-size: .82rem; color: var(--text-muted); max-width: 230px; line-height: 1.5; }

.loading-spinner { display: flex; justify-content: center; padding: 40px; }
.spinner {
  width: 26px; height: 26px; border: 2px solid var(--bg-el);
  border-top-color: var(--red); border-radius: 50%;
  animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-container {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  z-index: 9998; display: flex; flex-direction: column; gap: 6px;
  pointer-events: none; width: 90%; max-width: 340px;
}
.toast {
  background: #111; border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 9px 14px; font-size: .82rem;
  animation: toastIn .22s ease;
}
.toast.error { border-color: var(--red-border); color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.hidden { display: none !important; }
