:root {
  --bg: #0b0d12;
  --panel: #12151c;
  --panel-2: #1a1e27;
  --line: #242a35;
  --text: #f3f4f6;
  --muted: #9aa1ad;
  --red: #ef2b2b;
  --red-2: #b31414;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; }
html, body { background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; }
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img, video { display: block; max-width: 100%; }
.red { color: var(--red); }
.muted { color: var(--muted); font-size: 14px; }

/* Loader */
#loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: radial-gradient(circle at 50% 40%, #2a0d10, var(--bg) 65%);
  transition: opacity .6s ease, visibility .6s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-ring {
  position: relative; width: 168px; height: 168px; border-radius: 50%; padding: 6px;
  background: conic-gradient(var(--red), #ff9b3b, transparent 70%, var(--red));
  animation: spin 1.4s linear infinite;
}
.loader-ring img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 58%;
  border: 4px solid var(--bg); animation: spin 1.4s linear infinite reverse;
}
.loader-brand { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.loader-text { color: var(--muted); font-size: 15px; }
.loader-bar { width: 200px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 40%; background: var(--red); animation: slide 1.1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; height: 72px; display: flex; align-items: center; gap: 20px;
  padding: 0 24px; background: rgba(11,13,18,.92); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; min-width: 220px; }
.logo-mark {
  display: inline-grid; place-items: center; width: 40px; height: 30px; border-radius: 8px;
  background: var(--red); color: #fff; font-size: 14px;
}
.search {
  flex: 1; max-width: 760px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 30px; background: var(--panel); color: var(--muted);
}
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.upload-btn {
  margin-left: auto; height: 40px; padding: 0 18px; border-radius: 22px; background: var(--red);
  font-weight: 600; white-space: nowrap;
}
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; object-position: 50% 58%; border: 2px solid var(--line); }
.icon-btn { font-size: 22px; padding: 6px; }
.menu-btn { display: none; }

/* Sidebar */
.sidebar {
  position: fixed; top: 72px; left: 0; bottom: 0; width: 248px; overflow-y: auto; padding: 12px 12px 24px;
  background: var(--bg); z-index: 15; transition: transform .25s;
}
.nav {
  display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 12px; font-weight: 500; font-size: 15px;
}
.nav:hover { background: var(--panel-2); }
.nav.active { background: linear-gradient(90deg, var(--red-2), #6d1010); }
.side-title { margin: 18px 14px 6px; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.sidebar hr { border: 0; border-top: 1px solid var(--line); margin: 14px 8px; }
.nav small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.x-ico { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #fff; color: #000; font-weight: 800; font-size: 14px; }
#shareX { background: #fff; color: #000; }
.side-card {
  margin: 18px 4px 0; padding: 18px; border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--line); text-align: center; display: grid; gap: 8px; justify-items: center;
}
.side-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 58%; border: 3px solid var(--red); }
.side-card p { color: var(--muted); font-size: 13px; line-height: 1.4; }
.side-card button { width: 100%; padding: 10px; border-radius: 10px; background: var(--red); font-weight: 600; }

/* Content */
.content { margin-left: 248px; padding: 12px 28px 48px 20px; }
.top-grid { display: grid; grid-template-columns: 1fr 330px; gap: 24px; }
.main-grid { display: grid; grid-template-columns: 1fr 330px; gap: 24px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel h3 { font-size: 20px; margin-bottom: 12px; }

/* Hero */
.hero { position: relative; height: 360px; border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.hero-slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s; }
.slide.on { opacity: 1; z-index: 1; }
.slide .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide.brand .bg { filter: blur(26px) brightness(.55); transform: scale(1.2); }
.slide .portrait {
  position: absolute; right: 6%; top: 50%; transform: translateY(-50%); height: 88%; aspect-ratio: 3/4;
  object-fit: cover; object-position: 50% 58%; border-radius: 18px; border: 3px solid rgba(255,255,255,.15);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,8,12,.85), rgba(8,8,12,.35) 55%, transparent); }
.slide-text { position: absolute; z-index: 2; left: 48px; top: 50%; transform: translateY(-50%); max-width: 46%; }
.tag { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--red); font-size: 13px; font-weight: 700; }
.slide-text h1 { font-size: clamp(26px, 3.4vw, 46px); line-height: 1.08; margin: 14px 0 10px; font-weight: 800; }
.slide-text p { color: #d8dbe0; font-size: 16px; line-height: 1.45; }
.slide-btns { display: flex; gap: 12px; margin-top: 22px; }
.btn { padding: 12px 22px; border-radius: 10px; font-weight: 600; }
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.hero-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.45); font-size: 26px; line-height: 1;
}
.hero-arrow.left { left: 10px; } .hero-arrow.right { right: 10px; }
.hero-dots { position: absolute; z-index: 3; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.35); }
.hero-dots button.on { background: #fff; width: 22px; border-radius: 6px; }

/* Shorts */
.shorts-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 284px; }
.short { position: relative; border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.short img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.short:hover img { transform: scale(1.06); }
.short span { position: absolute; left: 8px; bottom: 8px; font-weight: 700; font-size: 14px; text-shadow: 0 1px 4px #000; }

/* Rows & cards */
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.row-head.small { margin: 0 0 8px; }
.row-head h2 { font-size: 24px; }
.row-head a { color: var(--muted); font-weight: 600; font-size: 14px; }
.row-head a:hover { color: #fff; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cards.grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { cursor: pointer; }
.thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .thumb img { transform: scale(1.05); }
.badge {
  position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; border-radius: 6px; background: rgba(0,0,0,.78);
  font-size: 13px; font-weight: 700;
}
.badge.type { left: 8px; right: auto; top: 8px; bottom: auto; background: rgba(239,43,43,.9); }
.card h4 { margin: 10px 0 4px; font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card p { color: var(--muted); font-size: 13px; }

.masonry { columns: 4 220px; column-gap: 14px; }
.masonry .tile { break-inside: avoid; margin-bottom: 14px; border-radius: 12px; overflow: hidden; cursor: pointer; position: relative; }
.masonry .tile img { width: 100%; transition: transform .4s; }
.masonry .tile:hover img { transform: scale(1.04); }
.masonry .tile span {
  position: absolute; inset: auto 0 0 0; padding: 28px 12px 10px; font-weight: 600; font-size: 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.8)); opacity: 0; transition: opacity .3s;
}
.masonry .tile:hover span { opacity: 1; }

/* Creators */
.creator { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
.creator:first-child { border-top: 0; }
.creator img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.creator div { flex: 1; min-width: 0; }
.creator b { display: block; font-size: 15px; }
.creator small { color: var(--muted); }
.sub { padding: 7px 12px; border-radius: 8px; background: var(--red); font-size: 13px; font-weight: 600; }
.sub.on { background: var(--panel-2); color: var(--muted); }

/* Tabs */
.tabs { display: flex; gap: 6px; background: var(--panel); padding: 4px; border-radius: 10px; border: 1px solid var(--line); }
.tabs button { padding: 7px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tabs button.on { background: var(--red); color: #fff; }
#countryFilter {
  margin-left: auto; height: 38px; max-width: 220px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 14px;
}
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.82); }
.modal[hidden] { display: none; }
.close { position: absolute; top: 10px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.55); font-size: 16px; }
.viewer { position: relative; width: min(1100px, 100%); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.viewer-media { background: #000; display: grid; place-items: center; max-height: 72vh; }
.viewer-media img, .viewer-media video { max-height: 72vh; width: 100%; object-fit: contain; }
.viewer-info { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; }
.viewer-info h2 { font-size: 20px; }
.viewer-info p { color: var(--muted); margin-top: 4px; font-size: 14px; }
.viewer-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.viewer-actions > * { padding: 9px 14px; border-radius: 10px; background: var(--panel-2); font-size: 14px; font-weight: 600; }
.viewer-actions .on { background: var(--red); }
.viewer-actions .danger { background: #3a1214; color: #ff8a8a; }
.nav-arrow { position: absolute; top: 36%; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); font-size: 28px; z-index: 2; }
.nav-arrow.left { left: 10px; } .nav-arrow.right { right: 10px; }

.sheet { position: relative; width: min(480px, 100%); display: grid; gap: 12px; padding: 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.sheet h2 { font-size: 20px; }
.sheet input:not([type=file]), .sheet select {
  height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit;
}
.drop {
  position: relative; display: grid; place-items: center; gap: 8px; min-height: 150px; padding: 16px; text-align: center;
  border: 2px dashed var(--line); border-radius: 12px; color: var(--muted); cursor: pointer;
}
.drop.over { border-color: var(--red); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#dropPreview img, #dropPreview video { max-height: 160px; border-radius: 8px; }
.brand-preview img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; object-position: 50% 58%; border: 3px solid var(--red); }
.primary { height: 46px; border-radius: 10px; background: var(--red); font-weight: 700; }
.primary:disabled { opacity: .6; }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s; }

.profile { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 24px 18px; }
.profile img { width: 100%; max-width: 260px; aspect-ratio: 3/4; border-radius: 14px; object-fit: cover; object-position: 50% 58%; border: 3px solid var(--red); }
.profile b { font-size: 22px; margin-top: 6px; }
.profile p { color: var(--muted); font-size: 14px; line-height: 1.45; }
.x-btn { width: 100%; padding: 11px; border-radius: 10px; background: #fff; color: #000; font-weight: 700; font-size: 15px; }
.x-btn.red { background: var(--red); color: #fff; }
.empty-card {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 12px;
  background: var(--panel); border: 1px dashed var(--line); color: var(--muted);
}
.empty-card img { width: 90px; height: 90px; flex: none; border-radius: 12px; object-fit: cover; object-position: 50% 58%; }
.empty-card button { margin-left: auto; padding: 10px 16px; border-radius: 10px; background: var(--red); color: #fff; font-weight: 600; white-space: nowrap; }
.masonry:has(.empty-card) { columns: auto; }
.short.brand-short img { object-position: 50% 58%; }

/* Client photo spots */
.list-banner {
  display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 16px 20px; border-radius: var(--radius);
  background: linear-gradient(90deg, #3a0f12, var(--panel)); border: 1px solid var(--line);
}
.list-banner img { width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 58%; border: 3px solid var(--red); }
.list-banner b { font-size: 20px; }
.list-banner p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.watermark {
  position: absolute; top: 12px; left: 12px; z-index: 2; width: 54px; height: 54px; border-radius: 50%;
  object-fit: cover; object-position: 50% 58%; border: 2px solid rgba(255,255,255,.7); opacity: .9; pointer-events: none;
}
.float-badge {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 68px; height: 68px; border-radius: 50%; padding: 3px;
  background: conic-gradient(var(--red), #ff9b3b, var(--red)); box-shadow: 0 8px 28px rgba(0,0,0,.55);
  animation: pulse 2.4s ease-in-out infinite;
}
.float-badge img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 58%; border: 3px solid var(--bg); }
@keyframes pulse { 50% { transform: scale(1.07); } }
@media (max-width: 640px) { .float-badge { width: 56px; height: 56px; right: 14px; bottom: 14px; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 60; padding: 12px 20px; border-radius: 10px;
  background: #fff; color: #111; font-weight: 600; transition: transform .3s;
}
.toast.show { transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 1280px) {
  .top-grid, .main-grid { grid-template-columns: 1fr; }
  .shorts-row { grid-template-columns: repeat(6, 1fr); height: 240px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .brand { min-width: 0; font-size: 20px; }
  .sidebar { transform: translateX(-100%); box-shadow: 10px 0 40px rgba(0,0,0,.6); }
  .sidebar.open { transform: none; }
  .content { margin-left: 0; padding: 8px 16px 40px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shorts-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .topbar { gap: 10px; padding: 0 12px; height: 64px; }
  .sidebar { top: 64px; }
  .brand span:last-child { display: none; }
  .search { height: 40px; padding: 0 12px; }
  .upload-btn { padding: 0 12px; } .upload-btn span { display: none; }
  .avatar { display: none; }
  .hero { height: 440px; }
  .slide .portrait { right: 50%; top: 22px; transform: translateX(50%); height: 52%; }
  .slide::after { background: linear-gradient(transparent 30%, rgba(8,8,12,.92) 70%); }
  .slide-text { left: 20px; right: 20px; top: auto; bottom: 40px; transform: none; max-width: none; }
  .slide-text p { font-size: 14px; }
  .hero-arrow { display: none; }
  .row-head h2 { font-size: 20px; }
  .row-head { flex-wrap: wrap; }
  .cards.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masonry { columns: 2 140px; }
}

/* ===== Hacker / cyber-security theme ===== */
:root {
  --bg: #020604;
  --panel: #06110a;
  --panel-2: #0b1c11;
  --line: #12351f;
  --text: #d7ffe4;
  --muted: #5fae7c;
  --red: #00e05a;
  --red-2: #00702d;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
html, body { font-family: var(--mono); }
body::after {
  content: ''; position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
}
#matrix { position: fixed; inset: 0; z-index: 0; opacity: .13; pointer-events: none; }
.topbar, .sidebar { z-index: 20; }
.content { position: relative; z-index: 1; }
.topbar { background: rgba(2,6,4,.88); border-bottom: 1px solid var(--line); }
.sidebar { background: rgba(2,6,4,.92); border-right: 1px solid var(--line); }
.logo-mark { background: transparent; border: 1px solid var(--red); color: var(--red); font-weight: 800; box-shadow: 0 0 12px rgba(0,224,90,.4); }
.brand { color: var(--red); text-shadow: 0 0 10px rgba(0,224,90,.6); }
.upload-btn, .btn.red, .primary, .sub, .side-card button, .empty-card button, .tag, .x-btn.red, .tabs button.on {
  background: var(--red); color: #001a09;
}
.nav.active { background: linear-gradient(90deg, rgba(0,224,90,.28), transparent); border-left: 3px solid var(--red); color: var(--red); }
.panel, .hero, .list-banner, .empty-card, .sheet, .viewer { box-shadow: 0 0 0 1px var(--line), 0 0 30px rgba(0,224,90,.06); }
.row-head h2, .panel h3, .profile b { color: var(--red); text-shadow: 0 0 8px rgba(0,224,90,.45); }
.row-head h2::before { content: '> '; opacity: .7; }
.slide::after { background: linear-gradient(90deg, rgba(1,8,3,.92), rgba(1,8,3,.45) 55%, transparent); }
.slide.brand .bg { filter: blur(26px) brightness(.45) hue-rotate(60deg) saturate(.6); }
.slide-text h1 { color: var(--red); text-shadow: 0 0 18px rgba(0,224,90,.55); }
.profile img, .side-card img, .list-banner img, .brand-preview img { border-color: var(--red); box-shadow: 0 0 18px rgba(0,224,90,.45); }
.float-badge { background: conic-gradient(var(--red), #0a3, var(--red)); }
.hero-dots button.on { background: var(--red); }

/* Loader */
#loader { background: radial-gradient(circle at 50% 35%, #03210f, #000 70%); gap: 16px; padding: 20px; }
.loader-ring { background: conic-gradient(var(--red), transparent 60%, var(--red)); width: 150px; height: 150px; overflow: hidden; }
.loader-ring img { filter: grayscale(.5) sepia(.4) hue-rotate(70deg) saturate(1.6) contrast(1.1); }
.loader-ring .scan {
  position: absolute; left: 6px; right: 6px; height: 3px; top: 10%; border-radius: 2px;
  background: var(--red); box-shadow: 0 0 14px 4px rgba(0,224,90,.7); animation: scan 1.6s ease-in-out infinite alternate;
}
@keyframes scan { to { top: 88%; } }
.terminal {
  width: min(520px, 92vw); min-height: 132px; margin: 0; padding: 12px 14px; border-radius: 8px;
  background: rgba(0,20,8,.75); border: 1px solid var(--line); color: var(--red);
  font: 13px/1.6 var(--mono); white-space: pre-wrap; text-align: left;
}
.terminal::after { content: '█'; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.watching {
  font-size: clamp(22px, 5.4vw, 46px); font-weight: 800; letter-spacing: .06em; text-align: center;
  color: #ff2b3b; text-shadow: 0 0 16px rgba(255,43,59,.7); opacity: 0; transition: opacity .4s;
}
.watching.on { opacity: 1; }
.loader-bar i { background: var(--red); }

/* Glitch text */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.glitch::before { color: #ff2b3b; transform: translate(-2px, 0); clip-path: inset(0 0 60% 0); animation: glitch 2.6s infinite steps(2); }
.glitch::after { color: #00c8ff; transform: translate(2px, 0); clip-path: inset(55% 0 0 0); animation: glitch 2.2s infinite reverse steps(2); }
@keyframes glitch {
  0%, 88%, 100% { transform: translate(0); opacity: 0; }
  90% { transform: translate(-3px, 1px); opacity: .9; }
  94% { transform: translate(3px, -1px); opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .glitch::before, .glitch::after, .loader-ring .scan, .float-badge { animation: none; }
  #matrix { display: none; }
}
