:root {
  --negro: #0b0f14;
  --gris-oscuro: #111722;
  --gris-medio: #1b2431;
  --gris-claro: #273144;
  --accent: #34d3ff;
  --accent-strong: #0fa3d5;
  --green: #4ade80;
  --blanco: #f3f6fb;
  --muted: #9aa6b6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Outfit", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: radial-gradient(120% 120% at 10% 20%, rgba(52, 211, 255, 0.07), transparent),
              radial-gradient(80% 80% at 90% 0%, rgba(52, 211, 255, 0.05), transparent),
              var(--negro);
  color: var(--blanco);
  min-height: 100vh;
}

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

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(17, 23, 34, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(52, 211, 255, 0.08);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--negro);
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(52, 211, 255, 0.4);
}

.logo-text {
  font-weight: 700;
  font-size: 1.35rem;
}

.logo-text span {
  color: var(--accent);
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  width: 28px;
  height: 22px;
  justify-content: space-between;
  cursor: pointer;
}

.hamburger-menu span {
  width: 100%;
  height: 3px;
  background: var(--blanco);
  border-radius: 6px;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.65rem 0.95rem;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-weight: 600;
  color: #d6dfeb;
}

.nav-menu a.active,
.nav-menu a:hover {
  background: var(--gris-medio);
  color: var(--accent);
}

.hero {
  max-width: 1200px;
  margin: 2.5rem auto 1.5rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin: 0.35rem 0 0.6rem;
}

.hero-copy h1 span {
  color: var(--accent);
}

.lead {
  color: #c7d3e4;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 620px;
}

.eyebrow {
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.hero-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-tags span {
  background: rgba(52, 211, 255, 0.08);
  border: 1px solid rgba(52, 211, 255, 0.2);
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  color: #d6dfeb;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background: linear-gradient(145deg, #121a27, #0e131d);
  border: 1px solid rgba(52, 211, 255, 0.12);
  border-radius: 18px;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  max-width: 420px;
  z-index: 2;
}

.hero-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.hero-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.hero-card p {
  color: #c7d3e4;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: #c7d3e4;
  font-weight: 600;
}

.hero-meta span {
  background: rgba(52, 211, 255, 0.08);
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
}

.hero-orb {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 255, 0.25), transparent 60%);
  filter: blur(10px);
  right: 20px;
  top: -40px;
  z-index: 1;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.pill-green {
  background: rgba(74, 222, 128, 0.12);
  color: #7ee0a5;
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.pill-dark {
  background: rgba(52, 211, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(52, 211, 255, 0.4);
}

.filters-section {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.filters-panel {
  background: rgba(27, 36, 49, 0.8);
  border: 1px solid rgba(52, 211, 255, 0.08);
  border-radius: 16px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-group label {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.filter-group input,
.filter-group select {
  background: var(--gris-medio);
  border: 1px solid var(--gris-claro);
  border-radius: 12px;
  color: var(--blanco);
  padding: 0.75rem 0.85rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 211, 255, 0.15);
}

.search-group {
  position: relative;
}

.search-group label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-group input {
  padding-left: 2.4rem;
}

.ghost-btn {
  height: 48px;
  background: transparent;
  border: 1px solid rgba(52, 211, 255, 0.35);
  color: var(--accent);
  border-radius: 12px;
  padding: 0 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(52, 211, 255, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.stat-card {
  background: rgba(27, 36, 49, 0.75);
  border: 1px solid rgba(52, 211, 255, 0.12);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.stat-label {
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
}

.catalog-section {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.assigned-section {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
}

.assigned-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.assigned-header h2 {
  margin: 0.2rem 0;
}

.assigned-grid {
  margin-top: 0.75rem;
}

.assigned-search {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.assigned-search label {
  color: var(--muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.assigned-search input {
  background: var(--gris-medio);
  border: 1px solid var(--gris-claro);
  border-radius: 12px;
  color: var(--blanco);
  padding: 0.7rem 0.85rem;
}

.video-card {
  background: linear-gradient(160deg, rgba(27, 36, 49, 0.95), rgba(16, 23, 34, 0.95));
  border: 1px solid rgba(52, 211, 255, 0.1);
  border-radius: 16px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  position: relative;
}

.video-card:hover {
  border-color: rgba(52, 211, 255, 0.4);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-right: 110px;
}

.badge {
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(52, 211, 255, 0.4);
  color: var(--accent);
}

.badge-muted {
  border-color: rgba(154, 166, 182, 0.4);
  color: var(--muted);
}

.video-card h3 {
  font-size: 1.25rem;
}

.video-card p {
  color: #c7d3e4;
  line-height: 1.5;
}

.video-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: #c7d3e4;
  font-weight: 600;
}

.video-meta span {
  background: rgba(52, 211, 255, 0.08);
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.watch-btn,
.secondary-btn {
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.watch-btn {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #0b0f14;
  box-shadow: 0 10px 20px rgba(52, 211, 255, 0.3);
}

.watch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(52, 211, 255, 0.35);
}

.secondary-btn {
  background: rgba(39, 49, 68, 0.8);
  border: 1px solid rgba(52, 211, 255, 0.2);
  color: var(--blanco);
}

.secondary-btn.danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.admin-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 163, 213, 0.2);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(52, 211, 255, 0.3);
}

.empty-state,
.loading-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #c7d3e4;
}

.empty-state.hidden,
.loading-state.hidden,
.hidden {
  display: none !important;
}

.empty-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 0.75rem;
  border-radius: 16px;
  background: rgba(52, 211, 255, 0.08);
  color: var(--accent);
  font-size: 1.6rem;
}

.admin-panel {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 1.25rem;
  border-radius: 16px;
  background: rgba(27, 36, 49, 0.9);
  border: 1px solid rgba(52, 211, 255, 0.12);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-badge {
  background: rgba(52, 211, 255, 0.1);
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 255, 0.2);
  font-weight: 700;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-weight: 700;
  color: #d6dfeb;
}

.field input,
.field textarea,
.field select {
  background: var(--gris-medio);
  border: 1px solid var(--gris-claro);
  border-radius: 12px;
  color: var(--blanco);
  padding: 0.75rem 0.85rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 211, 255, 0.15);
}

.field textarea {
  resize: vertical;
}

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

.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  grid-column: 1 / -1;
}

.cta-button {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #0b0f14;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(52, 211, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(52, 211, 255, 0.35);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  background: #0e131d;
  border: 1px solid rgba(52, 211, 255, 0.25);
  border-radius: 16px;
  padding: 0.75rem;
  width: min(900px, 92vw);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.modal-body iframe,
.modal-body video {
  width: 100%;
  height: 480px;
  border: none;
  border-radius: 12px;
  background: #000;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: rgba(52, 211, 255, 0.12);
  color: var(--blanco);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}

footer {
  background: var(--gris-oscuro);
  padding: 2.2rem 1.25rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(52, 211, 255, 0.08);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-size: 1.6rem;
  font-weight: 700;
}

.footer-logo span {
  color: var(--accent);
}

.footer-text {
  color: #c7d3e4;
  margin: 0.5rem 0 1rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.social-icons a {
  color: var(--blanco);
  font-size: 1.2rem;
}

.social-icons a:hover {
  color: var(--accent);
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .filters-section {
    grid-template-columns: 1fr;
  }

  .filters-panel {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 768px) {
  .hamburger-menu {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    right: -100%;
    top: 70px;
    width: 100%;
    background: #0e131d;
    border-top: 1px solid rgba(52, 211, 255, 0.12);
    transition: right 0.3s ease;
    padding: 1rem;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    margin-top: 1.5rem;
  }

  .filters-panel {
    grid-template-columns: 1fr;
  }

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

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .card-top {
    padding-right: 0;
    flex-wrap: wrap;
  }

  .admin-chip {
    position: relative;
    top: 0;
    right: 0;
    margin-top: 0.35rem;
    align-self: flex-start;
  }

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