/* =====================
   ROOT
===================== */
:root {
  --bg: #050505;
  --card: #141414;
  --border: #2a2a2a;
  --accent: #ff9900;
  --accent-soft: rgba(255,153,0,0.35);
  --text: #fff;
  --muted: #aaa;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: radial-gradient(circle at top, #0f0f0f, #050505 70%);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
  padding-top: 64px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =====================
   HEADER
===================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #000;
  border-bottom: 1px solid var(--border);
  z-index: 9999;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-btn {
  font-size: 22px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.logo img {
  height: 40px;
}

.topbar-center {
  flex: 1;
}

.topbar-center input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  background: #222;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.topbar-right {
  position: relative;
}

/* =====================
   PROFILE ICON
===================== */
.profile-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #222, #111);
  cursor: pointer;
}

/* =====================
   PROFILE MENU
===================== */
.profile-menu {
  position: absolute;
  top: 56px;
  right: 0;
  width: 260px;
  background: rgba(15,15,15,0.95);
  backdrop-filter: blur(14px);
  border-radius: 14px;
  padding: 10px 0;
  box-shadow: 0 20px 60px rgba(0,0,0,.85);
  display: none;
  z-index: 10000;
}

.profile-menu.open {
  display: block;
}

.profile-menu a {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  font-size: 14px;
  color: #eee;
}

.profile-menu a:hover {
  background: rgba(255,255,255,0.06);
}

.profile-menu .divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 6px 0;
}

.language-switch {
  padding: 10px 18px;
}

.language-switch span {
  font-size: 12px;
  color: var(--muted);
}

.language-switch select {
  width: 100%;
  margin-top: 6px;
  background: #222;
  border: none;
  color: #fff;
  padding: 6px;
  border-radius: 6px;
}

/* =====================
   AUTH MODALS (LOGIN + SIGNUP)
===================== */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}

.auth-modal.show {
  display: flex;
}

.auth-box {
  background: #0b0b0b;
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 380px;
  padding: 24px;
  position: relative;
  text-align: center;
}

.close-auth {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.auth-logo {
  height: 42px;
  margin-bottom: 12px;
}

.auth-social {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  background: #222;
  border: none;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.auth-social:hover {
  background: #333;
}

.or {
  margin: 12px 0;
  font-size: 12px;
  color: var(--muted);
}

.auth-box input {
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  background: #222;
  border: none;
  border-radius: 8px;
  color: #fff;
}

.auth-main {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.switch-auth {
  font-size: 13px;
  margin-top: 12px;
}

.switch-auth span {
  color: var(--accent);
  cursor: pointer;
}

/* =====================
   MAIN CONTENT
===================== */
main.container {
  max-width: 1400px;
  margin: auto;
  padding: 16px;
}

h2 {
  color: var(--accent);
  margin: 12px 0 16px;
}

/* =====================
   CATEGORY STRIP
===================== */
.category-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  border: 1px solid rgba(255,153,0,0.25);
  padding: 9px 20px;
  border-radius: 999px;
  background: linear-gradient(145deg, #151515, #0b0b0b);
  color: var(--accent);
  font-weight: 700;
}

.cat-pill:hover {
  background: linear-gradient(145deg, #ffb347, #ff7a00);
  color: #000;
}

/* =====================
   VIDEO GRID
===================== */
.video-grid {
  display: grid;
  gap: 14px;
}

@media (max-width: 599px) {
  .video-grid { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .video-grid { grid-template-columns: repeat(4, 1fr); }
}

.video-card {
  background: linear-gradient(180deg, #181818, #0f0f0f);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.thumb {
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}

.thumb iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 46px;
  background: rgba(0,0,0,.45);
  opacity: 0;
}

.video-card:hover .play {
  opacity: 1;
}

.title {
  padding: 10px;
  font-size: 14px;
  text-align: center;
}

/* =====================
   FOOTER
===================== */
footer {
  border-top: 1px solid var(--border);
  background: #0b0b0b;
  color: var(--muted);
  text-align: center;
  padding: 12px;
  font-size: 12px;
}
/* ICON FONT (PURE CSS ICONS) */
[class^="icon-"]{
  width:18px;
  height:18px;
  display:inline-block;
  background:currentColor;
  mask-size:contain;
  mask-repeat:no-repeat;
  -webkit-mask-size:contain;
  -webkit-mask-repeat:no-repeat;
}

.icon-user{mask:url(/icons/user.svg)}
.icon-user-plus{mask:url(/icons/user-plus.svg)}
.icon-login{mask:url(/icons/login.svg)}
.icon-heart{mask:url(/icons/heart.svg)}
.icon-star{mask:url(/icons/star.svg)}
.icon-upload{mask:url(/icons/upload.svg)}
.icon-globe{mask:url(/icons/globe.svg)}
.icon-rss{mask:url(/icons/rss.svg)}
.icon-help{mask:url(/icons/help.svg)}
.icon-support{mask:url(/icons/support.svg)}
.icon-menu{mask:url(/icons/menu.svg)}

.profile-menu{
  position:absolute;
  top:60px;
  right:0;
  width:280px;
  background:#0e0e0e;
  border-radius:16px;
  box-shadow:0 30px 60px rgba(0,0,0,.9);
  padding:10px 0;
  display:none;
}

.profile-menu.open{display:block}

.pm-row{
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 18px;
  color:#eee;
  cursor:pointer;
}

.pm-row:hover{
  background:rgba(255,255,255,.06);
}

.pm-row i{color:#ff9900}

.pm-row select{
  margin-left:auto;
  background:#222;
  border:none;
  color:#fff;
  padding:4px 8px;
  border-radius:6px;
}

.divider{
  height:1px;
  background:#222;
  margin:6px 0;
}

.badge{
  margin-left:auto;
  background:#ff9800;
  color:#000;
  font-size:11px;
  padding:2px 8px;
  border-radius:999px;
} /* PROFILE ICON FIX */
.profile-icon{
  width:36px;
  height:36px;
  border-radius:50%;
  background:linear-gradient(145deg,#222,#111);
  display:flex;              /* 🔥 important */
  align-items:center;        /* 🔥 center vertically */
  justify-content:center;    /* 🔥 center horizontally */
  cursor:pointer;
}

.profile-icon i{
  font-size:16px;            /* 🔥 icon visible */
  color:#fff;
  line-height:1;
}
/* =====================
   CATEGORY STRIP FIX (MOBILE SAFE)
===================== */

.category-strip{
  display:flex;
  gap:10px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:6px 2px 10px;
  -webkit-overflow-scrolling:touch;
}

.category-strip::-webkit-scrollbar{
  display:none;
}

.cat-pill{
  flex-shrink:0;              /* 🔥 MOST IMPORTANT */
  white-space:nowrap;        /* 🔥 text break band */
  line-height:1;             /* 🔥 height stable */
  padding:10px 18px;
  font-size:14px;
  border-radius:999px;
  border:1px solid rgba(255,153,0,.35);
  background:linear-gradient(145deg,#151515,#0b0b0b);
  color:#ff9900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.category-strip{
  padding-right:40px;
}
/* =====================
   PREMIUM DARK SCROLLBAR
===================== */

.category-strip{
  overflow-x: auto;
  padding-bottom: 8px;

  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: #1f1f1f transparent;
}

/* Chrome / Edge / Safari */
.category-strip::-webkit-scrollbar{
  height: 4px;
}

.category-strip::-webkit-scrollbar-track{
  background: transparent;
}

.category-strip::-webkit-scrollbar-thumb{
  background: #1f1f1f;
  border-radius: 10px;
}

.category-strip::-webkit-scrollbar-thumb:hover{
  background: #2a2a2a;
}
/* =========================
   LOGGED IN USER BLOCK
========================= */

.pm-user{
  padding:14px 18px 10px;
  color:#fff;
}

.pm-uid{
  font-size:15px;
  font-weight:600;
  margin-bottom:2px;
  color:#fff;
}

.pm-profile{
  font-size:12px;
  color:#aaa;
  margin-bottom:14px;
  cursor:pointer;
}

.pm-profile:hover{
  color:var(--accent);
}

/* =========================
   USER ACTION CIRCLES
========================= */

.pm-actions{
  display:flex;
  gap:12px;
  margin-bottom:10px;
}

.pm-action{
  flex:1;
  background:radial-gradient(circle at top, #1a1a1a, #0b0b0b);
  border-radius:12px;
  padding:12px 6px;
  text-align:center;
  font-size:12px;
  color:#ddd;
  position:relative;
}

.pm-action i{
  font-size:18px;
  color:var(--accent);
  margin-bottom:6px;
  display:block;
}

.pm-action .badge{
  position:absolute;
  top:6px;
  right:6px;
  font-size:10px;
  padding:2px 6px;
  border-radius:999px;
  background:var(--accent);
  color:#000;
}

/* =========================
   LOGOUT ROW
========================= */

#logoutBtn{
  margin-top:6px;
  color:#ffb347;
}

#logoutBtn:hover{
  background:rgba(255,153,0,.12);
  color:#ff9900;
}

/* =========================
   PROFILE ICON (LOGGED)
========================= */

.profile-icon i.fa-user-check{
  color:var(--accent);
}
.auth-toast{
  position:fixed;
  bottom:26px;
  right:26px;
  background:#0f0f0f;
  color:#fff;
  padding:14px 22px;
  border-radius:12px;
  box-shadow:0 20px 60px rgba(0,0,0,.8);
  opacity:0;
  transform:translateY(10px);
  transition:.3s;
  z-index:99999;
}

.auth-toast.show{
  opacity:1;
  transform:none;
}

.auth-toast.error{
  background:#2a0f0f;
  color:#ff6b6b;
}
.auth-main{
  position:relative;
  overflow:hidden;
}

.auth-main.loading .btn-text{
  visibility:hidden;
}

.auth-main.loading .btn-spinner{
  opacity:1;
}

.btn-spinner{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
}

.btn-spinner::after{
  content:"";
  width:22px;
  height:22px;
  border:3px solid rgba(0,0,0,.25);
  border-top-color:#000;
  border-radius:50%;
  animation:spin .7s linear infinite;
}

@keyframes spin{
  to{transform:rotate(360deg)}
}
/* === PROFILE ACTIONS: 2 BUTTON FIX === */
.pm-actions{
  display:grid;
  grid-template-columns: repeat(2, 1fr); /* 🔥 only 2 */
  gap:12px;
}

.pm-action{
  min-height:80px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:.2s;
}

.pm-action:hover{
  background:rgba(255,153,0,.12);
  transform:translateY(-2px);
}

