:root{
  --bg:#0b0f14;
  --bg-soft:#111826;
  --card:#121b2a;
  --card-2:#172233;
  --line:rgba(255,255,255,.08);
  --text:#f5f7fb;
  --muted:#9ea9bb;
  --accent:#22d38c;
  --accent-2:#3b8dff;
  --danger:#ff5a6b;
  --shadow:0 18px 50px rgba(0,0,0,.28);
  --radius:22px;
  --container:1180px;
  --field:#0f1723;
  --chip:#182233;
}

:root[data-theme="light"]{
  --bg:#f5f7fb;
  --bg-soft:#edf2f8;
  --card:#fff;
  --card-2:#fff;
  --line:rgba(15,23,35,.08);
  --text:#101623;
  --muted:#607086;
  --shadow:0 18px 40px rgba(15,23,35,.10);
  --field:#f8fbff;
  --chip:#eef3f8;
}

*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  padding:0;
}

body{
  font-family:"Inter",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  background:
    radial-gradient(1000px 600px at 110% -20%, rgba(59,141,255,.18), transparent 55%),
    radial-gradient(800px 500px at -10% 110%, rgba(34,211,140,.12), transparent 55%),
    var(--bg);
  color:var(--text);
  min-height:100vh;
}

img{
  max-width:100%;
  display:block;
}

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

button,
input,
select{
  font:inherit;
}

button{
  cursor:pointer;
}

.hidden{
  display:none!important;
}

.container{
  width:min(calc(100% - 32px), var(--container));
  margin:0 auto;
}

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom:1px solid var(--line);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:72px;
  gap:20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:800;
}

.brand img{
  width:38px;
  height:38px;
  object-fit:cover;
  border-radius:12px;
}

.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.nav-link{
  color:var(--muted);
  padding:10px 12px;
  border-radius:999px;
}

.nav-link:hover{
  background:var(--chip);
  color:var(--text);
}

.theme-toggle{
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--card);
  color:var(--text);
}

.hero{
  padding:54px 0 22px;
}

.hero-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:26px;
  align-items:center;
}

.eyebrow{
  display:inline-block;
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--accent);
  margin-bottom:12px;
}

.hero-copy h1{
  margin:0;
  font-size:clamp(2.2rem,5vw,4.3rem);
  line-height:1.02;
  letter-spacing:-.04em;
}

.hero-text{
  color:var(--muted);
  font-size:1.06rem;
  line-height:1.7;
  max-width:620px;
  margin:18px 0 0;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:26px;
}

.btn{
  border:none;
  border-radius:999px;
  padding:13px 18px;
  font-weight:700;
}

.btn-primary{
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#fff;
}

.btn-secondary{
  background:var(--chip);
  color:var(--text);
  border:1px solid var(--line);
}

.hero-stats{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top:26px;
}

.stat{
  min-width:112px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--card);
  box-shadow:var(--shadow);
}

.stat strong{
  display:block;
  font-size:1.15rem;
}

.stat span{
  color:var(--muted);
  font-size:.92rem;
}

.hero-card,
.card{
  background:linear-gradient(180deg,var(--card),var(--card-2));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.hero-card{
  padding:18px;
}

.hero-card-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:999px;
  padding:7px 11px;
  background:rgba(34,211,140,.14);
  color:var(--accent);
  font-weight:700;
}

.featured-player{
  border-radius:18px;
  overflow:hidden;
  background:#000;
  aspect-ratio:16/9;
}

.featured-player video{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  background:#000;
}

.featured-meta h2{
  margin:14px 0 8px;
  font-size:1.25rem;
}

.muted{
  color:var(--muted);
}

.toolbar-section{
  padding:10px 0 0;
}

.toolbar{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.search-wrap input{
  width:100%;
  border:none;
  outline:none;
  background:var(--card);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow);
}

.filters{
  display:flex;
  gap:10px;
  overflow:auto;
  padding-bottom:2px;
}

.filter-chip{
  white-space:nowrap;
  border:1px solid var(--line);
  background:var(--chip);
  color:var(--muted);
  border-radius:999px;
  padding:10px 14px;
}

.filter-chip.is-active{
  color:#fff;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  border-color:transparent;
}

.section{
  padding:34px 0;
}

.section-soft{
  background:color-mix(in srgb, var(--bg-soft) 72%, transparent);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:18px;
  margin-bottom:18px;
}

.section-head h3,
.publish-copy h3{
  margin:0;
  font-size:1.7rem;
  letter-spacing:-.03em;
}

.clips-grid,
.drops-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.clip-card,
.drop-card{
  background:linear-gradient(180deg,var(--card),var(--card-2));
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  box-shadow:var(--shadow);
}

.clip-card .thumb{
  background:#000;
  aspect-ratio:16/9;
}

.clip-card .thumb video{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  background:#000;
}

.card-body{
  padding:16px;
}

.card-body h4{
  margin:0;
  font-size:1.05rem;
  line-height:1.35;
}

.meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted);
  font-size:.9rem;
  margin-top:8px;
}

.tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.tag{
  border-radius:999px;
  padding:6px 10px;
  background:var(--chip);
  color:var(--muted);
  font-size:.82rem;
  border:1px solid var(--line);
}

.card-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.action-btn{
  border:none;
  border-radius:999px;
  padding:10px 12px;
  background:var(--chip);
  color:var(--text);
  border:1px solid var(--line);
}

.action-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.like-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.like-btn:hover{
  transform:translateY(-1px);
}

.action-btn.like-btn.is-liked{
  color:#fff!important;
  background:linear-gradient(90deg,#ff4d6d,#ff8a00)!important;
  border-color:transparent!important;
  box-shadow:0 10px 24px rgba(255,77,109,.35)!important;
}

.publish-layout{
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  gap:24px;
  align-items:start;
}

.publish-copy p{
  color:var(--muted);
  line-height:1.7;
}

.publish-points{
  margin:18px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  gap:12px;
}

.upload-card{
  padding:18px;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.field{
  display:grid;
  gap:8px;
}

.field-full{
  grid-column:1/-1;
}

label{
  font-weight:600;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="file"],
select{
  width:100%;
  border:1px solid var(--line);
  background:var(--field);
  color:var(--text);
  border-radius:14px;
  padding:14px;
}

input::file-selector-button{
  border:none;
  margin-right:12px;
  border-radius:10px;
  padding:8px 12px;
  font-weight:700;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#fff;
}

.category-picker{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.category-pill{
  border:1px solid var(--line);
  background:var(--chip);
  color:var(--muted);
  border-radius:999px;
  padding:10px 14px;
}

.category-pill.is-selected{
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#fff;
  border-color:transparent;
}

.toggle-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.note{
  color:var(--muted);
  font-size:.95rem;
}

.form-actions{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:14px;
}

.status{
  min-height:20px;
  color:var(--muted);
}

.status.ok{
  color:var(--accent);
}

.status.err{
  color:var(--danger);
}

.status.load{
  color:var(--accent-2);
}

.proof-preview{
  width:100%;
  max-height:240px;
  border-radius:14px;
  background:#000;
}

.drop-progress{
  height:10px;
  background:var(--chip);
  border-radius:999px;
  overflow:hidden;
  margin-top:12px;
  border:1px solid var(--line);
}

.drop-progress>span{
  display:block;
  height:100%;
  width:0;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
}

.empty{
  border:1px dashed var(--line);
  border-radius:18px;
  padding:28px 20px;
  text-align:center;
  color:var(--muted);
  background:var(--card);
}

.site-footer{
  border-top:1px solid var(--line);
  padding:24px 0 36px;
}

.footer-grid{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
}

.footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  color:var(--muted);
}

dialog{
  border:none;
  padding:0;
  width:min(92vw,720px);
  border-radius:22px;
  background:var(--card);
  color:var(--text);
  border:1px solid var(--line);
}

dialog::backdrop{
  background:rgba(0,0,0,.5);
  backdrop-filter:blur(4px);
}

dialog header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
}

.dialog-close{
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--chip);
  color:var(--text);
}

.dialog-scroll{
  padding:18px;
  color:var(--muted);
  line-height:1.7;
}

.playlist-box{
  margin-top:16px;
  border-top:1px solid var(--line);
  padding-top:16px;
}

.playlist-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}

.playlist-controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:12px;
}

.playlist-list{
  display:grid;
  gap:10px;
  max-height:240px;
  overflow:auto;
}

.playlist-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--line);
  background:var(--chip);
  border-radius:14px;
}

.playlist-item.is-active{
  outline:2px solid color-mix(in srgb, var(--accent) 60%, transparent);
}

.playlist-item-main{
  min-width:0;
  display:grid;
  gap:4px;
}

.playlist-item-title{
  font-weight:600;
  font-size:.95rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.playlist-item-meta{
  color:var(--muted);
  font-size:.82rem;
}

.playlist-item-actions{
  display:flex;
  gap:8px;
  flex-shrink:0;
}

.playlist-mini{
  border:none;
  border-radius:999px;
  padding:8px 10px;
  background:var(--card);
  color:var(--text);
  border:1px solid var(--line);
}

video:fullscreen,
video:-webkit-full-screen{
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  background:#000!important;
}

video::-webkit-media-controls{
  max-width:100%!important;
}

.featured-player:fullscreen,
.featured-player:-webkit-full-screen{
  width:100vw!important;
  height:100vh!important;
  background:#000!important;
}

.featured-player:fullscreen video,
.featured-player:-webkit-full-screen video{
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  background:#000!important;
}

.clip-card .thumb:fullscreen,
.clip-card .thumb:-webkit-full-screen{
  width:100vw!important;
  height:100vh!important;
  background:#000!important;
}

.clip-card .thumb:fullscreen video,
.clip-card .thumb:-webkit-full-screen video{
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  background:#000!important;
}

@media (max-width:980px){
  .hero-grid,
  .publish-layout{
    grid-template-columns:1fr;
  }

  .clips-grid,
  .drops-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:640px){
  .nav{
    min-height:64px;
  }

  .nav-link{
    display:none;
  }

  .hero{
    padding-top:28px;
  }

  .clips-grid,
  .drops-grid,
  .form-grid{
    grid-template-columns:1fr;
  }

  .section-head,
  .footer-grid{
    flex-direction:column;
    align-items:flex-start;
  }

  .hero-copy h1{
    font-size:2.3rem;
  }

  .card-actions{
    gap:8px;
  }

  .action-btn{
    padding:10px 11px;
  }
}

.login-top-btn{
  border:none;
  border-radius:999px;
  padding:11px 15px;
  font-weight:800;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#fff;
  box-shadow:0 10px 26px rgba(34,211,140,.22);
}

.login-top-btn.is-connected{
  background:var(--chip);
  color:var(--accent);
  border:1px solid var(--line);
  box-shadow:none;
}

@media (max-width:640px){
  .login-top-btn{
    padding:10px 13px;
    font-size:.92rem;
  }
}