*{box-sizing:border-box}html,body{margin:0;background:#000;color:#fff;font-family:Arial,Helvetica,sans-serif}body{overflow:hidden}.topbar{position:fixed;z-index:20;top:0;left:50%;transform:translateX(-50%);width:min(520px,100%);height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;background:linear-gradient(#000b,transparent);pointer-events:none}.topbar>*{pointer-events:auto}.brand{font-size:18px;font-weight:800}.tabs{display:flex;gap:18px;align-items:center}.tabs button{background:none;border:0;color:#aaa;font-weight:700;font-size:14px;padding:8px 2px}.tabs button.active{color:#fff;border-bottom:2px solid #fff}.admin-link{border:1px solid #777;border-radius:18px;color:#fff;text-decoration:none;padding:7px 11px;font-size:11px}.shell{height:100vh;display:flex;justify-content:center}.phone{width:min(520px,100vw);height:100vh;position:relative;background:#050505}#feed{height:100vh;overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none}#feed::-webkit-scrollbar{display:none}.card{position:relative;width:100%;height:100vh;scroll-snap-align:start;background:#111;overflow:hidden}.card video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.shade{position:absolute;inset:0;background:linear-gradient(transparent 35%,transparent 55%,#000d 100%);pointer-events:none}.info{position:absolute;left:16px;right:92px;bottom:82px;text-shadow:0 2px 8px #000}.info h2{font-size:18px;margin:0 0 7px}.info p{font-size:13px;line-height:1.4;margin:0 0 7px;white-space:pre-wrap}.info small{font-size:11px;color:#ddd}.actions{position:absolute;right:12px;bottom:84px;display:flex;flex-direction:column;align-items:center;gap:15px}.actions button{width:52px;height:52px;border:0;border-radius:50%;background:#0009;color:#fff;font-size:21px;cursor:pointer;box-shadow:0 2px 8px #0005}.actions small{display:block;font-size:10px;margin-top:2px}.actions .like.liked{color:#ff375f}.profile-dot{width:46px;height:46px;border-radius:50%;border:2px solid #fff;background:linear-gradient(135deg,#555,#111);display:grid;place-items:center;font-size:17px}.bottomnav{position:absolute;z-index:30;left:0;right:0;bottom:0;height:62px;display:flex;align-items:center;justify-content:space-around;background:linear-gradient(transparent,#000d);padding-bottom:6px}.bottomnav button,.bottomnav a{background:none;border:0;color:#fff;text-decoration:none;font-size:11px;display:flex;flex-direction:column;align-items:center;gap:4px}.plus{width:44px;height:30px;border-radius:9px;background:#fff!important;color:#000!important;font-size:20px!important;line-height:20px}.comments-modal{position:absolute;z-index:50;inset:auto 0 0;height:58%;background:#fff;color:#111;border-radius:18px 18px 0 0;display:none;flex-direction:column}.comments-modal.show{display:flex}.comments-head{display:flex;justify-content:space-between;padding:15px;border-bottom:1px solid #ddd;font-weight:700}.comments-list{flex:1;overflow:auto;padding:12px}.comment{padding:9px 0;border-bottom:1px solid #eee}.comment b{font-size:12px}.comment p{margin:3px 0;font-size:13px}.comment-form{display:flex;gap:8px;padding:10px;border-top:1px solid #ddd}.comment-form input{flex:1;padding:10px;border:1px solid #ccc;border-radius:20px}.comment-form button{border:0;border-radius:20px;background:#111;color:#fff;padding:0 16px}.toast{position:absolute;z-index:60;left:50%;bottom:80px;transform:translateX(-50%);background:#000d;padding:10px 15px;border-radius:20px;font-size:12px;display:none}.toast.show{display:block}#loading{position:absolute;z-index:100;inset:0;background:#000;display:grid;place-items:center}#loading.hide{display:none}@media(min-width:700px){body{background:#eee}.phone{box-shadow:0 0 35px #0003}}.modal{position:absolute;z-index:70;inset:0;background:#0009;display:none;align-items:flex-end}.modal.show{display:flex}.modal-card{width:100%;max-height:88%;overflow:auto;background:#fff;color:#111;border-radius:20px 20px 0 0;padding:20px;position:relative}.modal-card.auth{max-width:440px;margin:auto;border-radius:20px}.x{position:absolute;right:15px;top:12px;border:0;background:#eee;border-radius:50%;width:32px;height:32px}.modal-card form{display:grid;gap:10px}.modal-card input,.modal-card textarea{padding:11px;border:1px solid #ccc;border-radius:9px;font:inherit}.modal-card button[type=submit],.modal-card form button{padding:11px;border:0;border-radius:9px;background:#111;color:#fff}.auth-tabs{display:flex;gap:8px;margin-bottom:15px}.auth-tabs button{flex:1;padding:10px;border:1px solid #ccc;background:#fff;border-radius:8px}.profile-head{text-align:center;padding:10px}.avatar{width:80px;height:80px;border-radius:50%;margin:auto;background:#222;color:#fff;display:grid;place-items:center;font-size:28px}.profile-stats{display:flex;justify-content:space-around;text-align:center;margin:16px 0}.profile-stats b{display:block;font-size:20px}.profile-actions button{width:100%;padding:10px;border:0;border-radius:9px;background:#111;color:#fff}.profile-actions .secondary{background:#eee;color:#111;margin-top:7px}.profile-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;margin-top:15px}.profile-grid video{width:100%;aspect-ratio:9/14;object-fit:cover;background:#111}
.creator-row{display:flex;align-items:center;gap:8px;margin-bottom:5px}
.creator{border:0;background:transparent;color:#fff;font-weight:800;font-size:18px;padding:0;cursor:pointer;text-align:left}
.mini-follow{border:1px solid #fff;background:#fff;color:#111;border-radius:6px;padding:4px 9px;font-weight:700;cursor:pointer}
.mini-follow.following{background:#ffffff33;color:#fff}
.profile-actions{display:flex;gap:8px}
.profile-actions button{cursor:pointer}
/* =========================
   SEARCH
========================= */

.search-card{
  width:min(520px,92vw);
  max-height:85vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.search-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-bottom:15px;
}

.search-header h2{
  margin:0;
}

.search-form{
  display:flex;
  gap:8px;
  margin-bottom:15px;
}

.search-form input{
  flex:1;
  min-width:0;
  border:1px solid #ddd;
  border-radius:10px;
  padding:12px 14px;
  font-size:15px;
  outline:none;
}

.search-form input:focus{
  border-color:#111;
}

.search-form button{
  border:0;
  border-radius:10px;
  background:#111;
  color:#fff;
  padding:0 18px;
  font-weight:700;
  cursor:pointer;
}

.search-results{
  overflow-y:auto;
  min-height:100px;
}

.search-empty{
  text-align:center;
  color:#777;
  padding:30px 10px;
}

.search-section{
  margin-bottom:22px;
}

.search-section h3{
  margin:0 0 10px;
  font-size:16px;
}

.search-user-list,
.search-video-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.search-user,
.search-video{
  width:100%;
  border:1px solid #eee;
  background:#fff;
  border-radius:12px;
  padding:10px;
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  cursor:pointer;
}

.search-user:hover,
.search-video:hover{
  background:#f5f5f5;
}

.search-avatar{
  width:44px;
  height:44px;
  min-width:44px;
  border-radius:50%;
  background:#222;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  overflow:hidden;
}

.search-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.search-user-info,
.search-video span{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.search-user-info strong,
.search-video strong{
  color:#111;
}

.search-user-info small,
.search-video small{
  color:#777;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.search-video video{
  width:64px;
  height:86px;
  min-width:64px;
  object-fit:cover;
  border-radius:8px;
  background:#111;
}

.feed-empty{
  height:100%;
  display:grid;
  place-items:center;
  padding:30px;
  text-align:center;
  color:#aaa;
}
.like.liked{color:#ff3b30}
.profile-grid{align-items:start}
.profile-video{
  padding:0;
  border:0;
  background:#111;
  border-radius:3px;
  overflow:hidden;
  cursor:pointer;
  aspect-ratio:9/14;
}
.profile-video img,.profile-video-fallback{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.profile-video-fallback{
  display:grid;
  place-items:center;
  color:#fff;
  font-size:24px;
}
.profile-more{
  width:100%;
  margin-top:12px;
  padding:11px;
  border:0;
  border-radius:9px;
  background:#111;
  color:#fff;
  cursor:pointer;
}
.profile-more:disabled{opacity:.6;cursor:wait}
.search-video img,.search-video-placeholder{
  width:64px;
  height:86px;
  min-width:64px;
  object-fit:cover;
  border-radius:8px;
  background:#111;
}
.search-video-placeholder{
  display:grid;
  place-items:center;
  color:#fff;
}
