:root {
  --bg-color: #050505;
  --bg-gradient: radial-gradient(circle at top, #1a1a2e, #050505);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;

  --accent-netflix: #e50914;
  --accent-prime: #00a8e1;
  --accent-movistar: #02a552;
  --accent-primary: #8b5cf6;

  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(5, 5, 5, 0.5);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(to right, #fff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  min-height: calc(100vh - 80px);
  /* minus navbar */
  display: flex;
  flex-direction: column;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Server Hub */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.server-card {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.server-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.server-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.server-card:hover::before {
  transform: translateX(100%);
}

.server-card.mc:hover .icon-wrapper {
  color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.server-card.nas:hover .icon-wrapper {
  color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.server-card.stream:hover .icon-wrapper {
  color: #8b5cf6;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.icon-wrapper {
  font-size: 3rem;
  padding: 1.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

/* Streaming Search */
.search-header {
  text-align: center;
  margin-bottom: 3rem;
}

.search-bar-wrapper {
  position: relative;
  max-width: 600px;
  margin: 2rem auto 0;
}

.search-bar-wrapper i {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-input {
  width: 100%;
  padding: 1.2rem 1.5rem 1.2rem 4rem;
  font-size: 1.1rem;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.filter-tags {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  color: var(--text-secondary);
}

.filter-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.filter-tag.active {
  background: var(--text-primary);
  color: var(--bg-color);
}

/* Movie Grid */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.movie-card {
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.movie-poster-wrapper {
  position: relative;
  aspect-ratio: 2/3;
  width: 100%;
  overflow: hidden;
}

.movie-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.movie-card:hover .movie-poster {
  transform: scale(1.1);
}

.movie-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateY(10px);
  opacity: 0.9;
  transition: var(--transition);
}

.movie-card:hover .movie-info {
  transform: translateY(0);
  opacity: 1;
}

.movie-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
}

.platform-badge {
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.platform-netflix {
  background: var(--accent-netflix);
  color: white;
}

.platform-prime {
  background: var(--accent-prime);
  color: white;
}

.platform-movistar {
  background: var(--accent-movistar);
  color: white;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
  color: white;
}

.movie-card:hover .play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 2rem;
  }

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

  .container {
    padding: 2rem 1rem;
  }
}

/* Modal & Auth */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  width: 90%;
  max-width: 500px;
  padding: 2.5rem;
  border-radius: 20px;
}

.auth-btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.auth-btn:hover {
  background: #7c3aed;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* Platform Link Buttons */
.platform-links {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 0.8rem;
}

.platform-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  border: 1px solid transparent;
}

.netflix-btn {
  background: #e50914;
}

.netflix-btn:hover {
  background: #b8070f;
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
}

.prime-btn {
  background: #00a8e1;
  color: #fff;
}

.prime-btn:hover {
  background: #008ebf;
  box-shadow: 0 0 15px rgba(0, 168, 225, 0.4);
}

.movistar-btn {
  background: #02a552;
}

.movistar-btn:hover {
  background: #018542;
  box-shadow: 0 0 15px rgba(2, 165, 82, 0.4);
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 768px) {
  .responsive-flex {
    flex-direction: column !important;
    overflow-y: auto !important;
  }

  .responsive-sidebar {
    width: 100% !important;
    max-height: 250px !important;
    flex: none !important;
  }

  .responsive-chat-panel {
    min-height: 50vh !important;
  }

  .responsive-navbar {
    flex-direction: column !important;
    padding: 1rem !important;
    gap: 1rem !important;
  }

  .responsive-nav-links {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 1rem !important;
  }

  .responsive-container {
    padding: 1rem !important;
  }
}