/* ==========================================================================
   INÍCIO SECTION - NOVO LAYOUT BASEADO NO INICIO-APP-NOVO.HTML
   Mantendo tema verde e funcionalidades existentes
   ========================================================================== */

/* === CORES GLOBAIS === */
:root {
  --bg-main: #080301; /* === COR DO FUNDO === */
  --bg-card: #260D03; /* === COR DOS CARDS E DO FUNDO === */
  --bg-highlight-gradient: linear-gradient(135deg, #FA0000, #cc3333); /* === GRADIENTE DE DESTAQUE === */
  --accent-green: #FA0000; /* === COR DE DESTAQUE === */
  --text-white: #ffffff;
  --text-light: #e0e0e0;
  --text-muted: #aaaaaa;
}

/* === NOVO LAYOUT INÍCIO === */
.inicio-section-new {
  padding: 100px 20px 120px;
  background-color: var(--bg-main);
  min-height: 100vh;
}

.dashboard-main-new {
  display: flex;
  gap: 30px;
  max-width: 1920px;
  margin: 0 auto;
}

.dashboard-left {
  flex: 1;
  order: 1; /* Conteúdo principal fica à esquerda */
}

/* === CARROSSEL === */
.banner-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 100 / 27;
  border-radius: 16px;
  background-color: #260D03;
  margin-bottom: 20px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: auto;
}

.carousel-track a {
  flex: 0 0 100%;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-indicators {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  background-color: #FFFFFF;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  width: 36px;
  background: linear-gradient(135deg, #FA0000, #cc3333);
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, rgba(250, 0, 0, 0.9), rgba(46, 122, 1, 0.9));
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 20px;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(250, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.carousel-button:hover {
  background: linear-gradient(135deg, rgba(250, 0, 0, 1), rgba(46, 122, 1, 1));
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(250, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

.carousel-button:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-button.prev {
  left: 15px;
}

.carousel-button.next {
  right: 15px;
}

/* === LINKS ÚTEIS === */
.useful-links {
  margin-bottom: 20px;
}

.useful-links h2 {
  font-size: 18px;
  color: var(--text-white);
  margin-bottom: 15px;
  font-weight: 500;
}

.useful-links-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 0;
  width: 100%;
}

.link-box {
  background-color: var(--bg-card);
  padding: 12px 10px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  border: 2px solid #FA0000;
  box-shadow: 0 0 8px rgba(250, 0, 0, 0.3), 0 0 12px rgba(250, 0, 0, 0.15);
}

.link-box i {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-green);
  padding: 5px;
  border-radius: 12px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
}

.link-box.highlight {
  background: linear-gradient(135deg, #FA0000, #cc3333);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(250, 0, 0, 0.4);
}

.link-box.highlight i {
  background-color: rgba(0, 0, 0, 0.15);
  color: #ffffff;
}

.link-box:hover {
  transform: scale(0.95);
  box-shadow: 0 0 12px rgba(250, 0, 0, 0.4), 0 0 20px rgba(250, 0, 0, 0.2);
}

/* === SEÇÕES DE CONTEÚDO === */
.content-section {
  margin-bottom: 20px;
}

.content-section h2 {
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 500;
  color: var(--text-white);
}

/* === SEÇÃO DE JOGOS === */
.games-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  width: 100%;
}

/* Item do grid/flex é o <a>, não o .game-card — evita largura 0 em alguns navegadores */
.inicio-section-new .games-grid > a {
  display: block;
  width: 100%;
  min-width: 0;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

/*
 * Altura só com padding-bottom (360/632): mais estável que aspect-ratio em WebViews / Safari antigos.
 * Sobrescreve sections.css (.game-card { aspect-ratio: 300/350 }) sem depender de aspect-ratio aqui.
 */
.inicio-section-new .games-grid .game-card {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.962025316455696%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  background-color: var(--bg-card);
  aspect-ratio: auto;
}

.inicio-section-new .games-grid .game-card:hover {
  transform: scale(0.95);
}

.inicio-section-new .games-grid .game-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Card do Aviator */
.aviator-card {
  background: linear-gradient(135deg, #FA0000, #cc3333);
  border: 2px solid rgba(250, 0, 0, 0.3);
  box-shadow: 0 8px 32px rgba(250, 0, 0, 0.2);
}

.aviator-card:hover {
  transform: scale(0.95);
  box-shadow: 0 12px 40px rgba(250, 0, 0, 0.3);
  border-color: rgba(250, 0, 0, 0.5);
}

.inicio-section-new .games-grid .game-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 15px 10px 10px;
  border-radius: 0 0 12px 12px;
}

.inicio-section-new .games-grid .game-title {
  color: var(--text-white);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.inicio-section-new .games-grid .game-card:hover .game-img {
  transform: scale(1.05) translateZ(0);
}

.inicio-section-new .games-grid .game-card:hover {
  box-shadow: 0 0 18px rgba(250, 0, 0, 0.35);
}

/* === DESTAQUES === */
.image-grid-horizontal {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  overflow: hidden;
  position: relative;
}

.content-img {
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
  border: 2px solid #FA0000;
  box-shadow: 0 0 8px rgba(250, 0, 0, 0.3), 0 0 12px rgba(250, 0, 0, 0.15);
}

.content-img:hover {
  transform: scale(0.95);
  box-shadow: 0 0 12px rgba(250, 0, 0, 0.4), 0 0 20px rgba(250, 0, 0, 0.2);
}

.carousel-buttons {
  display: flex;
  gap: 10px;
}

.carousel-buttons button {
  background: none;
  border: none;
  color: var(--accent-green);
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
  transition: transform 0.2s ease;
}

.carousel-buttons button:hover {
  transform: scale(1.2);
}

/* === FERRAMENTAS === */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.tools-grid a {
  width: 100%;
}

.tools-grid .content-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 290;
  object-fit: cover;
  border-radius: 12px;
}

/* === SIDEBAR NOTÍCIAS === */
.sidebar-right {
  width: 300px;
  background: #201816;
  padding: 20px;
  border-radius: 16px;
  height: fit-content;
  box-sizing: border-box;
  order: 2; /* Sidebar fica à direita */
}

.sidebar-right h3 {
  font-size: 24px;
  margin-bottom: 15px;
  font-weight: 700;
  color: var(--accent-green);
}

.news-highlight {
  background: linear-gradient(135deg, #080301, #080301);
  border: 1px solid #2a2a3d;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: 0 0 12px rgba(250, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.news-highlight:hover {
  box-shadow: 0 0 16px rgba(250, 0, 0, 0.2);
}

.news-highlight img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.news-highlight h4 {
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--accent-green);
}

.news-highlight p {
  font-size: 13px;
  color: #c2c2d3;
  margin: 0;
}

.news-card {
  display: flex;
  background: #281C1C;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 12px;
  color: #ccc;
  font-size: 13px;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #262636;
  transition: background 0.3s ease, transform 0.2s ease;
}

.news-card:hover {
  background: #281C1C;
  transform: translateY(-2px);
}

.news-card img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.news-text h4 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--accent-green);
}

.news-text p {
  margin: 0;
  font-size: 12px;
  color: #c1c1d1;
}

#destaque {
  background: linear-gradient(135deg, #FA0000, #cc3333);
  color: #fff;
  border: none;
  box-shadow: 0 0 16px rgba(250, 0, 0, 0.4);
  transform: scale(1.0);
  transition: all 0.3s ease;
}

#destaque .news-text h4 {
  color: #fff;
}

#destaque .news-text p {
  color: #e0ffe8;
}

#destaque img {
  border: 2px solid #FA0000;
}

/* === ESTADOS DE LOADING DAS NOTÍCIAS === */
.noticias-loading,
.noticias-error,
.noticias-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.loading-spinner-small,
.error-message-small,
.empty-message-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.loading-spinner-small i {
  font-size: 2rem;
  color: var(--accent-green);
  animation: spin 1s linear infinite;
}

.error-message-small i,
.empty-message-small i {
  font-size: 2rem;
  color: var(--text-muted);
}

.loading-spinner-small p,
.error-message-small p,
.empty-message-small p {
  font-size: 14px;
  margin: 0;
  color: var(--text-muted);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Animação para cards carregados */
.news-highlight.loaded,
.news-card.loaded {
  animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
  .inicio-section-new {
    padding: 50px 12px 120px;
  }

  .dashboard-main-new {
    flex-direction: column;
  }

  .sidebar-right {
    width: 100%;
    margin-bottom: 30px;
    order: 2; /* Sidebar aparece depois no mobile */
    padding: 0 30px;
  }

  .dashboard-left {
    order: 1; /* Conteúdo principal aparece primeiro no mobile */
  }

  .banner-carousel {
    aspect-ratio: unset;
    height: 186px;
  }

  .carousel-track a {
    height: 100%;
  }

  .carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .carousel-button {
    width: 36px;
    height: 36px;
    font-size: 16px;
    box-shadow: 0 3px 10px rgba(250, 0, 0, 0.4);
  }

  .carousel-button.prev {
    left: 8px;
  }

  .carousel-button.next {
    right: 8px;
  }

  .carousel-button:hover {
    transform: translateY(-50%) scale(1.05);
  }

  .useful-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(6, 1fr));
    gap: 10px;
    padding: 0;
  }

  .link-box {
    aspect-ratio: 1 / 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    font-size: 14px;
    border: 2px solid #FA0000;
    box-shadow: 0 0 10px rgba(250, 0, 0, 0.5), 0 0 20px rgba(250, 0, 0, 0.3);
  }

  .link-box span {
    display: none;
  }

  .link-box i {
    background: none;
    padding: 0;
    font-size: 20px;
  }

  .link-box.highlight i {
    background: none;
  }

  .image-grid-horizontal {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
    scrollbar-width: none;
  }

  .image-grid-horizontal::-webkit-scrollbar {
    display: none;
  }

  .image-grid-horizontal a {
    flex: 0 0 45%;
    scroll-snap-align: start;
    display: block;
  }

  .content-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 2px solid #FA0000;
    box-shadow: 0 0 10px rgba(250, 0, 0, 0.5), 0 0 20px rgba(250, 0, 0, 0.3);
  }

  .tools-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .tools-grid a {
    width: 100%;
  }

  .tools-grid .content-img {
    aspect-ratio: unset;
    height: auto;
  }

  .games-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
    scrollbar-width: none;
    gap: 12px;
  }

  .games-grid::-webkit-scrollbar {
    display: none;
  }

  /* flex aplica-se aos <a> (filhos diretos), não ao .game-card */
  .inicio-section-new .games-grid > a {
    flex: 0 0 45%;
    max-width: 45%;
    scroll-snap-align: start;
  }

  .inicio-section-new .games-grid .game-title {
    font-size: 12px;
  }
}


/* Destaques - todos os cards com mesma altura */
#destaquesCarousel .content-img {
  height: 340px;
  object-fit: cover;
  object-position: center top;
}
