/* =====================================================
   CYBER STALKER — styles.css
   AAA-quality cyber UI + photoreal social-media clones
   ===================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root{
  /* Cyber theme */
  --neon-pink:   #ff2d95;
  --neon-cyan:   #00f6ff;
  --neon-violet: #b537ff;
  --neon-green:  #39ff14;
  --bg-0: #050111;
  --bg-1: #0a0420;
  --bg-2: #120a30;

  /* FaceBork (Facebook-y) */
  --fb-blue: #1877f2;
  --fb-blue-d:#0e5fc7;
  --fb-bg:   #f0f2f5;
  --fb-card: #ffffff;
  --fb-text: #050505;
  --fb-text-dim:#65676b;
  --fb-rule:  #ced0d4;
  --fb-hover: #e4e6eb;

  /* X / Twitter */
  --x-bg: #000000;
  --x-card:#16181c;
  --x-text:#e7e9ea;
  --x-dim: #71767b;
  --x-rule:#2f3336;
  --x-blue:#1d9bf0;
  --x-pink:#f91880;
  --x-green:#00ba7c;

  --shadow-1: 0 8px 32px rgba(0,0,0,.45);
  --shadow-2: 0 14px 50px rgba(0,0,0,.6);
}

html, body{
  width:100%; height:100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Apple Color Emoji", "Segoe UI Emoji", Roboto, Arial, sans-serif;
  background: radial-gradient(ellipse at 20% 10%, #1a0a3c 0%, #0a0420 50%, #050111 100%);
  color:#fff;
  overflow:hidden;
}

button{ font-family: inherit; cursor:pointer; }
input, textarea{ font-family: inherit; }

.hidden{ display:none !important; }

/* ============ Background canvases ============ */
#bgCanvas, #fxCanvas{
  position: fixed; inset:0;
  width:100%; height:100%;
  z-index:-2;
  pointer-events:none;
}
#fxCanvas{ z-index:-1; mix-blend-mode: screen; opacity:.8; }

#scanlines{
  position:fixed; inset:0; pointer-events:none; z-index: 9998;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity:.5;
}
#vignette{
  position:fixed; inset:0; pointer-events:none; z-index: 9997;
  background: radial-gradient(circle at 50% 50%, transparent 50%, rgba(0,0,0,.7) 100%);
}

/* ============ Generic overlay / screens ============ */
.overlay, .screen{
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  padding: 20px;
}

/* ============ Audio gate ============ */
.audio-gate-card{
  background: linear-gradient(135deg, rgba(20,5,50,.85), rgba(60,10,80,.7));
  border: 2px solid var(--neon-pink);
  border-radius: 18px;
  padding: 50px 60px;
  text-align:center;
  box-shadow: 0 0 80px rgba(255,45,149,.35), inset 0 0 60px rgba(0,246,255,.07);
  backdrop-filter: blur(18px);
  max-width: 540px;
}
.logo-glow{
  font-size: 48px; font-weight: 900; letter-spacing: 6px;
  color: #fff;
  text-shadow:
    0 0 8px var(--neon-pink),
    0 0 18px var(--neon-pink),
    0 0 30px var(--neon-violet);
  margin-bottom: 8px;
}
.tagline{ color: var(--neon-cyan); font-size: 14px; letter-spacing: 2px; margin-bottom: 28px; }
.warn-mini{ margin-top: 18px; color:#888; font-size: 12px; letter-spacing:1px; }

/* ============ Buttons ============ */
.btn-neon{
  background: linear-gradient(135deg, rgba(255,45,149,.18), rgba(0,246,255,.18));
  border: 2px solid var(--neon-cyan);
  color:#fff;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: 15px;
  transition: all .18s ease;
  box-shadow: 0 0 18px rgba(0,246,255,.25);
}
.btn-neon:hover{
  border-color: var(--neon-pink);
  box-shadow: 0 0 26px rgba(255,45,149,.55);
  transform: translateY(-2px);
}
.btn-neon.big{ font-size: 18px; padding: 20px 40px; }
.btn-neon.danger{ border-color: #ff3b3b; box-shadow: 0 0 18px rgba(255,59,59,.4); }
.btn-neon.danger:hover{ background: rgba(255,59,59,.18); }

/* ============ Main menu ============ */
.menu-wrap{
  width: 100%; max-width: 900px;
  display:flex; flex-direction:column; align-items:center; gap: 26px;
  position:relative;
}
.menu-bar-top{
  position:absolute; top:-30px; left:0; right:0;
  display:flex; justify-content: space-between;
  font-size: 11px; letter-spacing:2px; color: #888;
  text-transform: uppercase;
}
.title-mega{
  font-size: clamp(54px, 10vw, 130px);
  font-weight: 900;
  letter-spacing: 8px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan), var(--neon-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  filter: drop-shadow(0 0 18px rgba(255,45,149,.45));
  animation: titlePulse 3s ease-in-out infinite alternate;
}
@keyframes titlePulse{
  0%{ filter: drop-shadow(0 0 14px rgba(255,45,149,.4)); }
  100%{ filter: drop-shadow(0 0 28px rgba(0,246,255,.55)); }
}
.title-mega::before, .title-mega::after{
  content: attr(data-text);
  position:absolute; left:0; top:0;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan), var(--neon-violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  mix-blend-mode: screen; pointer-events:none;
}
.title-mega::before{ animation: glitchA 3s steps(1) infinite; }
.title-mega::after { animation: glitchB 2.7s steps(1) infinite; opacity:.6; }
@keyframes glitchA{
  0%,90%{ transform: translate(0,0); }
  92%{ transform: translate(-3px,1px); }
  94%{ transform: translate(2px,-1px); }
  96%{ transform: translate(-1px,2px); }
}
@keyframes glitchB{
  0%,85%{ transform: translate(0,0); }
  87%{ transform: translate(2px,2px); }
  89%{ transform: translate(-2px,-2px); }
}

.subtitle{
  font-size: 16px;
  font-style: italic;
  color: #ccc;
  letter-spacing: 2px;
  margin-top: -8px;
  text-shadow: 0 0 6px rgba(0,246,255,.4);
}

.menu-buttons{
  display:flex; flex-direction:column; gap: 14px;
  width: 360px; max-width: 100%;
  margin-top: 10px;
}
.btn-menu{
  background: linear-gradient(90deg, rgba(255,45,149,.15), rgba(0,246,255,.10));
  color:#fff;
  border: 1px solid rgba(0,246,255,.5);
  padding: 16px 22px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align:left;
  transition: all .2s;
  position:relative;
  overflow:hidden;
}
.btn-menu::before{
  content:""; position:absolute; left:0; top:0; bottom:0; width: 4px;
  background: var(--neon-pink); box-shadow: 0 0 14px var(--neon-pink);
}
.btn-menu:hover{
  border-color: var(--neon-pink);
  background: linear-gradient(90deg, rgba(255,45,149,.4), rgba(0,246,255,.15));
  box-shadow: 0 0 30px rgba(255,45,149,.4);
  transform: translateX(6px);
}
.btn-menu.danger::before{ background: #ff3b3b; box-shadow: 0 0 14px #ff3b3b; }

.menu-bottom{
  margin-top: 20px;
  font-family: "Courier New", monospace;
  color: #888; font-size: 12px; letter-spacing:2px;
}
.blink{ color: #ff3b3b; animation: blink 1s infinite; }
.green{ color: var(--neon-green); }
@keyframes blink{ 50%{ opacity: .25 } }

/* ============ Static page cards (howto / credits / exit) ============ */
.page-card{
  background: linear-gradient(180deg, rgba(20,5,50,.92), rgba(8,2,28,.95));
  border: 2px solid var(--neon-cyan);
  border-radius: 16px;
  padding: 40px 50px;
  max-width: 700px;
  width: 100%;
  box-shadow: 0 0 60px rgba(0,246,255,.2);
  backdrop-filter: blur(14px);
}
.page-card h2{
  font-size: 32px; letter-spacing: 4px;
  margin-bottom: 18px;
  color: var(--neon-pink);
  text-shadow: 0 0 18px rgba(255,45,149,.6);
}
.page-card p{ line-height: 1.7; margin-bottom: 14px; color: #ddd; }
.page-card .muted{ color:#888; font-size:13px; }
.muted{ color:#888; }
.small{ font-size: 12px; }
.giant{ font-size: 32px; font-weight: 900; }
.big{ font-size: 22px; }
.neon-pink{ color: var(--neon-pink); text-shadow: 0 0 12px rgba(255,45,149,.7); }

.howto-list{
  margin: 16px 0 28px 24px;
  line-height: 1.9;
  color: #ddd;
}
.howto-list li{ margin-bottom: 6px; }

.credits-card{ text-align:center; }
.credits-roll .cred-line{ margin: 8px 0; line-height: 1.6; color:#ddd; }
.cred-rule{ border:0; height:1px; background: rgba(0,246,255,.3); margin: 22px 0; }
.credits-title{ text-align:center; }

.exit-buttons{ display:flex; gap:14px; flex-wrap:wrap; justify-content:center; margin-top: 22px; }

.bye-card{ text-align:center; }
.glitch{
  font-size: 56px; letter-spacing: 8px; margin-bottom: 16px;
  color:#fff; position:relative; display:inline-block;
  text-shadow: 2px 0 var(--neon-pink), -2px 0 var(--neon-cyan);
  animation: glitchA 1.6s steps(1) infinite;
}

/* ============ LOADING SCREEN ============ */
.loading-card{
  text-align:center;
  padding: 40px;
  width: 90%; max-width: 540px;
}
.loading-pfp img{
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--neon-pink);
  box-shadow: 0 0 40px rgba(255,45,149,.6);
  animation: spinslow 3s linear infinite;
}
@keyframes spinslow{ to { transform: rotate(360deg); } }
.loadbar{
  margin: 28px 0 16px;
  height: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--neon-cyan);
  border-radius: 7px;
  overflow:hidden;
}
#loadFill{
  height:100%; width:0%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  transition: width .25s linear;
  box-shadow: 0 0 18px var(--neon-pink);
}

/* =====================================================
   IN-GAME (browser shell)
   ===================================================== */
#screen-game{
  align-items: stretch; justify-content: stretch;
  padding: 0;
  display:flex; flex-direction:column;
}
.game-topnav{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, #16092e, #0a0420);
  padding: 8px 14px;
  border-bottom: 2px solid var(--neon-pink);
  box-shadow: 0 0 22px rgba(255,45,149,.25);
  z-index: 5;
}
.game-tabs{ display:flex; gap: 6px; }
.tab{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color:#ccc;
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  font-weight:700;
  letter-spacing: 1px;
  font-size: 13px;
  display:flex; align-items:center; gap:6px;
  transition: all .15s;
}
.tab:hover{ background: rgba(255,255,255,.1); color:#fff; }
.tab.active{ background: #fff; color:#000; border-color:#fff; }
.tab.tab-fb.active{ color: var(--fb-blue); }
.tab.tab-x.active{ background:#000; color:#fff; border-color:#fff; }
.fb-mini-logo{
  background: var(--fb-blue); color: #fff; font-weight:900;
  border-radius: 4px; padding: 2px 6px;
  font-family: Georgia, serif;
}
.x-mini-logo{ font-weight: 900; }

.game-url-bar{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 8px 14px;
  font-size: 12px;
  color: #aaa;
  display:flex; align-items:center; gap: 8px;
  font-family: "Courier New", monospace;
}
.lock{ color: var(--neon-green); }

.btn-mini{
  background: rgba(255,45,149,.18);
  border: 1px solid var(--neon-pink);
  color:#fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight:700;
  letter-spacing:1px;
  transition: all .15s;
}
.btn-mini:hover{ background: rgba(255,45,149,.35); }

#page-fb, #page-x{
  flex:1; overflow: hidden;
}
.page-active{ display: flex; flex-direction:column; flex:1; min-height:0; }
.page-hidden{ display:none; }

/* =====================================================
   FACEBORK STYLE
   ===================================================== */
#page-fb{ background: var(--fb-bg); color: var(--fb-text); }
.fb-header{
  background: var(--fb-card);
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  border-bottom: 1px solid var(--fb-rule);
  flex-shrink: 0;
}
.fb-header-inner{
  display:grid; grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items:center;
  padding: 8px 16px;
  max-width: 100%;
}
.fb-logo{
  color: var(--fb-blue);
  font-size: 30px;
  font-weight: 900;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -1px;
}
.fb-search{
  background: var(--fb-hover);
  border: none;
  border-radius: 50px;
  padding: 10px 18px;
  font-size: 14px;
  outline: none;
  width: 100%;
  max-width: 320px;
}
.fb-header-icons{ display:flex; gap: 10px; align-items:center; }
.fb-icon{
  background: var(--fb-hover);
  width: 40px; height: 40px;
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  font-size: 18px;
  cursor:pointer;
  position:relative;
  transition: background .15s;
}
.fb-icon:hover{ background: #d8dadf; }
.avatar-mini{ background: linear-gradient(135deg,#ffd700,#ff8a00); color:#fff; }
.fb-badge{
  position:absolute; top:-2px; right:-2px;
  background: #fa3e3e; color:#fff;
  font-size: 10px; padding: 2px 5px;
  border-radius: 10px; font-weight: 700;
}

.fb-main{
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 16px;
  padding: 16px;
  overflow: auto;
  flex: 1;
}

/* Sidebar */
.fb-left, .fb-right{ display:flex; flex-direction:column; gap: 14px; }
.fb-left{ position: sticky; top: 0; align-self: start; }
.fb-side-item{
  display:flex; align-items:center; gap:12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor:pointer;
  font-size: 14px; font-weight: 600;
  color: var(--fb-text);
  transition: background .12s;
}
.fb-side-item:hover, .fb-side-item.active{ background: var(--fb-hover); }
.fb-side-item span{ font-size: 22px; width: 28px; text-align:center; }
.dot-red{
  width: 8px; height: 8px; background: #fa3e3e; border-radius: 50%;
  margin-left: auto; box-shadow: 0 0 0 2px #fff;
}
.fb-side-item.alert{ color: #fa3e3e; }
.fb-side-rule{ border:0; height:1px; background: var(--fb-rule); margin: 8px 0; }
.fb-side-label{
  color: var(--fb-text-dim); font-size: 12px; letter-spacing: 1px;
  font-weight: 700; padding: 0 10px; margin-bottom: 4px;
}

/* Center column */
.fb-center{ display:flex; flex-direction:column; gap: 14px; max-width: 640px; width: 100%; margin: 0 auto; }

.fb-profile-card{
  background: var(--fb-card);
  border: 1px solid var(--fb-rule);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.fb-cover{
  height: 220px;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,.18), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,.12), transparent 60%),
    linear-gradient(135deg, #4b0082, #ff2d95 50%, #ff7e00);
  position: relative;
}
.fb-cover::after{
  content:""; position: absolute; inset:0;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0) 0 12px, rgba(0,0,0,.05) 12px 14px);
}
.fb-profile-row{
  display:grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items:flex-end;
  padding: 0 18px 14px;
  margin-top: -56px;
  position: relative;
}
.fb-pfp{
  width: 168px; height: 168px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--fb-card);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.fb-profile-info{ padding-bottom: 14px; }
.fb-profile-info h2{ font-size: 28px; font-weight: 800; }
.verify{ color: var(--fb-blue); font-size: 18px; vertical-align: middle; }
.profile-tag{ color: var(--fb-text-dim); font-size: 14px; margin-top: 2px; }

.fb-friend-btn, .fb-message-btn{
  border:none; border-radius: 8px;
  padding: 8px 14px; font-weight: 700; font-size: 14px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: filter .12s;
}
.fb-friend-btn{ background: #e4e6eb; color: #050505; }
.fb-friend-btn:hover{ filter: brightness(.95); }
.fb-message-btn{ background: var(--fb-blue); color:#fff; }
.fb-message-btn:hover{ background: var(--fb-blue-d); }

.fb-profile-tabs{
  display:flex; gap: 8px;
  border-top: 1px solid var(--fb-rule);
  padding: 0 18px;
}
.fb-profile-tabs span{
  padding: 14px 14px;
  font-weight: 600; font-size: 14px;
  color: var(--fb-text-dim);
  border-bottom: 3px solid transparent;
  cursor:pointer;
}
.fb-profile-tabs span.active{
  color: var(--fb-blue);
  border-bottom-color: var(--fb-blue);
}

.fb-composer{
  background: var(--fb-card);
  border: 1px solid var(--fb-rule);
  border-radius: 10px;
  display:grid; grid-template-columns: auto 1fr auto;
  gap: 10px; align-items:center;
  padding: 12px 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.composer-avatar{ width: 40px; height:40px; border-radius:50%; object-fit: cover; }
#fbComposerInput, #fbInput, #xComposerInput{
  flex:1; width:100%;
  background: var(--fb-hover);
  border: none;
  padding: 12px 16px;
  border-radius: 50px;
  font-size: 14px;
  outline:none;
  color: var(--fb-text);
}
.btn-fb-post{
  background: var(--fb-blue);
  color: #fff;
  border:none; padding: 9px 18px;
  border-radius: 8px; font-weight: 700;
  cursor:pointer;
}
.btn-fb-post:hover{ background: var(--fb-blue-d); }

.fb-feed{ display:flex; flex-direction:column; gap: 14px; }

.fb-post{
  background: var(--fb-card);
  border: 1px solid var(--fb-rule);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
  animation: fadeIn .35s ease both;
}
@keyframes fadeIn{ from{ opacity:0; transform: translateY(8px) } to{ opacity:1; transform:none } }
.fb-post-head{
  display:grid; grid-template-columns: auto 1fr auto;
  gap: 10px; align-items:center;
}
.fb-post-head img{ width:42px; height:42px; border-radius:50%; object-fit:cover; }
.fb-post-author{ font-weight: 700; font-size: 15px; }
.fb-post-meta{ color: var(--fb-text-dim); font-size: 12px; }
.fb-post-more{ color: var(--fb-text-dim); cursor:pointer; font-size: 22px; padding: 0 6px; }
.fb-post-body{
  margin: 10px 0;
  font-size: 15px; line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.fb-post-body.you{ background: #f0f6ff; padding: 10px 12px; border-left: 3px solid var(--fb-blue); border-radius: 6px; }
.fb-post-stats{
  display:flex; justify-content: space-between;
  font-size: 13px; color: var(--fb-text-dim);
  padding: 6px 0; border-bottom: 1px solid var(--fb-rule);
}
.fb-post-actions{
  display:flex; padding: 4px 0;
}
.fb-post-actions button{
  flex: 1;
  background:none; border:none;
  padding: 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--fb-text-dim);
  cursor:pointer;
}
.fb-post-actions button:hover{ background: var(--fb-hover); }

.fb-comments{ margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--fb-rule); display:flex; flex-direction:column; gap: 8px; }
.fb-comment{
  display:grid; grid-template-columns: auto 1fr; gap: 8px; align-items: flex-start;
}
.fb-comment img{ width: 32px; height: 32px; border-radius:50%; object-fit:cover; }
.fb-comment .bubble{
  background: var(--fb-hover);
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  max-width: 100%;
}
.fb-comment .author{ font-weight: 700; font-size: 13px; display:block; }

/* Right sidebar */
.fb-right-card{
  background: var(--fb-card);
  border: 1px solid var(--fb-rule);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.fb-right-card h4{
  font-size: 14px; color: var(--fb-text-dim);
  margin-bottom: 10px; letter-spacing:1px; text-transform: uppercase;
}
.memory-list{
  list-style:none; max-height: 220px; overflow:auto;
  font-size: 13px;
}
.memory-list li{
  padding: 6px 8px; border-radius: 6px;
  background: var(--fb-hover); margin-bottom: 4px;
  color: var(--fb-text);
}
.meter{
  width:100%; height: 12px; background: var(--fb-hover);
  border-radius: 6px; overflow:hidden; margin-bottom: 6px;
}
.meter-fill{
  height:100%; width: 12%;
  background: linear-gradient(90deg, #ffd166, #ef476f, #b5179e);
  transition: width .4s ease;
}

/* Messenger popup */
.fb-chat{
  position: fixed; right: 20px; bottom: 20px;
  width: 360px; height: 480px;
  background: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 14px 40px rgba(0,0,0,.4);
  display: flex; flex-direction: column;
  z-index: 9999;
  border: 1px solid var(--fb-rule);
  overflow: hidden;
  animation: slideUp .25s ease;
}
@keyframes slideUp{ from{ transform: translateY(40px); opacity: 0 } to{ transform: none; opacity: 1 } }

.fb-chat-head{
  background: var(--fb-blue);
  color:#fff;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}
.chat-avatar{ width:36px; height:36px; border-radius:50%; object-fit:cover; border: 2px solid #fff; }
.chat-name{ font-weight: 700; display:flex; align-items:center; gap:6px; }
.online-dot{
  width: 8px; height: 8px;
  background: var(--neon-green); border-radius:50%;
  display:inline-block;
  box-shadow: 0 0 0 2px var(--fb-blue);
}
.chat-status{ font-size: 11px; opacity: .9; }
.chat-actions{ display:flex; gap: 12px; }
.chat-actions span{ font-size: 16px; cursor:pointer; }

.fb-chat-body{
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f5f7fb;
  display: flex; flex-direction: column; gap: 6px;
}
.msg{
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 14px;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.4;
  animation: bubblePop .25s ease;
}
@keyframes bubblePop{ from{ opacity:0; transform: scale(.96) } to{ opacity:1; transform: none } }
.msg.them{
  align-self: flex-start;
  background: #e4e6eb;
  color:#050505;
  border-bottom-left-radius: 4px;
}
.msg.you{
  align-self: flex-end;
  background: linear-gradient(135deg, var(--fb-blue), #2c8aff);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg.typing{
  background: #e4e6eb;
  align-self: flex-start;
  font-style: italic;
  color: #888;
}
.msg.typing .dots span{
  display:inline-block; width:6px; height:6px; border-radius:50%; background:#888; margin: 0 1px;
  animation: typingBlink 1.2s infinite;
}
.msg.typing .dots span:nth-child(2){ animation-delay: .2s; }
.msg.typing .dots span:nth-child(3){ animation-delay: .4s; }
@keyframes typingBlink{ 0%,60%,100%{ opacity: .3 } 30%{ opacity: 1 } }

.fb-chat-input-row{
  display:grid; grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 8px;
  gap: 6px;
  border-top: 1px solid var(--fb-rule);
  background: #fff;
}
.btn-emoji{
  background: var(--fb-hover); border: none;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; cursor:pointer;
}
.btn-emoji:hover{ background: #d8dadf; }
.btn-fb-send{
  background: var(--fb-blue); color:#fff;
  border: none; width: 40px; height: 40px;
  border-radius: 50%; font-size: 18px; cursor:pointer;
}
.btn-fb-send:hover{ background: var(--fb-blue-d); }

/* =====================================================
   X / TWITTER STYLE
   ===================================================== */
#page-x{ background: var(--x-bg); color: var(--x-text); }
.x-grid{
  display:grid;
  grid-template-columns: 260px minmax(0, 600px) 320px;
  justify-content: center;
  gap: 16px;
  padding: 0 12px;
  height: 100%;
  overflow:auto;
}

.x-left{
  position: sticky; top: 0; align-self: start;
  display:flex; flex-direction:column; gap: 6px;
  padding: 12px 6px;
}
.x-logo{ font-size: 36px; padding: 6px 10px; }
.x-nav-item{
  display:flex; align-items:center; gap: 14px;
  font-size: 18px; font-weight: 600;
  padding: 12px 16px;
  border-radius: 50px;
  cursor:pointer;
}
.x-nav-item:hover{ background: rgba(255,255,255,.08); }
.x-nav-item.active{ font-weight: 800; }
.x-nav-item.alert{ color: var(--x-pink); }
.x-badge{
  background: var(--x-pink);
  color:#fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 12px;
  margin-left: auto;
  font-weight: 700;
}
.x-post-btn{
  margin-top: 10px;
  background: var(--x-text);
  color: #000;
  border: none;
  padding: 14px 0;
  border-radius: 50px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: filter .15s;
}
.x-post-btn:hover{ filter: brightness(.92); }
.x-account-card{
  margin-top: auto;
  display:flex; align-items:center; gap: 8px;
  padding: 10px;
  border-radius: 50px;
}
.x-account-card:hover{ background: rgba(255,255,255,.08); }
.dot.online{ width: 8px; height: 8px; background: var(--x-green); border-radius:50%; display:inline-block; }

.x-center{
  border-left: 1px solid var(--x-rule);
  border-right: 1px solid var(--x-rule);
  display:flex; flex-direction:column;
  min-width: 0;
}
.x-header{
  position: sticky; top: 0; z-index: 5;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(12px);
  display:flex;
  border-bottom: 1px solid var(--x-rule);
}
.x-tab{
  flex: 1;
  padding: 16px 0;
  text-align:center;
  font-weight: 600;
  color: var(--x-dim);
  cursor: pointer;
  transition: background .12s;
  position: relative;
}
.x-tab:hover{ background: rgba(255,255,255,.04); }
.x-tab.active{ color: var(--x-text); font-weight: 800; }
.x-tab.active::after{
  content:""; position:absolute; left: 50%; bottom: 0;
  width: 56px; height: 4px; background: var(--x-blue);
  transform: translateX(-50%);
  border-radius: 4px;
}

.x-composer{
  display:grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--x-rule);
}
.x-avatar-mini{ width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.x-composer-input{
  width:100%;
  background: transparent !important;
  border: none !important;
  color: var(--x-text) !important;
  font-size: 18px !important;
  padding: 8px 0 !important;
  outline:none;
}
.x-composer-row{
  display:flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--x-rule);
}
.x-composer-icons{ color: var(--x-blue); font-size: 16px; }
.x-tweet-btn{
  background: var(--x-blue); color:#fff;
  border: none; padding: 8px 18px;
  border-radius: 50px; font-weight: 700; cursor:pointer;
  transition: filter .15s;
}
.x-tweet-btn:hover{ filter: brightness(.9); }

.x-feed{ display:flex; flex-direction: column; }

.x-tweet{
  display:grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--x-rule);
  animation: fadeIn .35s ease both;
}
.x-tweet:hover{ background: rgba(255,255,255,.02); }
.x-tweet-avatar{ width: 44px; height:44px; border-radius:50%; object-fit:cover; }
.x-tweet-head{
  display:flex; gap: 6px; align-items: center;
  font-size: 14px;
}
.x-tweet-name{ font-weight: 700; }
.x-tweet-handle, .x-tweet-time{ color: var(--x-dim); }
.x-tweet-body{
  margin: 4px 0 8px;
  font-size: 16px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.x-tweet-actions{
  display:flex; justify-content: space-between;
  max-width: 420px;
  color: var(--x-dim);
  font-size: 13px;
}
.x-tweet-actions span{
  display:flex; align-items:center; gap: 6px;
  padding: 4px 8px; border-radius: 16px;
  cursor:pointer; transition: all .15s;
}
.x-tweet-actions span:hover{ background: rgba(29,155,240,.1); color: var(--x-blue); }
.x-tweet-actions span.heart:hover{ background: rgba(249,24,128,.1); color: var(--x-pink); }
.x-tweet-actions span.retweet:hover{ background: rgba(0,186,124,.1); color: var(--x-green); }

.x-right{
  padding: 12px 0;
  display:flex; flex-direction:column; gap: 14px;
}
.x-search{
  background: var(--x-card);
  border: 1px solid var(--x-card);
  color: var(--x-text);
  padding: 12px 18px;
  border-radius: 50px;
  outline:none;
  font-size: 14px;
}
.x-search:focus{ border-color: var(--x-blue); background: #000; }
.x-card{
  background: var(--x-card);
  border-radius: 16px;
  padding: 14px 16px;
}
.x-card h4{
  font-size: 18px; font-weight: 800; margin-bottom: 12px;
}
.trend{ padding: 6px 0; }
.trend-cat{ font-size: 12px; color: var(--x-dim); }
.trend-tag{ font-weight: 700; font-size: 15px; }
.trend-count{ font-size: 12px; color: var(--x-dim); }

.follow-row{
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}
.ph-avatar{
  width: 40px; height: 40px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  font-size: 18px;
}
.x-follow-btn{
  background: var(--x-text);
  color: #000;
  border: none;
  padding: 6px 14px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
}

/* Tweet replies */
.x-replies{
  margin-top: 10px;
  border-left: 2px solid var(--x-rule);
  padding-left: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.x-reply{
  display:grid; grid-template-columns: auto 1fr; gap: 8px;
  font-size: 14px;
}
.x-reply img{ width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.x-reply .reply-bubble{
  background: rgba(255,255,255,.04);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--x-rule);
}
.x-reply.you .reply-bubble{ border-color: var(--x-blue); }
.x-reply .author{ font-weight: 700; }

/* X reply composer (inline per tweet) */
.x-reply-row{
  display:grid; grid-template-columns: 1fr auto; gap: 8px;
  margin-top: 8px;
}
.x-reply-input{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--x-rule);
  border-radius: 50px;
  padding: 8px 14px;
  color: var(--x-text); font-size: 14px;
  outline:none;
}
.x-reply-input:focus{ border-color: var(--x-blue); }
.x-reply-btn{
  background: var(--x-blue); color:#fff;
  border: none; padding: 6px 14px;
  border-radius: 50px; font-weight: 700; cursor:pointer; font-size: 13px;
}

/* X private messages */
.x-chat{
  position: fixed; right: 20px; bottom: 20px;
  width: 360px; height: 500px;
  background: #000;
  border: 1px solid var(--x-rule);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 18px 44px rgba(0,0,0,.55);
  display: flex; flex-direction: column;
  z-index: 9999;
  overflow: hidden;
  animation: slideUp .25s ease;
}
.x-chat-head{
  background: rgba(22,24,28,.96);
  color: var(--x-text);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--x-rule);
}
.x-chat-head .chat-avatar{ border-color: var(--x-blue); }
.x-chat-head .online-dot{ box-shadow: 0 0 0 2px var(--x-card); }
.x-chat-body{
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: linear-gradient(180deg, #050608 0%, #0c0f13 100%);
  display: flex; flex-direction: column; gap: 6px;
}
.x-msg{
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
  animation: bubblePop .25s ease;
}
.x-msg.them{
  align-self: flex-start;
  background: var(--x-card);
  color: var(--x-text);
  border: 1px solid var(--x-rule);
  border-bottom-left-radius: 4px;
}
.x-msg.you{
  align-self: flex-end;
  background: linear-gradient(135deg, var(--x-blue), #0a7ed1);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.x-msg.typing{
  align-self: flex-start;
  background: rgba(255,255,255,.06);
  color: var(--x-dim);
  border: 1px solid var(--x-rule);
}
.x-msg.typing .dots span{
  display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--x-dim); margin: 0 1px;
  animation: typingBlink 1.2s infinite;
}
.x-msg.typing .dots span:nth-child(2){ animation-delay: .2s; }
.x-msg.typing .dots span:nth-child(3){ animation-delay: .4s; }
.x-chat-input-row{
  display:grid; grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 8px;
  gap: 6px;
  border-top: 1px solid var(--x-rule);
  background: #000;
}
.x-chat-input-row input{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--x-rule);
  border-radius: 50px;
  padding: 10px 14px;
  color: var(--x-text);
  outline:none;
}
.x-chat-input-row input:focus{ border-color: var(--x-blue); }
.x-chat-emoji{
  background: rgba(255,255,255,.08);
  color: var(--x-text);
}
.x-chat-emoji:hover{ background: rgba(255,255,255,.14); }
.btn-x-send{
  background: var(--x-blue); color:#fff;
  border: none; width: 40px; height: 40px;
  border-radius: 50%; font-size: 18px; cursor:pointer;
}
.btn-x-send:hover{ filter: brightness(.92); }

/* TOAST */
.toast{
  position: fixed; top: 70px; right: 20px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-violet));
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 99999;
  box-shadow: 0 8px 30px rgba(255,45,149,.5);
  animation: toastIn .3s ease;
}
@keyframes toastIn{ from{ transform: translateX(40px); opacity:0 } to{ transform: none; opacity: 1 } }

/* EMOJI PICKER */
.emoji-picker{
  position: fixed;
  background: #fff;
  border: 1px solid var(--fb-rule);
  border-radius: 10px;
  padding: 8px;
  width: 280px;
  max-height: 240px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
  z-index: 100000;
}
.emoji-picker .emoji-btn{
  background: none; border: none;
  font-size: 22px;
  width: 32px; height: 32px;
  border-radius: 6px;
  cursor: pointer;
}
.emoji-picker .emoji-btn:hover{ background: var(--fb-hover); }

/* Scroll bars */
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.15); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,.25); }
::-webkit-scrollbar-track{ background: transparent; }

/* Responsive small screens */
@media (max-width: 1100px){
  .fb-main{ grid-template-columns: 1fr; }
  .fb-left, .fb-right{ display:none; }
  .x-grid{ grid-template-columns: 1fr; }
  .x-left, .x-right{ display:none; }
}
@media (max-width: 600px){
  .menu-buttons{ width: 100%; }
  .fb-chat{ width: 100%; right: 0; bottom: 0; height: 100%; border-radius: 0; }
  .x-chat{ width: 100%; right: 0; bottom: 0; height: 100%; border-radius: 0; }
  .game-url-bar{ display:none; }
}
