/* ============================================================
   VIDAO – main stylesheet  (Laravel edition)
   Converted from public/css/style.css (Node.js original)
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: #0a0a1f;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  background-color: #0f0f21;
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  position: sticky; top: 0; z-index: 1000;
}
.main-navbar        { border-bottom: 1px solid rgba(255,255,255,.08); }
.navbar-content     { gap: 1.5rem; }
.navbar-tagline     { color: rgba(255,255,255,.75); font-size: .95rem; letter-spacing: .02em; }
.navbar-divider     { width: 1px; height: 28px; background-color: rgba(255,255,255,.25); }
.navbar-brand {
  font-size: 1.5rem; font-weight: 700; color: #fff !important;
  display: flex; align-items: center; transition: transform .2s;
}
.navbar-brand:hover { transform: scale(1.05); }

.navbar .form-control {
  background-color: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 25px;
  padding: .75rem 1.5rem; transition: all .3s;
}
.navbar .form-control:focus {
  background-color: rgba(255,255,255,.15);
  border-color: #6c5ce7; color: #fff;
  box-shadow: 0 0 0 .2rem rgba(108,92,231,.25);
}
.navbar .form-control::placeholder { color: rgba(255,255,255,.5); }

/* ── Container ──────────────────────────────────────────── */
.container { max-width: 1400px; padding: 0 1rem; margin: 0 auto; }

/* ── Ad Container ───────────────────────────────────────── */
.ad-container {
  background-color: #1a1a3e;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 1rem 1.25rem;
  margin: 1.25rem 0; box-shadow: 0 8px 16px rgba(0,0,0,.25);
}
.ad-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.ad-label  { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: rgba(255,255,255,.65); background: rgba(255,255,255,.05); padding: .35rem .65rem; border-radius: 999px; }
.ad-provider { color: #a29bfe; font-weight: 700; font-size: .9rem; }
.ad-wrapper  { background-color: rgba(255,255,255,.02); border: 1px dashed rgba(255,255,255,.15); border-radius: 10px; padding: .75rem; min-height: 80px; }

/* ── Video Grid ─────────────────────────────────────────── */
.video-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .75rem; margin-top: 1.5rem; padding-bottom: 2rem; }

/* ── Video Card ─────────────────────────────────────────── */
.video-card {
  background-color: #1a1a3e; border-radius: 12px; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative; text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.video-card:hover { transform: translateY(-4px); box-shadow: 0 8px 14px rgba(0,0,0,.3); }
.video-card:active { transform: translateY(-2px); }
.video-thumbnail { width: 100%; aspect-ratio: 16/9; object-fit: contain; background-color: #0f1024; display: block; }
.video-duration {
  position: absolute; top: .75rem; right: .75rem;
  background-color: rgba(0,0,0,.9); color: #fff;
  padding: .25rem .6rem; border-radius: 6px;
  font-size: .75rem; font-weight: 700; z-index: 2;
}
.video-info { padding: 1rem; }
.video-title {
  font-size: .95rem; font-weight: 600; margin: 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis; color: #fff; min-height: 2.8rem;
}
.video-meta { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; font-size: .8rem; color: #999; }

/* ── Video Player ───────────────────────────────────────── */
.video-player-wrapper { max-width: 100%; margin: 0; padding: 0; width: 100%; }
.video-player-container { margin-top: 0; background-color: #000; max-width: 100%; position: relative; width: 100%; }

.video-embed-wrapper {
  position: relative; padding-bottom: 56.25% !important;
  height: 0 !important; overflow: hidden;
  background-color: #000; width: 100% !important;
  user-select: none; -webkit-user-select: none;
}
.video-embed-wrapper video {
  position: absolute !important; top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  object-fit: cover !important; object-position: center !important;
  background-color: #000 !important; display: block !important;
}
.video-embed-wrapper iframe,
.video-embed-wrapper embed {
  position: absolute !important; top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  border: 0; background-color: #000 !important;
}
.video-embed-blocker { position: absolute; inset: 0; z-index: 3; background: transparent; pointer-events: none; }
.video-embed-mask { position: absolute; pointer-events: none; z-index: 2; background: #000; opacity: 0; transition: opacity .2s ease-in-out; }
.video-embed-mask--top    { top: 0; left: 0; right: 0; height: clamp(40px,7vw,60px); }
.video-embed-mask--bottom { bottom: 0; left: 0; right: 0; height: clamp(28px,5vw,48px); }

.embed-actions { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; padding: .85rem 1.5rem 1rem; background: #0f1024; border-top: 1px solid rgba(255,255,255,.08); }
.embed-actions__note { margin: 0; font-size: .85rem; color: rgba(255,255,255,.7); }

.embed-popup { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; padding: 1.5rem; opacity: 0; pointer-events: none; transition: opacity .2s ease-in-out; z-index: 1100; }
.embed-popup.is-active { opacity: 1; pointer-events: auto; }
.embed-popup__dialog { position: relative; background: #0f1024; border-radius: 16px; width: min(900px,95vw); box-shadow: 0 16px 40px rgba(0,0,0,.5); padding: 2.5rem 1.5rem 1.5rem; }
.embed-popup__frame-wrapper { position: relative; width: 100%; padding-bottom: 56.25%; border-radius: 12px; overflow: hidden; background: #000; }
.embed-popup__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-popup__close { position: absolute; top: .75rem; right: .75rem; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,.1); color: #fff; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.embed-popup__close:hover { background: rgba(255,255,255,.2); }

/* ── Video Details ──────────────────────────────────────── */
.video-details { padding: 1.5rem; background-color: #1a1a3e; border-radius: 0; max-width: 1400px; margin: 0 auto; }
.video-details h3 { font-size: 1.3rem; margin-bottom: 1rem; line-height: 1.4; font-weight: 700; }
.video-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.tag-badge { background-color: rgba(108,92,231,.2); color: #a29bfe; border: 1px solid rgba(108,92,231,.3); padding: .4rem .8rem; border-radius: 20px; font-size: .85rem; font-weight: 500; text-decoration: none; transition: all .2s; }
.tag-badge:hover { background-color: rgba(108,92,231,.4); color: #fff; transform: translateY(-2px); }

/* ── Recommended ────────────────────────────────────────── */
.recommended-section { margin: 2rem 0; padding: 1.5rem; background-color: #1a1a3e; border-radius: 12px; }
.section-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; display: flex; align-items: center; gap: .5rem; color: #fff; }
.section-title .icon { font-size: 1.8rem; }

/* ── Search ─────────────────────────────────────────────── */
.search-header { padding: 1.5rem; background-color: #1a1a3e; margin-bottom: 1.5rem; border-radius: 12px; }
.search-header h2 { font-size: 1.4rem; margin: 0; font-weight: 700; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary { background: linear-gradient(135deg,#6c5ce7 0%,#a29bfe 100%); border: none; border-radius: 25px; padding: .5rem 1.25rem; font-weight: 600; transition: all .3s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(108,92,231,.35); }
.btn-outline-light { border-radius: 25px; font-weight: 600; border-width: 2px; padding: .5rem 1.25rem; transition: all .3s; }
.btn-outline-light:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(255,255,255,.18); }
.alert-info { background-color: rgba(108,92,231,.15); border: 1px solid rgba(108,92,231,.3); color: #a29bfe; border-radius: 12px; padding: 1.5rem; text-align: center; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 2rem auto; width: 100%; max-width: 720px; padding: 1rem; flex-wrap: wrap; background: rgba(26,26,62,.7); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; }
.pagination-btn { min-width: 130px; border-radius: 999px; font-weight: 700; }
.pagination-btn.disabled { opacity: .5; cursor: not-allowed; }
.pagination-info { color: #dcdcf8; font-weight: 600; letter-spacing: .01em; }
.pagination-highlight { color: #a29bfe; font-weight: 800; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: linear-gradient(180deg,rgba(26,26,62,.95) 0%,#0a0a1f 100%); border-top: 1px solid rgba(108,92,231,.2); padding: 2rem 0 2.5rem; margin-top: 3rem; color: #e9e9ff; }
.footer-content { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); align-items: center; }
.footer-brand { display: flex; align-items: center; gap: .75rem; }
.footer-logo   { font-size: 1.8rem; }
.footer-title  { font-size: 1.15rem; font-weight: 700; margin: 0; }
.footer-subtitle { margin: .1rem 0 0; color: #b8b8d8; font-size: .95rem; }
.footer-links  { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #cfcfff; text-decoration: none; font-weight: 600; padding: .35rem .8rem; border-radius: 999px; background-color: rgba(255,255,255,.05); border: 1px solid rgba(108,92,231,.25); transition: all .2s ease; }
.footer-links a:hover { color: #fff; background-color: rgba(108,92,231,.25); transform: translateY(-2px); }
.footer-meta   { text-align: right; color: #b8b8d8; }

/* ── Age Gate ───────────────────────────────────────────── */
.age-gate-open { overflow: hidden; }
.age-gate-backdrop { position: fixed; inset: 0; background: rgba(10,10,31,.85); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 2000; backdrop-filter: blur(2px); }
.age-gate-backdrop.active { display: flex; }
.age-gate-modal { background: linear-gradient(135deg,#1a1a3e,#141427); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 1.5rem; max-width: 460px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.age-gate-header { display: flex; align-items: center; gap: 1rem; }
.age-gate-icon { width: 58px; height: 58px; border-radius: 14px; background: rgba(255,255,255,.08); display: grid; place-items: center; font-size: 28px; }
.age-gate-title { margin: 0; font-size: 1.15rem; font-weight: 700; }
.age-gate-subtitle { margin: .25rem 0 0; color: rgba(255,255,255,.75); }
.age-gate-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1.25rem; }
.age-gate-btn { padding: .75rem 1rem; border-radius: 12px; font-weight: 700; }
.age-gate-note { margin-top: .75rem; color: rgba(255,255,255,.6); font-size: .9rem; text-align: center; }

/* ── Scrollbar ──────────────────────────────────────────── */
html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #0a0a1f; }
::-webkit-scrollbar-thumb { background: linear-gradient(135deg,#6c5ce7,#a29bfe); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg,#5f50d4,#8f84e8); }

/* ── Skeleton ───────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg,#1a1a3e 25%,#2a2a4e 50%,#1a1a3e 75%); background-size: 200% 100%; animation: loading 1.5s infinite; }
@keyframes loading { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ══════════ RESPONSIVE ══════════ */

/* Tablet */
@media (min-width:576px) {
  .video-grid { grid-template-columns: repeat(3,1fr); gap: 1rem; }
  .video-title { font-size: 1rem; }
  .video-info  { padding: 1.25rem; }
}

/* Desktop */
@media (min-width:768px) {
  .navbar { padding: 1rem 3rem; }
  .container { padding: 0 2rem; }
  .video-grid { grid-template-columns: repeat(4,1fr); gap: 1.5rem; margin-top: 2rem; }
  .video-card { border-radius: 16px; }
  .video-title { font-size: 1.05rem; min-height: 3rem; }
  .video-duration { padding: .35rem .75rem; font-size: .85rem; }
  .video-meta { font-size: .85rem; }
  .video-player-wrapper { max-width: 1400px; margin: 2rem auto; padding: 0 2rem; }
  .video-player-container { border-radius: 16px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
  .video-embed-wrapper { border-radius: 16px 16px 0 0; }
  .video-details { padding: 2rem; border-radius: 0 0 16px 16px; }
  .video-details h3 { font-size: 1.75rem; margin-bottom: 1.25rem; }
  .video-meta { font-size: .95rem; margin-top: .75rem; }
  .video-tags { margin-top: 1.25rem; gap: .75rem; }
  .tag-badge { padding: .5rem 1rem; font-size: .9rem; }
  .recommended-section { padding: 2rem; margin: 3rem 0; }
  .section-title { font-size: 1.75rem; margin-bottom: 2rem; }
  .search-header { padding: 2rem; margin-bottom: 2rem; }
  .search-header h2 { font-size: 1.75rem; }
}

/* Large desktop */
@media (min-width:992px) {
  .container { max-width: 1600px; }
  .video-grid { grid-template-columns: repeat(5,1fr); gap: 2rem; }
  .navbar { padding: 1.25rem 4rem; }
  .video-title { font-size: 1.1rem; }
}

/* XL desktop */
@media (min-width:1400px) {
  .video-grid { grid-template-columns: repeat(6,1fr); }
  .container  { max-width: 1800px; }
}

/* Mobile overrides */
@media (max-width:575px) {
  .navbar { padding: .75rem 1rem; }
  .navbar-content { gap: .75rem; }
  .navbar-brand { font-size: 1.25rem; }
  .navbar .d-flex { width: 100%; margin-top: .75rem; }
  .navbar .form-control { flex: 1; font-size: .9rem; padding: .6rem 1rem; }
  .btn-outline-light { padding: .5rem 1rem; font-size: .85rem; }
  .video-grid { gap: .5rem; margin-top: 1rem; }
  .video-info { padding: .75rem; }
  .video-title { font-size: .85rem; min-height: 2.4rem; }
  .video-duration { padding: .2rem .5rem; font-size: .7rem; }
  .video-meta { font-size: .75rem; margin-top: .4rem; }
  .video-player-wrapper { margin: 0 !important; padding: 0 !important; width: 100% !important; }
  .video-player-container { border-radius: 0 !important; width: 100% !important; }
  .video-embed-wrapper { border-radius: 0 !important; }
  .video-embed-wrapper video { object-fit: cover !important; }
  .video-details { padding: 1rem; border-radius: 0; }
  .video-details h3 { font-size: 1.1rem; }
  .recommended-section { padding: 1rem; margin: 1.5rem 0; border-radius: 0; }
  .section-title { font-size: 1.1rem; margin-bottom: 1rem; }
  .section-title .icon { font-size: 1.3rem; }
  .pagination-nav { flex-direction: column; width: 100%; text-align: center; }
  .pagination-btn { width: 100%; }
  .footer-content { text-align: center; grid-template-columns: 1fr; }
  .footer-meta { text-align: center; }
  .age-gate-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion:reduce) {
  *,.video-card,.btn-primary,.btn-outline-light,.footer-links a {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; transition: none;
  }
}
