/* ===== BASE ===== */
:root {
  --cyan: #00f2ff;
  --magenta: #ff00c8;
  --bg: #090d18;
  --surface: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --text: #e8eaf0;
  --text-muted: rgba(255,255,255,0.45);
  --radius: 16px;
}
.green { color: #4ade80; }
.red { color: #f87171; }
* { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0; padding: 0;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(0, 242, 255, 0.13) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 0, 200, 0.13) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 90%, rgba(0, 200, 255, 0.07) 0%, transparent 40%);
  filter: blur(70px);
  pointer-events: none;
}
body > * { position: relative; z-index: 1; }

/* ===== NAVBAR ===== */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 28px; height: 58px;
  background: rgba(9, 13, 24, 0.75);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.navbar-brand {
  font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; font-weight: 700;
  letter-spacing: 0.04em; color: #fff; display: flex; align-items: center; gap: 10px;
}
.navbar-logo { height: 32px; width: auto; object-fit: contain; }
.navbar-actions { display: flex; gap: 10px; align-items: center; }

/* ===== SEARCH BOX ===== */
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap svg { position: absolute; left: 12px; color: var(--text-muted); }
.search-input {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 16px 6px 36px; color: #fff;
  font-family: inherit; font-size: 0.85rem; width: 220px; transition: all 0.2s;
}
.search-input:focus { outline: none; border-color: rgba(0, 242, 255, 0.4); background: rgba(255, 255, 255, 0.08); }

/* ===== BUTTONS ===== */
.btn-pill {
  padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 500;
  cursor: pointer; border: 1px solid var(--border); background: rgba(255,255,255,0.06);
  color: var(--text); transition: all 0.2s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px; font-family: inherit;
}
.btn-pill:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.18); }
.btn-login { background: linear-gradient(135deg, #1a6cf0, #0d4fc0); border-color: transparent; color: #fff !important; }
.btn-login:hover { background: linear-gradient(135deg, #2275ff, #1358d0); }

/* ===== TABS ===== */
.tabs { display: flex; gap: 14px; }
.tab-btn {
  position: relative; padding: 8px 20px; border-radius: 999px; font-size: 0.85rem;
  font-weight: 500; cursor: pointer; background: transparent; border: 1px solid transparent;
  color: var(--text-muted); transition: all 0.25s ease; text-decoration: none;
}
.tab-btn:hover { color: #fff; text-shadow: 0 0 10px rgba(0,242,255,0.4); }
.tab-btn.active {
  background: rgba(255,255,255,0.1); color: #fff;
  box-shadow: 0 0 12px rgba(0,242,255,0.5), 0 0 24px rgba(255,0,200,0.35);
}
.tab-btn.active::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px; padding: 1px;
  background: linear-gradient(135deg, #00f2ff, #ff00c8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* ===== TAB DROPDOWN ===== */
.tab-dropdown { position: relative; }
.tab-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: rgba(14, 18, 32, 0.97); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: 12px; min-width: 150px;
  overflow: hidden; z-index: 200; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.profile-dropdown { left: auto; right: 0; transform: none; min-width: 120px; }
.tab-dropdown-item { padding: 10px 16px; font-size: 0.82rem; cursor: pointer; transition: background 0.15s; color: var(--text); text-decoration: none; display: block; }
.tab-dropdown-item:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ===== CONTENT & TYPOGRAPHY ===== */
.content { padding: 16px 24px 60px; max-width: 1300px; margin: 0 auto; }
.section-group { margin-bottom: 32px; }
.section-title { font-family: 'Inter', sans-serif; font-size: 1.25rem; font-weight: 600; color: #fff; margin: 0 0 16px 2px; }

/* ===== GRIDS FOR HOME DASHBOARD ===== */
.home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.hero-card { grid-row: span 1; min-height: 380px; display: flex; flex-direction: column; }
.side-cards-wrapper { display: flex; flex-direction: column; gap: 16px; height: 100%; }
.nature-mini-card, .music-home-card { flex: 1; min-height: 180px; }

.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.data-specialized-wrapper { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.unlock-library-wrapper { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; height: 320px; }
.unlock-library-wrapper .locked-card { min-height: 150px; }

/* ===== CARDS & NEON BORDERS ===== */
.stream-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.07); cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.stream-card.neon-border::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta), var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: 0.85; z-index: 5;
}
.stream-card:hover { transform: translateY(-3px); box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45); }

/* Common Image/Video container setup */
.card-media { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.card-media img, .cover-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.stream-card:hover .card-media img, .stream-card:hover .cover-media { transform: scale(1.04); }

.card-gradient-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(to top, rgba(9,13,24,0.85) 0%, transparent 55%);
}
.card-bottom-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 16px; z-index: 3; }
.card-bottom-title { font-size: 1rem; font-weight: 600; color: #fff; margin: 0 0 6px; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }

/* Lock Cards */
.locked-card { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.locked-card-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; z-index: 2; text-align: center; }
.lock-icon { font-size: 2rem; filter: drop-shadow(0 0 8px rgba(0,242,255,0.5)); }
.locked-card-title { font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 700; color: #fff; letter-spacing: 0.05em; }
.stat-panel { padding: 16px; min-height: 120px; }

/* Utilities & Fallbacks */
[x-cloak] { display: none !important; }
.live-badge { position: absolute; top: 10px; left: 10px; background: #e0220a; color: #fff; font-size: 0.68rem; font-weight: 700; padding: 4px 8px; border-radius: 6px; display: flex; align-items: center; gap: 5px; z-index: 10; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: livePulse 1.4s infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
.viewers-pill { font-size: 0.75rem; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 5px; }
.viewer-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.watch-btn { background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.15); color: #fff; padding: 6px 16px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; transition: 0.2s; }
.watch-btn:hover { background: rgba(0,242,255,0.12); border-color: rgba(0,242,255,0.4); color: var(--cyan); }

/* Modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.88); display: flex; align-items: center; justify-content: center; z-index: 500; }
.modal-box { width: 100%; max-width: 860px; padding: 20px; background: rgba(12, 16, 28, 0.98); border-radius: 18px; border: 1px solid var(--border); position: relative; box-shadow: 0 24px 80px rgba(0,0,0,0.7); }
.modal-close { position: absolute; top: 14px; right: 16px; background: rgba(255,255,255,0.08); border: none; color: #fff; font-size: 1rem; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.modal-close:hover { background: rgba(255,255,255,0.16); }

/* Responsive Grid Adjustments */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .home-grid { grid-template-columns: 1fr; }
  .data-specialized-wrapper { grid-template-columns: 1fr; }
  .tabs { display: none; } /* Скрываем табы в шапке на мобильном */
  .search-input { width: 140px; }
}
