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

:root {
  --bg: #040612;
  --bg2: #090C1C;
  --bg3: #0F142D;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.07);
  --blue: #0066FF;
  --blue-light: #38BDF8;
  --cyan: #00F0FF;
  --green: #10B981;
  --text: #F8FAFC;
  --text-muted: #475569;
  --text-dim: #94A3B8;
  --grad: linear-gradient(135deg, #0052D4, #4364F7, #6FB1FC);
  --grad-cyan: linear-gradient(135deg, #00F2FE, #4FACFE);
  --shadow-blue: 0 0 35px rgba(0, 102, 255, 0.35);
  --shadow-cyan: 0 0 30px rgba(0, 240, 255, 0.25);
  --radius: 16px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── BACKGROUND ORBS ── */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  animation: orb-float 10s ease-in-out infinite;
}
.bg-orb.o1 { width: 600px; height: 600px; background: var(--blue); top: -200px; left: -100px; animation-delay: 0s; }
.bg-orb.o2 { width: 500px; height: 500px; background: var(--cyan); bottom: -100px; right: -100px; animation-delay: -3.5s; }
.bg-orb.o3 { width: 350px; height: 350px; background: #3b82f6; top: 40%; left: 35%; animation-delay: -6s; }

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.08); }
}

/* ── NAVBAR ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 75px;
  background: rgba(4, 6, 18, 0.8);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 950; letter-spacing: -0.02em;
  background: var(--grad-cyan); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-decoration: none; cursor: pointer;
}
.nav-logo svg { width: 34px; height: 34px; flex-shrink: 0; filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.4)); }
.nav-links { display: flex; align-items: center; gap: 2.5rem; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: .92rem; font-weight: 550;
  transition: all .25s ease; display: flex; align-items: center; gap: 8px;
}
.nav-links a:hover { color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }
.nav-auth { display: flex; align-items: center; gap: 16px; }

/* Burger (mobile nav) */
#nav-burger {
  display: none; background: var(--glass); border: 1px solid var(--glass-border); color: var(--text);
  width: 40px; height: 40px; border-radius: 10px; align-items: center; justify-content: center; cursor: pointer;
}
#mobile-menu {
  display: none; position: fixed; top: 75px; left: 0; right: 0; z-index: 999;
  background: rgba(4, 6, 18, 0.97); backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border);
  padding: 1.2rem 1.5rem; flex-direction: column; gap: 10px;
  max-height: calc(100vh - 75px); overflow-y: auto;
}
#mobile-menu.open { display: flex; animation: fade-in .2s ease; }
.mobile-menu-link {
  display: flex; align-items: center; gap: 10px; padding: 12px 6px; color: var(--text-dim);
  text-decoration: none; font-weight: 600; font-size: .95rem; border-bottom: 1px solid var(--glass-border);
}
.mobile-menu-link:hover { color: var(--cyan); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 50px;
  font-size: .875rem; font-weight: 600; cursor: pointer; border: none; transition: all .25s ease;
  font-family: 'Inter', sans-serif; text-decoration: none; outline: none;
}
.btn:active { transform: scale(.97); }
.join-btn:active, .filter-btn:active, .card-fav-btn:active { transform: scale(.94); }
.btn-ghost { background: var(--glass); color: var(--text-dim); border: 1px solid var(--glass-border); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 45px rgba(0, 102, 255, 0.6);
  filter: brightness(1.1);
}
.btn-outline { background: transparent; color: var(--blue-light); border: 1px solid var(--blue); }
.btn-outline:hover { background: rgba(0, 102, 255, 0.15); box-shadow: var(--shadow-blue); }
.btn-sm { padding: 8px 16px; font-size: .8rem; }
.btn-danger { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

/* User menu */
#user-menu { position: relative; }
.user-avatar-btn {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 50px;
  cursor: pointer; transition: all .25s;
}
.user-avatar-btn:hover { border-color: var(--cyan); box-shadow: var(--shadow-cyan); }
.avatar-circle {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: .85rem; font-weight: 750; color: #fff; flex-shrink: 0;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.3);
}
.user-avatar-btn .username { font-size: .875rem; font-weight: 600; color: var(--text); }
.dropdown-menu {
  position: absolute; top: calc(100% + 12px); right: 0; min-width: 220px;
  background: var(--bg2); border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  padding: 8px; display: none; z-index: 100;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), var(--shadow-blue);
  backdrop-filter: blur(15px);
}
.dropdown-menu.open { display: block; animation: fade-in .2s cubic-bezier(0.16, 1, 0.3, 1); }
.dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 6px;
  color: var(--text-dim); font-size: .875rem; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.dropdown-item:hover { background: var(--glass); color: var(--cyan); }
.dropdown-item.red { color: #fda4af; }
.dropdown-item.red:hover { background: rgba(244, 63, 94, 0.12); color: #f43f5e; }
.dropdown-divider { height: 1px; background: var(--glass-border); margin: 8px 0; }

/* ── HERO ── */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 110px 2.5rem 60px; position: relative; overflow: hidden;
}
.hero-inner { max-width: 1200px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4.5rem; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 18px;
  background: rgba(0, 240, 255, 0.08); border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 50px; font-size: .8rem; font-weight: 650; color: var(--cyan); margin-bottom: 1.8rem;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}
.hero-badge span { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: pulse-dot 1.8s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px var(--green); } 50% { opacity: .4; transform: scale(0.8); } }
.hero-title {
  font-family: 'Outfit', sans-serif; font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 950; line-height: 1.08; margin-bottom: 1.5rem; letter-spacing: -0.03em;
}
.hero-title .grad-text {
  background: linear-gradient(90deg, #0052D4, #00F2FE, #4364F7, #0052D4);
  background-size: 300% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: grad-shift 6s ease-in-out infinite;
}
@keyframes grad-shift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero-desc { font-size: 1.1rem; color: var(--text-dim); line-height: 1.75; margin-bottom: 2.2rem; max-width: 500px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--glass-border); }
.stat-item .stat-num { font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 850; background: var(--grad-cyan); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-item .stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

/* Hero visual */
.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 20px; position: relative; }
.hero-card {
  width: 100%; max-width: 380px; background: rgba(9, 12, 28, 0.4); border: 1px solid rgba(0, 102, 255, 0.2);
  border-radius: var(--radius); padding: 26px; backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.5), var(--shadow-blue);
  animation: hero-card-float 5s ease-in-out infinite;
}
@keyframes hero-card-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.live-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; flex-shrink: 0; animation: pulse-dot 1.5s infinite; }
.hero-card-title { font-weight: 700; font-size: 1.05rem; font-family: 'Outfit', sans-serif; }
.hero-card-sub { font-size: .8rem; color: var(--cyan); font-weight: 600; margin-left: auto; }
.hero-visualizer { display: flex; align-items: flex-end; gap: 4px; height: 70px; justify-content: center; }
.hero-bar {
  width: 6px; border-radius: 3px; background: var(--grad-cyan);
  animation: hero-bar-bounce var(--dur, .8s) ease-in-out infinite alternate;
}
@keyframes hero-bar-bounce { from { height: var(--min, 10px); } to { height: var(--max, 60px); } }
.hero-track-info { margin-top: 20px; display: flex; align-items: center; gap: 14px; }
.hero-thumb { width: 50px; height: 50px; border-radius: 12px; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; box-shadow: var(--shadow-blue); }
.hero-track-name { font-weight: 600; font-size: .95rem; }
.hero-track-artist { font-size: .8rem; color: var(--text-dim); }

/* ── CHANNELS SECTION ── */
#channels-section { padding: 90px 2.5rem; position: relative; z-index: 1; }
.section-header { max-width: 1200px; margin: 0 auto 3rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.section-title { font-family: 'Outfit', sans-serif; font-size: 2.2rem; font-weight: 900; letter-spacing: -0.02em; }
.section-title span { background: var(--grad-cyan); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.genre-filters { display: flex; gap: 10px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto 2.5rem; }
.filter-btn {
  padding: 10px 22px; border-radius: 50px; border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--text-dim); font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: all .25s ease; display: flex; align-items: center; gap: 8px;
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(0, 102, 255, 0.12); border-color: var(--blue); color: var(--blue-light);
  box-shadow: 0 0 15px rgba(0, 102, 255, 0.2);
}
.channels-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

/* Toolbar: search + sort */
.channels-toolbar { max-width: 1200px; margin: 0 auto 1.4rem; display: flex; gap: 12px; flex-wrap: wrap; }
.channels-search {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 50px; color: var(--text-muted); transition: border-color .2s;
}
.channels-search:focus-within { border-color: var(--blue); }
.channels-search input {
  flex: 1; background: none; border: none; outline: none; color: var(--text);
  font-family: 'Inter', sans-serif; font-size: .88rem;
}
.channels-search input::placeholder { color: var(--text-muted); }
.channels-sort {
  padding: 11px 16px; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 50px; color: var(--text-dim); font-size: .85rem; font-family: 'Inter', sans-serif;
  cursor: pointer; outline: none;
}
.channels-sort:focus { border-color: var(--blue); }

/* Favorite button on card */
.card-fav-btn {
  background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-muted);
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; flex-shrink: 0;
}
.card-fav-btn:hover { color: #fbbf24; border-color: rgba(251,191,36,.4); }
.card-fav-btn.active { color: #fbbf24; border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.12); }
.card-fav-btn.active svg { fill: #fbbf24; }

/* Channel card */
.channel-card {
  background: rgba(9, 12, 28, 0.35); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 26px; cursor: pointer; transition: all .3s cubic-bezier(0.16, 1, 0.3, 1); position: relative; overflow: hidden;
  backdrop-filter: blur(10px);
}
.channel-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-cyan); opacity: 0; transition: opacity .3s;
}
.channel-card:hover {
  border-color: rgba(0, 240, 255, 0.35);
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), var(--shadow-cyan);
}
.channel-card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.card-genre-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 14px; border-radius: 50px; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em;
}
.live-badge {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 50px;
  background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: .72rem; font-weight: 750; color: var(--green);
}
.live-badge span { width: 5px; height: 5px; background: var(--green); border-radius: 50%; animation: pulse-dot 1.5s infinite; }
.card-name { font-family: 'Outfit', sans-serif; font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.01em; }
.card-desc { font-size: .85rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 20px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-listeners { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-dim); }
.join-btn {
  padding: 9px 20px; border-radius: 50px; background: rgba(0, 102, 255, 0.12);
  border: 1px solid rgba(0, 102, 255, 0.35); color: var(--blue-light);
  font-size: .82rem; font-weight: 750; cursor: pointer; transition: all .25s;
}
.join-btn:hover { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-blue); }

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(4, 6, 18, 0.85); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2); border: 1px solid rgba(0, 102, 255, 0.2); border-radius: 20px;
  padding: 2.2rem; width: 92%; max-width: 440px;
  transform: translateY(30px) scale(0.96); transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.75), var(--shadow-blue);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.8rem; }
.modal-title { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 850; letter-spacing: -0.01em; }
.modal-close { background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-dim); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.modal-close:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }
.form-input {
  width: 100%; padding: 13px 18px; background: var(--bg3); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); color: var(--text); font-size: .92rem; font-family: 'Inter', sans-serif;
  transition: all .25s ease; outline: none;
}
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2); }
.form-input::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-check {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  font-size: .9rem; color: var(--text-dim); user-select: none; position: relative;
  padding: 10px 12px; border-radius: 12px; border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease;
}
.form-check:hover { background: rgba(255, 255, 255, 0.03); }
.form-check-input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; cursor: pointer;
}
.form-check-input:focus-visible { outline: none; }
.form-check-box {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  background: var(--bg3); border: 1.5px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  color: transparent; transition: background .25s ease, border-color .25s ease,
    box-shadow .25s ease, transform .15s ease;
}
.form-check-box svg, .form-check-box i {
  stroke-width: 3; transform: scale(0) rotate(-20deg); opacity: 0;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), opacity .15s ease;
}
.form-check-input:checked + .form-check-box {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.15), 0 2px 12px rgba(0, 102, 255, 0.55);
}
.form-check-input:checked + .form-check-box svg,
.form-check-input:checked + .form-check-box i { transform: scale(1) rotate(0); opacity: 1; }
.form-check-input:hover + .form-check-box { border-color: var(--blue-light); }
.form-check-input:checked:hover + .form-check-box { filter: brightness(1.1); }
.form-check-input:focus-visible + .form-check-box { outline: 2px solid var(--cyan); outline-offset: 2px; }
.form-check:has(.form-check-input:checked) { border-color: rgba(0, 102, 255, 0.25); background: rgba(0, 102, 255, 0.06); }
.form-check:active .form-check-box { transform: scale(.88); }
.form-check-label-main { color: var(--text); font-weight: 550; }
.form-check-label-sub { display: block; font-size: .78rem; color: var(--text-muted); margin-top: 1px; }
.form-error { color: #fca5a5; font-size: .82rem; margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.form-success { color: var(--green); font-size: .82rem; margin-top: 8px; }
.modal-footer { margin-top: 1.5rem; text-align: center; font-size: .85rem; color: var(--text-dim); }
.modal-footer a { color: var(--blue-light); cursor: pointer; font-weight: 650; }
.modal-footer a:hover { text-decoration: underline; color: var(--cyan); }
.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: .95rem; border-radius: var(--radius-sm); }

/* Genre select in modal */
.genre-select-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.genre-select-btn {
  padding: 10px 4px; border-radius: 8px; border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--text-dim); font-size: .72rem; font-weight: 650;
  cursor: pointer; text-align: center; transition: all .2s;
}
.genre-select-btn:hover, .genre-select-btn.selected {
  border-color: var(--blue); background: rgba(0, 102, 255, 0.15); color: var(--blue-light);
}

/* ── PROFIL ── */
.profile-avatar-preview {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto; display: flex;
  align-items: center; justify-content: center; font-family: 'Outfit', sans-serif;
  font-size: 1.7rem; font-weight: 850; color: #fff; box-shadow: inset 0 0 14px rgba(255,255,255,.3), var(--shadow-blue);
  transition: background .2s;
}
.avatar-color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.avatar-swatch {
  width: 100%; aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
  transition: all .2s; box-shadow: inset 0 0 6px rgba(255,255,255,.25);
}
.avatar-swatch:hover { transform: scale(1.12); }
.avatar-swatch.selected { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--cyan), inset 0 0 6px rgba(255,255,255,.25); }
textarea.form-input { font-family: 'Inter', sans-serif; }

/* ── GROUPES ── */
.groups-actions-row { display: flex; gap: 10px; margin-bottom: 1.2rem; flex-wrap: wrap; }
.groups-subform { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1.2rem; animation: fade-in .2s ease; }
.groups-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; }
.groups-empty { text-align: center; color: var(--text-muted); font-size: .85rem; padding: 2rem 1rem; }
.group-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 14px 16px; transition: border-color .2s; }
.group-card:hover { border-color: rgba(0, 240, 255, 0.3); }
.group-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.group-card-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .95rem; }
.group-owner-badge { font-size: .68rem; font-weight: 750; color: var(--blue-light); background: rgba(0,102,255,.12); border: 1px solid rgba(0,102,255,.3); padding: 2px 9px; border-radius: 50px; white-space: nowrap; }
.group-card-members { font-size: .8rem; color: var(--text-dim); margin-bottom: 10px; }
.group-card-members code { background: rgba(0,240,255,.1); color: var(--cyan); padding: 1px 7px; border-radius: 5px; letter-spacing: .1em; font-weight: 700; }
.group-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── TOAST ── */
#toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 15px 20px;
  background: var(--bg2); border: 1px solid var(--glass-border); border-radius: 12px;
  min-width: 300px; box-shadow: 0 15px 50px rgba(0, 0, 0, 0.55), var(--shadow-blue);
  animation: toast-in .3s ease; font-size: .9rem;
}
.toast.success { border-color: rgba(16, 185, 129, 0.45); }
.toast.error { border-color: rgba(239, 68, 68, 0.45); }
.toast.info { border-color: rgba(0, 102, 255, 0.45); }

@keyframes toast-in { from { opacity:0; transform:translateX(100%); } to { opacity:1; transform:translateX(0); } }
@keyframes toast-out { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(100%); } }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--glass-border); padding: 2.5rem;
  text-align: center; color: var(--text-muted); font-size: .85rem; position: relative; z-index: 1;
}

/* ── ANIMATIONS ── */
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: slide-up .5s ease forwards; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 5rem 2rem; color: var(--text-muted); grid-column: 1/-1; }
.empty-state h3 { font-size: 1.25rem; font-weight: 700; margin-top: 1.2rem; color: var(--text-dim); }

/* ── CURSEUR PERSONNALISÉ (souris classique, en bleu) ── */
html, body {
  cursor: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M4%202%20L4%2020.5%20L8.6%2016.3%20L11.6%2022.2%20L14.3%2020.9%20L11.3%2015%20L17.2%2015%20Z%22%20fill%3D%22%233B82F6%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%221.3%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E') 2 2, auto;
}
a, button, [role="button"], select, .filter-btn, .genre-btn, .genre-select-btn, .channel-card,
.join-btn, .card-fav-btn, .icon-btn, .ctrl-btn, .avatar-swatch, .group-card, .sidebar-tab,
.modal-close, .form-check, input[type="checkbox"], input[type="range"], .search-btn,
.mobile-menu-link, .dropdown-item, .user-avatar-btn {
  cursor: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M4%202%20L4%2020.5%20L8.6%2016.3%20L11.6%2022.2%20L14.3%2020.9%20L11.3%2015%20L17.2%2015%20Z%22%20fill%3D%22%2338BDF8%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%221.3%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E') 2 2, pointer;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0, 102, 255, 0.4); border-radius: 3px; }

/* ── ACCESSIBILITÉ ── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero-inner { gap: 3rem; }
  .hero-title { font-size: clamp(2.4rem, 5vw, 3.8rem); }
  #channels-section { padding: 70px 1.8rem; }
  #hero { padding: 100px 1.8rem 50px; }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .nav-links { display: none; }
  .nav-auth { display: none; }
  #nav-user-area { display: none !important; }
  #nav-burger { display: flex; }
  #navbar { padding: 0 1.2rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
  .genre-select-grid { grid-template-columns: repeat(3, 1fr); }
  #hero { padding: 100px 1.2rem 50px; }
  #channels-section { padding: 60px 1.2rem; }
  .channels-toolbar { flex-direction: column; }
  .channels-search { min-width: 0; }
  .section-header { margin-bottom: 2rem; }
  .modal { padding: 1.6rem; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .nav-logo { font-size: 1.25rem; }
  .nav-logo svg { width: 28px; height: 28px; }
  .hero-badge { font-size: .72rem; padding: 6px 14px; }
  .hero-title { font-size: clamp(2.1rem, 9vw, 2.6rem); }
  .hero-desc { font-size: .98rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 1.2rem; padding-top: 1.8rem; margin-top: 2.4rem; }
  .stat-item .stat-num { font-size: 1.5rem; }
  .section-title { font-size: 1.7rem; }
  .channels-grid { grid-template-columns: 1fr; gap: 16px; }
  .channel-card { padding: 20px; }
  .genre-select-grid { grid-template-columns: repeat(2, 1fr); }
  .avatar-color-grid { grid-template-columns: repeat(6, 1fr); }
  #toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
  .toast { min-width: 0; width: 100%; }
  .modal { padding: 1.3rem; border-radius: 16px; }
  .modal-title { font-size: 1.25rem; }
}

/* Touch devices: slightly larger tap targets, no hover-only affordances */
@media (hover: none) {
  .btn, .filter-btn, .join-btn, .card-fav-btn, .icon-btn { min-height: 40px; }
  .card-fav-btn { width: 34px; height: 34px; }
}
