/* ==========================================
   VibeTube - Professional UI Style
   Mobile + Desktop Friendly
   Full Replace style.css
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root{
  --card: #ffffff;
  --text: #121212;
  --muted: rgba(0,0,0,.60);
  --border: rgba(0,0,0,.10);
  --brand: #ff0033;
  --pill: #f3f3f3;
  --pillActive: #111;
}

*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; }
body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f6f7fb;
  color: var(--text);
}

/* ===== Header ===== */
.tvb-header{
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.tvb-bar{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
}

.tvb-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration: none;
  color: #111;
  font-weight: 800;
  white-space: nowrap;
}

.tvb-play{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(255,0,51,.20);
}

.tvb-name{
  font-size: 18px;
  letter-spacing: .2px;
}

.tvb-search{
  flex: 1;
  display:flex;
  align-items:center;
  gap: 10px;
  max-width: 720px;
}

.tvb-search input{
  width: 100%;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid #ddd;
  outline:none;
  font-size: 14px;
  background: #fff;
}

.tvb-search input:focus{
  border-color: rgba(0,0,0,.30);
}

.tvb-search button{
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: #111;
  color: #fff;
  font-weight: 800;
  cursor:pointer;
}

.tvb-search button:hover{ opacity: .92; }

.tvb-upload{
  text-decoration:none;
  padding: 10px 14px;
  background: #111;
  color:#fff;
  border-radius:999px;
  font-weight:800;
  white-space:nowrap;
}

.tvb-upload:hover{ opacity:.92; }

.tvb-cat-btn{
  display: none;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
}

.tvb-cats{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding: 10px 14px 12px;
  scrollbar-width: thin;
}

.tvb-cats::-webkit-scrollbar{ height:6px; }
.tvb-cats::-webkit-scrollbar-thumb{
  background:#ddd;
  border-radius:999px;
}

.tvb-cat{
  text-decoration:none;
  color:#111;
  background: var(--pill);
  padding: 9px 14px;
  border-radius:999px;
  font-weight:800;
  font-size:13px;
  white-space:nowrap;
}

.tvb-cat:hover{ background:#e9e9e9; }

.tvb-cat.active{
  background: var(--pillActive);
  color:#fff;
}

/* Mobile header */
@media(max-width:700px){
  .tvb-name{ display:none; }
  .tvb-search button{ display:none; }
  .tvb-upload{ padding: 9px 12px; font-size: 13px; }

  .tvb-cat-btn{ display: inline-flex; }

  /* hide categories until button clicked */
  .tvb-cats{
    display: none;
    overflow: visible;
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 10px;
  }

  body.cats-open .tvb-cats{
    display: flex;
  }

  /* ✅ 3 categories per row */
  .tvb-cat{
    width: calc(33.333% - 7px);
    text-align: center;
  }
}

/* ===== Layout ===== */
.yt-content{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 14px 60px;
}

.page-title{
  margin: 18px 0 14px;
  font-size: 22px;
  font-weight: 900;
}

/* ===== Grid Cards ===== */
.grid{
  display:grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media(max-width:1100px){
  .grid{ grid-template-columns: repeat(3, 1fr); }
}
@media(max-width:820px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:520px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: var(--card);
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid var(--border);
  text-decoration:none;
  color:#111;
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
}

.thumb{
  width:100%;
  aspect-ratio: 16/9;
  background: #eaeaea;
  overflow:hidden;
}

.thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.card-body{
  padding: 12px 12px 14px;
}

.card-body h3{
  margin:0 0 6px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.meta{
  margin:0;
  font-size: 12px;
  color: rgba(0,0,0,.60);
  font-weight: 700;
}

/* ===== Buttons ===== */
.btn{
  display:inline-block;
  padding: 11px 16px;
  border-radius: 999px;
  background:#111;
  color:#fff;
  text-decoration:none;
  font-weight:900;
  border:none;
  cursor:pointer;
}

.btn:hover{ opacity:.92; }

.empty{
  background:#fff;
  border:1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-top: 16px;
}

/* ===== Watch Page ===== */
.watch-layout{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

@media(max-width:900px){
  .watch-layout{ grid-template-columns: 1fr; }
}

.watch-title{
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 1000;
}

.video-wrap{
  background:#000;
  border-radius: 18px;
  overflow:hidden;
  border:1px solid var(--border);
}

.embed-wrap iframe{
  width:100%;
  height:420px;
  border:0;
  display:block;
}

@media(max-width:600px){
  .embed-wrap iframe{ height: 240px; }
}

.desc-box{
  margin-top: 14px;
  background:#fff;
  border:1px solid var(--border);
  border-radius: 18px;
  padding: 14px 14px;
}

.desc-box h4{
  margin:0 0 8px;
  font-size: 15px;
  font-weight: 900;
}

.desc-box p{
  margin:0;
  color: rgba(0,0,0,.75);
  line-height: 1.45;
  font-weight: 600;
}

.watch-side .side-title{
  margin:0 0 10px;
  font-size: 16px;
  font-weight: 1000;
}

/* ===== Footer ===== */
footer{
  text-align:center;
  color: rgba(0,0,0,.55);
  font-weight: 700;
  padding: 26px 12px;
}
/* VibeTube Logo */
.tvb-logo{
  width:38px;
  height:38px;
  object-fit:contain;
}

@media(max-width:600px){
  .tvb-logo{
    width:32px;
    height:32px;
  }
}
