/* ============================================
   LANATOKK — Global Reset & Variables
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg:         #f7f3ee;   /* warm cream */
  --bg2:        #efe9e0;   /* soft linen */
  --bg3:        #e6dfd4;   /* warm sand */
  --border:     #d4cbbf;   /* light earth */
  --text:       #1e1a12;   /* dark bark */
  --text-muted: #7a7060;   /* warm grey */
  --accent1:    #72b838;   /* bright leaf green */
  --accent2:    #c96a28;   /* terracotta */
  --accent3:    #38a870;   /* light moss */
  --accent-g:   linear-gradient(135deg, #7ec840, #52a020);
  --accent-g2:  linear-gradient(135deg, #38a870, #7ec840);
  --nav-h:      68px;
  --top-h:      56px;
  --radius:     14px;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; }
input  { outline: none; border: none; font-family: inherit; }
a      { color: inherit; text-decoration: none; }


/* ============================================
   TOP BAR
   ============================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(247,243,238,.95) 0%, rgba(247,243,238,.0) 100%);
  border-bottom: 1px solid transparent;
}

.topbar-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo-lana { color: #fff; }
.logo-tok  { background: var(--accent-g); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.topbar-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tab-btn {
  font-size: 15px;
  font-weight: 600;
  color: rgba(30,26,18,.4);
  padding: 4px 2px;
  position: relative;
  transition: color .2s;
}
.tab-btn.active {
  color: var(--text);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 3px;
  border-radius: 2px;
  background: var(--accent-g);
}
.tab-divider {
  width: 1px; height: 14px;
  background: rgba(30,26,18,.2);
}

.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.icon-btn svg { width: 22px; height: 22px; }


/* ============================================
   PAGE CONTAINER
   ============================================ */
.page-container {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--nav-h);
  overflow: hidden;
}

.page {
  display: none;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  background: var(--bg);   /* verhindert Durchscheinen anderer Seiten */
  z-index: 0;
}
.page::-webkit-scrollbar { display: none; }
.page.active {
  display: block;
  z-index: 1;              /* aktive Seite liegt immer oben */
}


/* ============================================
   FOR YOU — FEED
   ============================================ */
.feed {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.video-card {
  position: relative;
  width: 100%;
  height: calc(100dvh - var(--nav-h));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* gradient "video" placeholder */
.video-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.video-play-icon {
  position: absolute;
  width: 60px; height: 60px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.video-card.paused .video-play-icon { opacity: 1; }

/* right action bar */
.video-actions {
  position: absolute;
  right: 12px;
  bottom: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 10;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}
.action-btn svg { width: 30px; height: 30px; }
.action-btn span { font-size: 12px; font-weight: 600; }

.action-btn.liked svg { color: var(--accent2); }

.creator-avatar-btn {
  position: relative;
  margin-bottom: 8px;
}
.creator-avatar-btn .avatar-circle {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  background: var(--accent-g);
  box-shadow: 0 0 0 2px var(--bg);
}
.follow-plus {
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 20px;
  background: var(--accent2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  border: 2px solid var(--bg);
  line-height: 1;
}

/* bottom video info */
.video-info {
  position: absolute;
  bottom: 0; left: 0; right: 64px;
  padding: 16px 16px 24px;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
  z-index: 10;
}

.video-creator {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.verified-badge {
  width: 16px; height: 16px;
  background: var(--accent-g);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.verified-badge svg { width: 10px; height: 10px; }

.video-caption {
  font-size: 13px;
  color: rgba(255,255,255,.95);
  margin-bottom: 8px;
  line-height: 1.4;
}

.video-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 8px;
}
.video-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent3);
}

.video-music {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: rgba(255,255,255,.7);
}
.music-icon { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* coin earn indicator */
.earn-chip {
  position: absolute;
  top: 64px; right: 12px;
  background: rgba(247,243,238,.88);
  border: 1px solid rgba(114,184,56,.4);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent1);
  display: flex; align-items: center; gap: 4px;
  backdrop-filter: blur(8px);
  z-index: 10;
}
.earn-chip svg { width: 12px; height: 12px; }

/* progress bar */
.video-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,.2);
  z-index: 20;
}
.video-progress-bar {
  height: 100%;
  background: var(--accent-g);
  width: 0%;
  transition: width .1s linear;
}


/* ============================================
   SEARCH PAGE
   ============================================ */
.search-container {
  padding: calc(var(--top-h) + 12px) 16px 24px;
  min-height: 100%;
}

.search-bar-wrapper {
  position: relative;
  margin-bottom: 24px;
}
.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--bg3);
  border-radius: 12px;
  padding: 12px 16px 12px 44px;
  font-size: 15px;
  color: var(--text);
  border: 1px solid var(--border);
  transition: border-color .2s;
}
.search-input:focus {
  border-color: var(--accent1);
}
.search-input::placeholder { color: var(--text-muted); }

.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  margin-top: 4px;
}

.trending-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
}
.tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.tag:hover, .tag:active {
  background: rgba(114,184,56,.15);
  border-color: var(--accent1);
  color: var(--accent1);
}

.creator-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.creator-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.creator-row-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  flex-shrink: 0;
}
.creator-row-info { flex: 1; min-width: 0; }
.creator-row-name {
  font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.creator-row-followers { font-size: 12px; color: var(--text-muted); }
.creator-follow-btn {
  background: var(--accent-g);
  color: #fff;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  transition: opacity .2s;
}
.creator-follow-btn:active { opacity: 0.75; }
.creator-follow-btn.following {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: 20px;
}
.search-thumb {
  aspect-ratio: 9/16;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.search-thumb .thumb-bg {
  position: absolute; inset: 0;
}
.search-thumb .thumb-views {
  position: absolute;
  bottom: 6px; left: 6px;
  font-size: 11px; font-weight: 600;
  color: #fff;
  display: flex; align-items: center; gap: 3px;
}


/* ============================================
   SOCIAL PAGE
   ============================================ */
.social-container {
  padding: calc(var(--top-h) + 12px) 0 24px;
  min-height: 100%;
}

.social-tabs {
  display: flex;
  padding: 0 16px;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.social-tab {
  flex: 1;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  transition: color .2s;
}
.social-tab.active {
  color: var(--text);
}
.social-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 3px;
  border-radius: 2px;
  background: var(--accent-g);
}

.social-panel { display: none; padding: 0 16px; }
.social-panel.active { display: block; }

.activity-list, .messages-list {
  display: flex; flex-direction: column; gap: 4px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  transition: background .2s;
  cursor: pointer;
}
.activity-item:hover { background: var(--bg3); }
.activity-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.activity-content { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; line-height: 1.5; }
.activity-text strong { font-weight: 700; }
.activity-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.activity-thumb {
  width: 44px; height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.activity-thumb .thumb-bg { position: absolute; inset: 0; }
.activity-thumb { position: relative; }

.new-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent2);
  flex-shrink: 0;
  margin-top: 6px;
}

.msg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s;
}
.msg-item:hover { background: var(--bg3); }
.msg-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  flex-shrink: 0;
  position: relative;
}
.msg-online {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 11px; height: 11px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--bg);
}
.msg-info { flex: 1; min-width: 0; }
.msg-name { font-size: 14px; font-weight: 700; }
.msg-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg-time { font-size: 11px; color: var(--text-muted); }
.msg-badge {
  background: var(--accent2);
  color: #fff;
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
}

/* AI Chat Item */
.ai-chat-item {
  background: linear-gradient(135deg, rgba(114,184,56,.12), rgba(46,122,90,.08));
  border: 1px solid rgba(114,184,56,.3);
  border-radius: var(--radius);
  margin-bottom: 4px;
}
.ai-chat-item:hover { background: linear-gradient(135deg, rgba(114,184,56,.2), rgba(46,122,90,.12)); }

.ai-avatar {
  background: linear-gradient(135deg, #7ec840, #38a870) !important;
  color: #fff;
  position: relative;
}
.ai-online-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg2), var(--bg2)) padding-box,
              linear-gradient(135deg, #7ec840, #38a870) border-box;
  animation: pulse-ring 2.5s ease-out infinite;
}

.ai-name {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #7ec840, #38a870);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ai-badge {
  background: linear-gradient(135deg, #7ec840, #38a870);
  -webkit-text-fill-color: #fff;
  color: #fff;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
}
.ai-spark {
  color: var(--accent1);
  animation: sparkSpin 3s linear infinite;
}
@keyframes sparkSpin {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50%       { transform: scale(1.3) rotate(180deg); opacity: .7; }
}

.msg-divider {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 10px 12px 6px;
}


/* ============================================
   ACCOUNT PAGE
   ============================================ */
.account-container {
  padding: calc(var(--top-h) + 12px) 16px 24px;
  min-height: 100%;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.avatar-ring {
  padding: 3px;
  border-radius: 50%;
  background: var(--accent-g);
}
.avatar-inner {
  width: 76px; height: 76px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  border: 3px solid var(--bg);
}
.crypto-badge {
  background: rgba(114,184,56,.15);
  border: 1px solid rgba(114,184,56,.35);
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 10px; font-weight: 600;
  color: var(--accent1);
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap;
}

.profile-info { flex: 1; padding-top: 4px; }
.profile-username { font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.profile-handle { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }

.profile-stats {
  display: flex; gap: 20px;
}
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.stat-num { font-size: 17px; font-weight: 800; }
.stat-label { font-size: 11px; color: var(--text-muted); }

.profile-bio {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Wallet card */
.crypto-wallet-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.crypto-wallet-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(114,184,56,.15) 0%, transparent 70%);
  pointer-events: none;
}

.wallet-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
}
.wallet-badge {
  margin-left: auto;
  background: var(--accent-g);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-weight: 800; font-size: 14px;
}
.wallet-balance {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 4px;
}
.balance-amount { font-size: 32px; font-weight: 800; }
.balance-symbol {
  font-size: 16px; font-weight: 600;
  background: var(--accent-g);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.wallet-subtext { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.wallet-actions { display: flex; gap: 10px; }
.wallet-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background .2s;
}
.wallet-btn.primary {
  background: var(--accent-g);
  border: none;
  color: #fff;
}
.wallet-btn:active { opacity: .75; }

/* profile video tabs */
.profile-video-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.pv-tab {
  flex: 1; padding: 12px 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  position: relative;
  transition: color .2s;
}
.pv-tab.active { color: var(--text); }
.pv-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 3px;
  border-radius: 2px;
  background: var(--accent-g);
}

.profile-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 2px;
}
.pv-thumb {
  aspect-ratio: 9/16;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.pv-thumb .thumb-bg { position: absolute; inset: 0; }
.pv-thumb .pv-views {
  position: absolute;
  bottom: 6px; left: 6px;
  font-size: 11px; font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}


/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 0;
  color: var(--text-muted);
  transition: color .2s;
  position: relative;
}
.nav-item.active { color: var(--text); }
.nav-item.active .nav-icon-wrap::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-g);
  background: var(--accent2);
}
.nav-icon-wrap { position: relative; }
.nav-label { font-size: 10px; font-weight: 600; }

/* Upload center button */
.nav-item.upload-btn { flex: 0.8; }
.upload-circle {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, #7ec840, #52a020);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(114,184,56,.45), 0 1px 3px rgba(82,160,32,.3);
  transition: transform .15s, box-shadow .15s;
}
.upload-circle:active {
  transform: scale(0.93);
  box-shadow: 0 2px 8px rgba(58,107,30,.35);
}


/* ============================================
   UPLOAD MODAL
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex; align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px 40px;
  width: 100%;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,1.2,.52,1);
}
.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: var(--bg3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.modal-title {
  font-size: 18px; font-weight: 800;
  margin-bottom: 20px; text-align: center;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
  margin-bottom: 20px;
}
.upload-area:hover {
  border-color: var(--accent1);
  background: rgba(114,184,56,.05);
}
.upload-area p { font-size: 15px; font-weight: 600; }
.upload-hint { font-size: 12px; color: var(--text-muted); }

.upload-options {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px;
}
.upload-opt {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 14px; font-weight: 500;
}
.modal-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}
.modal-input::placeholder { color: var(--text-muted); }

.toggle-wrap { display: flex; }
.toggle {
  width: 44px; height: 26px;
  background: var(--bg3);
  border-radius: 13px;
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background .2s;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform .2s, background .2s;
}
.toggle.active {
  background: rgba(114,184,56,.25);
  border-color: var(--accent1);
}
.toggle.active::after {
  transform: translateX(18px);
  background: var(--accent1);
}

.modal-submit {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  background: var(--accent-g);
  color: #fff;
  font-size: 15px; font-weight: 700;
  transition: opacity .2s;
}
.modal-submit:active { opacity: .75; }


/* ============================================
   ANIMATIONS & UTILITIES
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fadeup { animation: fadeUp .35s ease forwards; }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(114,184,56,.6); }
  70%  { box-shadow: 0 0 0 10px rgba(114,184,56,0); }
  100% { box-shadow: 0 0 0 0 rgba(114,184,56,0); }
}


/* ============================================
   NOSTR LOGIN BUTTON (Account Page)
   ============================================ */
.nostr-login-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7ec840, #38a870);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  width: 100%;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(114,184,56,.3);
  transition: opacity .2s, transform .15s;
}
.nostr-login-btn:hover { opacity: .92; transform: translateY(-1px); }
.nostr-login-btn:active { transform: scale(.97); }
.nostr-key-display {
  font-size: 11px; color: var(--accent1);
  font-family: monospace; letter-spacing: .5px; margin-top: 2px;
}

/* ============================================
   LOGIN MODAL
   ============================================ */
.login-modal-card { border-radius: 24px 24px 0 0; padding: 28px 24px 40px; }
.login-modal-header { text-align: center; margin-bottom: 24px; }
.login-nostr-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #7ec840, #38a870);
  display: flex; align-items: center; justify-content: center;
  color: #fff; margin: 0 auto 14px;
}
.login-subtitle { font-size: 13px; color: var(--text-muted); }

.login-option-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 18px; border-radius: 14px;
  border: 1.5px solid var(--border); background: var(--bg3);
  font-size: 14px; text-align: left; transition: all .2s;
  cursor: pointer; margin-bottom: 10px;
}
.login-option-btn:hover { border-color: var(--accent1); background: rgba(114,184,56,.08); }
.login-option-btn.primary { background: linear-gradient(135deg, #7ec840, #38a870); border-color: transparent; color: #fff; }
.login-option-btn.primary:hover { opacity: .9; }
.login-option-title { font-weight: 700; font-size: 14px; }
.login-option-sub   { font-size: 11px; opacity: .75; margin-top: 2px; }

.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0 12px; color: var(--text-muted); font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.login-npub-section { margin-bottom: 10px; }
.login-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }

.login-status {
  font-size: 13px; padding: 8px 12px; border-radius: 8px;
  margin: 10px 0; min-height: 36px; display: flex; align-items: center;
}
.login-status.loading { background: rgba(114,184,56,.1); color: var(--accent1); }
.login-status.error   { background: rgba(201,106,40,.1); color: var(--accent2); }
.login-status.success { background: rgba(114,184,56,.15); color: var(--accent1); }

.login-privacy { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 14px; line-height: 1.6; }

/* ============================================
   AI CHAT MODAL
   ============================================ */
.ai-chat-modal {
  border-radius: 24px 24px 0 0; padding: 0;
  display: flex; flex-direction: column;
  height: 80vh; max-height: 620px; overflow: hidden;
}
.ai-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: var(--bg2);
}
.ai-chat-header-left { display: flex; align-items: center; gap: 12px; }
.ai-avatar-sm {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #7ec840, #38a870);
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.ai-chat-title { font-size: 15px; font-weight: 700; }
.ai-chat-sub   { font-size: 11px; color: var(--accent1); }

.ai-chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: none; background: var(--bg);
}
.ai-chat-messages::-webkit-scrollbar { display: none; }

.ai-bubble {
  max-width: 82%; padding: 10px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.5; word-break: break-word;
}
.ai-bubble.ai {
  background: var(--bg3); border: 1px solid var(--border);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.ai-bubble.user {
  background: linear-gradient(135deg, #7ec840, #38a870);
  color: #fff; align-self: flex-end; border-bottom-right-radius: 4px;
}
.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 12px 16px; }
.typing-indicator span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted);
  animation: typingBounce 1.2s ease infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40%           { transform: translateY(-6px); }
}

.ai-chat-input-row {
  display: flex; gap: 8px; padding: 12px 16px 16px;
  border-top: 1px solid var(--border); background: var(--bg2); flex-shrink: 0;
}
.ai-chat-input {
  flex: 1; background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 10px 14px; font-size: 14px; color: var(--text);
  transition: border-color .2s;
}
.ai-chat-input:focus { border-color: var(--accent1); }
.ai-chat-input::placeholder { color: var(--text-muted); }
.ai-send-btn {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #7ec840, #38a870); color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity .2s;
}
.ai-send-btn:hover { opacity: .9; }
.ai-send-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Desktop: modals zentriert */
@media (min-width: 900px) {
  .login-modal-card, .ai-chat-modal {
    border-radius: 20px;
    width: 460px; max-width: 90vw;
    height: auto; max-height: 85vh;
  }
  .ai-chat-modal { height: 600px; }
}

/* ============================================
   DESKTOP SIDEBAR (hidden on mobile)
   ============================================ */
.sidebar {
  display: none;
}

/* Desktop FYP overlay bar (hidden on mobile) */
.fyp-desktop-bar {
  display: none;
}

/* ============================================
   DESKTOP LAYOUT  ≥ 900px
   ============================================ */
@media (min-width: 900px) {

  /* ── Hide mobile chrome ── */
  .topbar   { display: none !important; }
  .bottomnav { display: none !important; }

  /* ── Show sidebar ── */
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 240px;
    background: var(--bg);
    border-right: 1.5px solid var(--border);
    padding: 28px 16px 24px;
    z-index: 200;
    gap: 0;
  }

  .sidebar-logo {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    padding: 0 12px 32px;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 12px;
    background: transparent;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    width: 100%;
    text-align: left;
    transition: background .15s, color .15s;
    cursor: pointer;
  }
  .sidebar-item:hover { background: var(--bg2); color: var(--text); }
  .sidebar-item.active {
    background: var(--bg2);
    color: var(--accent1);
    font-weight: 700;
  }

  .sidebar-spacer { flex: 1; }

  .sidebar-upload-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border-radius: 12px;
    background: linear-gradient(145deg, #7ec840, #52a020);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    width: 100%;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(114,184,56,.35);
    transition: opacity .15s, transform .15s;
    cursor: pointer;
  }
  .sidebar-upload-btn:hover { opacity: .92; transform: translateY(-1px); }
  .sidebar-upload-btn:active { transform: scale(.97); }

  .sidebar-wallet {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg2);
    border-radius: 14px;
    border: 1.5px solid var(--border);
    color: var(--accent1);
  }
  .sw-label { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
  .sw-amount { font-size: 13px; font-weight: 700; color: var(--accent1); margin-top: 2px; }

  /* ── Shift page container ── */
  .page-container {
    left: 240px;
    right: 0;
    top: 0;
    bottom: 0;
  }

  /* ── Pages fill full height ── */
  .page { height: 100vh; }

  /* ── FYP: centered column ── */
  #page-foryou {
    background: var(--bg2);
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .fyp-desktop-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    background: rgba(247,243,238,.88);
    backdrop-filter: blur(12px);
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
  }

  #page-foryou .feed {
    width: 100%;
    max-width: 400px;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    box-shadow: 0 0 60px rgba(0,0,0,.1);
  }
  #page-foryou .feed::-webkit-scrollbar { display: none; }

  .video-card {
    height: 100vh;
    border-radius: 0;
  }

  .earn-chip { top: 80px; }

  /* ── Search: wider centered ── */
  .search-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 40px 48px;
  }
  .search-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  /* ── Social: side-by-side panels ── */
  .social-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 40px 48px;
  }
  .social-tabs { display: none; }
  .social-panel { display: block !important; padding: 0; }
  #panel-activity,
  #panel-messages {
    display: block;
  }
  .social-container > div:last-of-type {
    /* wrap panels side by side */
  }
  .social-panels-desktop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 0;
  }
  .social-panel-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--border);
  }

  /* ── Account: centered wider ── */
  .account-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px 40px 48px;
  }
  .profile-avatar { flex-direction: row; align-items: center; }
  .avatar-inner { width: 96px; height: 96px; font-size: 28px; }
  .profile-stat { gap: 32px; }
  .profile-video-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }

  /* ── Modal: centered dialog on desktop ── */
  .modal-overlay { align-items: center; justify-content: center; }
  .modal-card {
    border-radius: 20px;
    width: 480px;
    max-width: 90vw;
    transform: translateY(20px) scale(.97);
    transition: transform .25s cubic-bezier(.32,1.2,.52,1), opacity .25s;
    padding: 28px 28px 32px;
  }
  .modal-overlay.open .modal-card {
    transform: translateY(0) scale(1);
  }
}

/* ============================================
   PLATTFORM-STATISTIKEN (FYP Live Widget)
   ============================================ */
.account-stats-section {
  margin: 0 0 16px;
}

.account-stats-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.platform-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

.pstat-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 8px 10px;
  text-align: center;
  transition: transform .15s;
}
.pstat-card:hover { transform: translateY(-2px); }

.pstat-icon {
  font-size: 18px;
  display: block;
  margin-bottom: 4px;
}

.pstat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent1);
  line-height: 1.2;
}

.pstat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Desktop: etwas größer + breiter */
@media (min-width: 900px) {
  .platform-stats {
    max-width: 100%;
    gap: 14px;
  }
  .pstat-card { padding: 16px 12px 14px; }
  .pstat-value { font-size: 18px; }
  .pstat-label { font-size: 11px; }
  .pstat-icon  { font-size: 20px; }
}
