:root {
  --primary: #FF0054; /* Rosa ajustado */
  --primary-dark: #D60046;
  --secondary: #F59E0B;
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --text: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: 'Verdana', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: 'Verdana', sans-serif;
  font-weight: 700;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header com fundo rosa e logo centralizada */
.sticky-header {
  position: sticky;
  top: 0;
  background: var(--primary);
  box-shadow: var(--shadow);
  padding: 16px 0;
  z-index: 100;
  color: white;
}

.sticky-header .container {
  display: flex;
  justify-content: center; /* Centralizar conteúdo */
  align-items: center;
  flex-direction: column;
  gap: 16px;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hz-logo {
  font-family: 'Verdana', sans-serif;
  font-weight: 900;
  font-size: 3rem;
  color: white;
  text-shadow: 2px 2px 0px #000; /* Sombra preta dura estilo cartoon */
  line-height: 1;
  position: relative;
  letter-spacing: -2px;
}

.hz-logo::after {
  content: 'G'; /* Simular o G sobrescrito */
  position: absolute;
  top: -5px;
  right: -15px;
  font-size: 0.8rem;
  background: white;
  color: var(--primary);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid white;
}

.folia-text {
  font-family: 'Verdana', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
  margin-left: 8px;
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-width: 800px;
}

.search-bar input {
  padding: 10px 16px;
  border: none;
  border-radius: 24px;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-family: 'Verdana', sans-serif;
}

.search-bar input[type="text"] {
  flex: 1 1 100%; /* Mobile: Full width */
}

.search-bar input[type="date"] {
  flex: 1;
  min-width: 150px;
}

@media (min-width: 768px) {
  .search-bar {
    flex-wrap: nowrap;
  }

  .search-bar input[type="text"] {
    flex: 2;
    width: auto;
  }

  .search-bar input[type="date"] {
    flex: 1;
    max-width: 220px;
  }
}


.search-bar button {
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Filters */
.filters-section {
  margin: 16px 0;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.toggle-filters {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: 100%;
}

/* Active Filters */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-tag button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.filters-content.hidden {
  display: none;
}

.filters-content {
  margin-top: 16px;
}

#filterForm {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  #filterForm {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  #filterForm {
    grid-template-columns: repeat(4, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-group input, .form-group select {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.time-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-disabled {
  background: var(--border);
  color: var(--text-muted);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: not-allowed;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.w-100 {
  width: 100%;
}

/* Cards */
/* Featured Grid - 2 columns on desktop */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.blocks-list {
  margin-top: 24px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.blocks-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .blocks-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blocks-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bloco-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bloco-card:hover {
  transform: translateY(-4px);
}

.card-image {
  height: 160px;
  background-color: #ddd;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}

.badge-destaque {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--secondary);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-content h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  color: var(--text-muted);
  transition: all 0.2s;
}

.share-btn:hover {
  color: var(--primary);
  transform: scale(1.1);
}

/* FAB and Chat Styles Removed */

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--surface);
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh; /* Aumentado para 90vh */
}

.modal-content.large {
  max-width: 800px;
}

#blocoForm {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0; /* Crucial para scroll interno funcionar em flexbox aninhado */
  overflow: hidden;
}

/* Modal Header/Footer fixes */
.modal-header {
  padding: 16px;
  background: var(--primary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0; /* Impede encolhimento */
}

.close-modal {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* Chat Styles Removed */

/* Admin Styles */
.admin-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 16px;
}

.login-card {
  background: var(--surface);
  padding: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.login-card h2 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--primary);
}

.error-msg {
  color: red;
  margin-top: 12px;
  text-align: center;
  font-size: 0.875rem;
}

.admin-header {
  background: var(--primary);
  color: white;
  padding: 16px 0;
  margin-bottom: 24px;
}

.admin-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg);
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
  overflow-y: auto;
  flex: 1; /* Ocupa espaço restante */
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-actions {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  background: var(--surface);
  flex-shrink: 0;
}

.main-footer {
  margin-top: 48px;
  background: var(--surface);
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* Fix para centralização de banners/ads injetados dinamicamente */
div[id^="google_ads_"], 
div[id^="div-gpt-ad"], 
iframe[id^="google_ads_"],
.ad-container,
.banner-center {
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
  text-align: center;
}

/* Garantir que containers injetados no body também centralizem */
body > div[style*="width"]:not(#root):not(.modal) {
  margin-left: auto;
  margin-right: auto;
}
