:root{
  --pink:#ff43d1;
  --text:#f2f2f2;
  --muted:#b9b9b9;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui, Arial;
  color:var(--text);
  background:#000;
}

.screen{
  height:100vh;
  display:grid;
  grid-template-columns: 1fr 220px;
}

/* Fondo mármol */
.feed{
  position:relative;
  overflow:hidden;
  background: url("/assets/fondos/marmol_negro_vetas_doradas.png") center/cover no-repeat;
}
.feed::after{
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(transparent 40%, rgba(0,0,0,.55) 100%);
  pointer-events:none;
}

.feed-inner{
  position:absolute; inset:0;
  padding:20px 18px 140px 18px;
  overflow:auto;
}

.posts{
  display:flex;
  flex-direction:column;
  gap:22px;
  padding-bottom:60px;
}

/* Post-it */
.post{
  width:min(380px, 70%);
  aspect-ratio: 1.42 / 1;
  position:relative;
  border-radius:8px;
  background-size:100% 100%;
  background-repeat:no-repeat;
  box-shadow: none;
  overflow:hidden;
}
.post-content{
  position:absolute;
  top:8%;
  left:6%;
  right:6%;
  bottom:8%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.post:nth-child(odd){ margin-left:0; margin-right:auto; }
.post:nth-child(even){ margin-left:auto; margin-right:0; }

.post .pin{
  position:absolute;
  top:4px;
  right:8px;
  width:24px; height:24px;
  opacity:.95;
}

.post .user-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-right:30px;
  cursor:pointer;
}
.post .user-row:hover .user{ color:#7fd6ff; }
.post .avatar{
  width:26px; height:26px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.25);
  object-fit:cover;
}
.post .user{
  font-weight:800;
  font-size:16px;
  text-shadow:0 1px 6px rgba(0,0,0,.7);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:200px;
}

.post .body{
  margin-top:4px;
  font-size:14px;
  line-height:1.3;
  text-shadow:0 1px 4px rgba(0,0,0,.5);
  flex:1;
  overflow:auto;
  padding-right:4px;
}

.post .meta{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:8px;
  font-weight:800;
  font-size:14px;
}

.meta .pill{
  display:flex;
  align-items:center;
  gap:5px;
  background: rgba(0,0,0,.38);
  border:1px solid rgba(255,255,255,.12);
  padding:4px 7px;
  border-radius:999px;
  backdrop-filter: blur(6px);
  cursor:pointer;
}
.pill:hover{ border-color:rgba(255,255,255,.3); }
.pill.liked{ border-color:var(--pink); box-shadow:0 0 10px rgba(255,67,209,.3); }
.meta img{ width:18px; height:18px; }

.post .edited-tag{ font-size:10px; color:var(--muted); margin-top:2px; }
.post .repost-tag{ font-size:11px; color:#7fd6ff; margin-bottom:3px; font-weight:700; }

.post .post-actions{
  position:absolute; top:4px; left:6px;
  display:flex; gap:3px;
  opacity:0; transition:opacity .2s;
}
.post:hover .post-actions{ opacity:1; }
.post-action-btn{
  font-size:10px; padding:2px 6px; border-radius:5px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.6); color:var(--muted); cursor:pointer;
}
.post-action-btn:hover{ color:var(--text); }

/* Post fly-away whirlwind */
.post{ transition: transform .8s cubic-bezier(.3,0,.2,1), opacity .8s ease; }
.post.fly-away{
  transform:
    translate(var(--fly-tx, 0px), var(--fly-ty, -300px))
    rotate(var(--fly-rot, 720deg))
    scale(.1) !important;
  opacity:0 !important;
}

/* Donaciones */
.donate{
  position:absolute;
  left:0; right:0; bottom:0;
  height:60px;
  padding:0 16px 8px 16px;
  display:flex;
  align-items:flex-end;
}

.donate-line{
  position:absolute;
  left:16px; right:16px;
  bottom:48px;
  height:6px;
  border-radius:999px;
  background: rgba(90,255,120,.35);
  box-shadow: 0 0 14px rgba(90,255,120,.45), 0 0 30px rgba(90,255,120,.25);
  pointer-events:none;
}

.donate-inner{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  z-index:2;
}

.don-img{
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
}
.don-img img{
  height:32px;
  width:auto;
  display:block;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.7));
}
.don-img:hover img{ filter: drop-shadow(0 6px 12px rgba(0,0,0,.7)) brightness(1.12); }

.don-custom{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:8px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.12);
}
.don-custom input{
  width:80px;
  background:transparent;
  border:0;
  color:var(--text);
  outline:none;
  font-size:14px;
}

/* FAB */
.fab{
  position:absolute;
  right:18px;
  bottom:72px;
  width:48px; height:48px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.15);
  background: rgba(0,0,0,.55);
  color:#fff;
  font-size:28px;
  cursor:pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,.6);
  z-index:5;
}
.fab:hover{ filter:brightness(1.2); }

/* Sidebar */
.side{
  position:relative;
  background: #050505;
  overflow:hidden;
}

.side-inner{
  position:relative;
  z-index:3;
  height:100%;
  padding:22px 16px 22px 16px;
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:hidden;
}

.side-search{
  width:100%;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.6);
  color:var(--text);
  outline:none;
  font-size:13px;
}

.channels{
  overflow:auto;
  padding-right:4px;
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:1;
}

.chan{
  display:flex;
  align-items:center;
  gap:8px;
  padding:7px 8px;
  border-radius:10px;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  cursor:pointer;
}
.chan:hover{ background: rgba(255,255,255,.08); }
.chan.active{
  border-color: rgba(255,67,209,.65);
  box-shadow: 0 0 14px rgba(255,67,209,.25);
}
.chan .ico{
  width:20px; height:20px;
  border-radius:999px;
  background: radial-gradient(circle at 30% 30%, #eee, #555);
  opacity:.9;
}
.chan .name{ font-weight:800; font-size:13px; }

/* Side neon frame — CSS only */
.side-frame{ display:none; }

.side::before{
  content:"";
  position:absolute;
  top:12px; bottom:12px; left:8px; right:8px;
  border:2px solid var(--pink);
  border-radius:6px;
  box-shadow:
    0 0 8px var(--pink),
    0 0 20px rgba(255,67,209,.4),
    0 0 40px rgba(255,67,209,.2),
    inset 0 0 8px rgba(255,67,209,.15),
    inset 0 0 20px rgba(255,67,209,.08);
  z-index:2;
  pointer-events:none;
  animation: neonPulse 3s ease-in-out infinite;
}

/* Sparkle traveling along the frame */
.side::after{
  content:"";
  position:absolute;
  width:50px; height:50px;
  border-radius:50%;
  background: radial-gradient(circle, rgba(255,67,209,.8) 0%, rgba(255,180,240,.3) 30%, transparent 65%);
  filter:blur(6px);
  z-index:4;
  pointer-events:none;
  animation: sparkTravel 5s ease-in-out infinite;
}

@keyframes neonPulse{
  0%, 100%{ box-shadow:
    0 0 8px var(--pink),
    0 0 20px rgba(255,67,209,.4),
    0 0 40px rgba(255,67,209,.2),
    inset 0 0 8px rgba(255,67,209,.15),
    inset 0 0 20px rgba(255,67,209,.08);
  }
  50%{ box-shadow:
    0 0 12px var(--pink),
    0 0 30px rgba(255,67,209,.55),
    0 0 60px rgba(255,67,209,.3),
    inset 0 0 12px rgba(255,67,209,.2),
    inset 0 0 30px rgba(255,67,209,.12);
  }
}

@keyframes sparkTravel{
  0%   { top:12px;  left:8px; }
  25%  { top:12px;  left:calc(100% - 58px); }
  50%  { top:calc(100% - 62px); left:calc(100% - 58px); }
  75%  { top:calc(100% - 62px); left:8px; }
  100% { top:12px;  left:8px; }
}

/* User search results */
.user-results{
  display:flex; flex-direction:column; gap:3px;
  max-height:150px; overflow:auto;
}
.user-result{
  display:flex; align-items:center; gap:6px;
  padding:6px 8px; border-radius:8px;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.12); cursor:pointer;
  font-size:13px;
}
.user-result:hover{ background:rgba(255,255,255,.1); }
.user-result img{ width:22px; height:22px; border-radius:999px; object-fit:cover; }

/* Modals */
.modal{
  position:fixed; inset:0;
  background: rgba(0,0,0,.65);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:999;
}
.hidden{ display:none !important; }

.modal-card{
  width:min(520px, 92vw);
  max-height:90vh;
  overflow:auto;
  background: rgba(0,0,0,.82);
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
  padding:18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
}
.modal-card-wide{ width:min(680px, 94vw); }
.modal-card label{
  display:block; margin-top:10px; margin-bottom:4px;
  font-weight:700; font-size:14px; color:var(--muted);
}
.modal-card input, .modal-card textarea{
  width:100%; padding:12px; border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color:var(--text); outline:none;
}
.modal-card textarea{ resize:vertical; }
.row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
button{
  padding:12px;
  border-radius:12px;
  border:0;
  cursor:pointer;
  font-weight:900;
}
.ghost{
  background: rgba(255,255,255,.08);
  color:var(--text);
  border:1px solid rgba(255,255,255,.12);
}
.ghost:hover{ background:rgba(255,255,255,.14); }
.btn-danger{
  background:rgba(255,60,60,.25); color:#ff6a6a;
  border:1px solid rgba(255,60,60,.4);
}
.err{ color:#ff6a6a; margin:10px 0 0 0; min-height:18px; }
.muted{ color:var(--muted); margin-top:6px; }

/* Neon line */
.neon-line-pink{
  height:2px; margin:10px 0;
  background:var(--pink);
  box-shadow:0 0 8px var(--pink), 0 0 20px rgba(255,67,209,.4);
  border-radius:999px;
}

/* Top bar */
.feed-top-bar{
  display:flex; justify-content:flex-end; gap:8px; margin-bottom:12px;
}
.top-btn{
  width:36px; height:36px; border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.55); color:var(--text);
  font-size:16px; cursor:pointer; position:relative;
}
.top-btn:hover{ background:rgba(255,255,255,.12); }
.notif-badge{
  position:absolute; top:-4px; right:-4px;
  background:var(--pink); color:#fff;
  font-size:10px; font-weight:900;
  min-width:16px; height:16px; border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  padding:0 3px;
}

/* Input row + gen buttons */
.input-row{ display:flex; gap:6px; }
.input-row input{ flex:1; }
.btn-gen{
  width:42px; height:42px; border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.55); color:var(--text);
  font-size:18px; cursor:pointer; flex-shrink:0;
}
.btn-gen:hover{ background:rgba(255,255,255,.12); }

/* Avatar */
.avatar-preview-row{ display:flex; align-items:center; gap:10px; margin-top:6px; }
.avatar-preview{
  width:56px; height:56px; border-radius:999px;
  border:2px solid var(--pink); object-fit:cover; cursor:pointer;
}
.avatar-grid{
  display:grid; grid-template-columns:repeat(5,1fr); gap:8px;
  margin-top:10px; max-height:200px; overflow:auto; padding:8px;
  background:rgba(0,0,0,.4); border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
}
.avatar-grid img{
  width:100%; aspect-ratio:1; border-radius:999px;
  object-fit:cover; cursor:pointer; border:2px solid transparent;
}
.avatar-grid img:hover{ border-color:var(--pink); }
.avatar-grid img.selected{ border-color:var(--pink); box-shadow:0 0 10px rgba(255,67,209,.4); }

/* Composer extras */
.composer-wrap{ position:relative; }
.char-counter{
  position:absolute; bottom:8px; right:12px;
  font-size:12px; color:var(--muted); pointer-events:none;
}
.emoji-toggle-btn{ margin-top:8px; width:100%; font-size:13px; }
.emoji-picker{
  display:grid; grid-template-columns:repeat(8,1fr); gap:4px;
  max-height:180px; overflow:auto; margin-top:8px; padding:8px;
  background:rgba(0,0,0,.4); border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
}
.emoji-picker img{ width:100%; cursor:pointer; border-radius:6px; padding:2px; }
.emoji-picker img:hover{ transform:scale(1.15); }

/* Detail / Replies */
.detail-post{
  padding:12px; background:rgba(255,255,255,.04);
  border-radius:12px; border:1px solid rgba(255,255,255,.12); margin-bottom:10px;
}
.detail-post .body{ font-size:16px; line-height:1.3; margin-top:8px; word-break:break-word; }
.detail-replies{
  display:flex; flex-direction:column; gap:8px;
  max-height:300px; overflow:auto; margin-bottom:10px;
}
.reply-card{
  padding:10px; background:rgba(255,255,255,.04);
  border-radius:10px; border:1px solid rgba(255,255,255,.12);
}
.reply-card .reply-user{ font-weight:800; font-size:14px; color:#7fd6ff; cursor:pointer; }
.reply-card .reply-body{ font-size:14px; margin-top:4px; word-break:break-word; }
.reply-card .reply-time{ font-size:11px; color:var(--muted); margin-top:4px; }
.reply-compose{ display:flex; gap:8px; align-items:flex-end; }
.reply-compose textarea{ flex:1; }
.reply-compose button{ flex-shrink:0; height:42px; }

/* Notifications */
.notif-header{ display:flex; justify-content:space-between; align-items:center; }
.notif-header h3{ margin:0; }
.notif-list{
  display:flex; flex-direction:column; gap:6px;
  max-height:400px; overflow:auto; margin-top:10px;
}
.notif-item{
  padding:10px; border-radius:10px; background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.12); cursor:pointer;
  display:flex; align-items:center; gap:10px; font-size:14px;
}
.notif-item.unread{ border-color:rgba(255,67,209,.4); background:rgba(255,67,209,.06); }
.notif-item .notif-kind{ font-size:20px; flex-shrink:0; }
.notif-item .notif-text{ flex:1; }
.notif-item .notif-time{ font-size:11px; color:var(--muted); flex-shrink:0; }

/* User profile modal */
.user-profile-header{ display:flex; align-items:center; gap:14px; margin-bottom:10px; }
.user-profile-header h3{ margin:0; }
.user-profile-avatar{
  width:64px; height:64px; border-radius:999px;
  border:2px solid var(--pink); object-fit:cover;
}
.user-bio{ font-size:14px; color:var(--muted); margin:8px 0; }
.user-stats{ display:flex; gap:20px; margin:12px 0; }
.stat{ text-align:center; font-size:14px; }
.stat span{ display:block; font-size:22px; font-weight:900; color:#7fd6ff; }

/* Auth card texture */
.auth-card{
  background: url("/assets/fondos/marmol_negro_vetas_doradas.png") center/cover no-repeat;
  background-color:rgba(10,10,10,.88);
  background-blend-mode:overlay;
}

/* Flying post-its canvas */
.fly-canvas{
  position:fixed; inset:0;
  pointer-events:none; z-index:9999;
}

/* Responsive */
@media (max-width:900px){
  .screen{ grid-template-columns:1fr 160px; }
  .post{ width:min(320px, 75%); }
  .chan .name{ font-size:11px; }
}
@media (max-width:600px){
  .screen{ grid-template-columns:1fr; }
  .side{ display:none; }
  .post{ width:min(340px, 90%); }
}

/* Scrollbars */
::-webkit-scrollbar{ width:6px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.15); border-radius:999px; }
