/* ===============================
   RESET E CONFIGURAÇÕES GERAIS
   =============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6c5ce7;
  --primary-dark: #5b4bc4;
  --secondary: #00cec9;
  --secondary-dark: #00b5b0;
  --dark: #0f0f1a;
  --darker: #0a0a12;
  --gray: #1e1e2e;
  --gray-light: #2d2d3f;
  --text: #e0e0e0;
  --text-muted: #a0a0b0;
  --success: #00b894;
  --danger: #d63031;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===============================
   SCROLLBAR PERSONALIZADA
   =============================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===============================
   TIPOGRAFIA
   =============================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 1.8rem;
  background: linear-gradient(135deg, #fff, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.3rem;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===============================
   BOTÕES
   =============================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  background: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: var(--darker);
  font-weight: 700;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* ===============================
   HEADER
   =============================== */
.header {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(108, 92, 231, 0.2);
  padding: 0.8rem 0;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
}

.logo-text h1 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===============================
   HERO SECTION
   =============================== */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(108, 92, 231, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 900px;
  padding: 4rem 5%;
  z-index: 1;
}

.hero-content h2 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-btn {
  padding: 14px 32px;
  font-size: 1rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-box {
  text-align: center;
  padding: 1rem;
}

.stat-box span {
  font-size: 2rem;
}

.stat-box h3 {
  font-size: 1rem;
  margin-bottom: 0;
  color: var(--primary);
}

.stat-box p {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

/* ===============================
   MAIN CONTENT
   =============================== */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 5%;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   SECTIONS
   =============================== */
.section {
  margin-bottom: 3rem;
}

.section-title {
  margin-bottom: 1.5rem;
}

.section-title h2 {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===============================
   SÉRIES GRID
   =============================== */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.serie-card {
  background: var(--gray);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.serie-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.serie-img-box {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: var(--darker);
}

.serie-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.serie-card:hover .serie-img {
  transform: scale(1.05);
}

.serie-info {
  padding: 1rem;
}

.serie-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.serie-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.serie-sales {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.btn-assistir {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 8px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}

.btn-assistir:hover {
  background: var(--primary-dark);
}

/* ===============================
   NOTÍCIAS GRID - 1:1 PROPORÇÃO
   =============================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.news-card {
  background: var(--gray);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
}

.news-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.news-image {
  width: 100%;
  height: 55%;
  object-fit: cover;
  background: var(--darker);
}

/* Estilo para imagem padrão */
.news-image[src="default2.png"] {
  object-fit: contain;
  background: var(--darker);
  padding: 20px;
}

.news-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 45%;
  overflow: hidden;
}

.news-title {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.news-date {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-news {
  color: var(--secondary);
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  font-size: 0.7rem;
}

.btn-news:hover {
  color: white;
}

/* ===============================
   SIDEBAR
   =============================== */
.sidebar-box {
  background: var(--gray);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 100px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sidebar-header h3 {
  font-size: 1.2rem;
}

.sidebar-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.badge-categoria {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--darker);
}

.toggle-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.toggle-btn {
  flex: 1;
  padding: 8px 12px;
  background: var(--gray-light);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-btn:hover {
  background: var(--primary);
  color: white;
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.top5-scroll {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.mafia-item {
  display: flex;
  gap: 1rem;
  padding: 0.8rem;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  margin-bottom: 0.8rem;
  transition: var(--transition);
}

.mafia-item:hover {
  background: rgba(108, 92, 231, 0.2);
  transform: translateX(5px);
}

.mafia-img {
  width: 60px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.mafia-info {
  flex: 1;
}

.mafia-info h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.mafia-info p {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.mafia-btn {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  transition: var(--transition);
}

.mafia-btn:hover {
  background: var(--primary-dark);
}

.sidebar-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sidebar-controls .btn {
  flex: 1;
  padding: 8px;
  font-size: 0.8rem;
  justify-content: center;
}

.btn-refresh {
  width: 100%;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.auto-refresh-info {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* ===============================
   CTA FINAL
   =============================== */
.cta-final {
  margin-top: 4rem;
  text-align: center;
}

.cta-box {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.1));
  border-radius: var(--radius);
  padding: 3rem;
  border: 1px solid rgba(108, 92, 231, 0.3);
}

.cta-box h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-box p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===============================
   FOOTER
   =============================== */
.footer {
  text-align: center;
  padding: 2rem;
  background: var(--darker);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 3rem;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-small {
  font-size: 0.7rem;
  margin-top: 0.5rem;
}

/* ===============================
   RESPONSIVIDADE
   =============================== */
@media (max-width: 768px) {
  .hero-content h2 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .series-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .serie-img-box {
    height: 220px;
  }

  .sidebar-box {
    position: static;
  }

  .cta-box {
    padding: 2rem 1rem;
  }

  .cta-box h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .header-container {
    flex-direction: column;
    text-align: center;
  }

  .logo-box {
    flex-direction: column;
  }

  .hero-stats {
    gap: 1rem;
  }

  .stat-box {
    padding: 0.5rem;
  }

  .toggle-buttons {
    gap: 0.3rem;
  }

  .toggle-btn {
    font-size: 0.7rem;
    padding: 6px 8px;
  }
}