:root {
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --card-red: #dc2626;
  --card-black: #1f2937;
  --card-white: #ffffff;
  --card-beige: #fef9e7;
  --accent-red: #dc2626;
  --accent-black: #1f2937;
  --accent-gold: #f59e0b;
  --text: #1f2937;
  --text-soft: #6b7280;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: #35654d;
  /* Gradiente simplificado para melhor performance (reduz tempo de renderização) */
  background-image: linear-gradient(135deg, #35654d 0%, #2d5541 100%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.brand-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-nav {
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 3px;
  background: var(--card-red);
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--card-red);
  color: white;
}

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

  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    flex-direction: column;
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    margin-top: 0.5rem;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    text-align: center;
  }
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-main {
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 1.3rem;
  color: var(--card-red);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--text-soft);
  font-weight: 500;
}

.app {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* MODAL: Escolha de 12 ou 15 pontos (Pop-up inicial) */
.start-modal {
  display: flex;
  z-index: 50; /* Acima de tudo */
}

.start-modal.hidden {
  display: none;
}

.start-modal-content {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 400px;
  animation: modalPop 0.3s ease;
}

.start-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--text);
  line-height: 1.3;
}

.start-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.start-btn {
  flex: 1;
  border-radius: var(--radius-xl);
  border: none;
  padding: 2.5rem 1.5rem;
  font-size: 2.3rem;
  font-weight: 900;
  cursor: pointer;
  color: white;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.start-btn:first-child {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4);
}

.start-btn:last-child {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  box-shadow: 0 10px 25px rgba(31, 41, 55, 0.4);
}

.start-btn:active {
  transform: scale(0.98);
  box-shadow: var(--shadow);
}

.start-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.start-btn:hover::before {
  left: 100%;
}

.start-subtitle {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 500;
}

.hidden {
  display: none;
}

/* BOARD PRINCIPAL */
.board {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Anúncio Principal - Display Responsivo (Topo) */
.ads-wrapper {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  min-height: 100px; /* Altura mínima para evitar layout shift */
  display: flex;
  align-items: center;
  justify-content: center;
}

.ads-placeholder {
  border-radius: var(--radius);
  border: 2px dashed #cbd5e1;
  padding: 1rem;
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  width: 100%;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Anúncio Anchor (Rodapé) - Opcional */
.ads-anchor {
  margin-top: 1rem;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
}

/* Otimização: Evitar layout shift quando anúncios carregam */
.adsbygoogle {
  display: block;
  text-align: center;
}

.scoreboard-simple {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.team-column {
  background: var(--card-white);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.2rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.team-column:first-child {
  border-top: 4px solid var(--card-red);
}

.team-column:last-child {
  border-top: 4px solid var(--card-black);
}

.team-header {
  display: flex;
  justify-content: center;
  align-items: baseline;
  margin-bottom: 0.5rem;
  width: 100%;
}

.team-name-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid #e5e7eb;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.3rem 0.5rem;
  text-align: center;
  width: 100%;
  max-width: 120px;
  transition: all 0.3s ease;
}

.team-name-input:focus {
  outline: none;
  border-color: var(--card-red);
  background: rgba(220, 38, 38, 0.05);
  border-radius: 8px;
}

.team-column:last-child .team-name-input:focus {
  border-color: var(--card-black);
  background: rgba(31, 41, 55, 0.05);
}

.team-label {
  font-size: 0.72rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.score-value {
  font-size: 4rem;
  font-weight: 900;
  text-align: center;
  margin: 1rem 0;
  color: var(--card-black);
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.team-column:first-child .score-value {
  color: var(--card-red);
}

.score-buttons-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.5rem;
}

.score-btn-simple {
  flex: 1;
  border-radius: var(--radius);
  border: none;
  padding: 1.4rem 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  color: white;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-btn-simple[data-add="-1"] {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.score-btn-simple[data-add="1"] {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.score-btn-simple[data-add="3"] {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  box-shadow: 0 4px 15px rgba(31, 41, 55, 0.3);
}

.score-btn-simple:active {
  transform: scale(0.95);
  box-shadow: var(--shadow);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal.open {
  display: flex;
}

/* Modal inicial (12/15) sempre visível até escolher */
.start-modal {
  display: flex;
  z-index: 50;
}

.start-modal.hidden {
  display: none;
}

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

.modal-content {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  max-width: 320px;
  width: 100%;
  margin: 0 1.5rem;
  box-shadow: var(--shadow-xl);
  text-align: center;
  animation: modalPop 0.3s ease;
}

@keyframes modalPop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--card-red);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-content p {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
  transition: all 0.2s ease;
}

.btn-primary:active {
  transform: scale(0.98);
}

.full-width {
  width: 100%;
}

.footer {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  padding: 1rem 1rem 1.5rem;
  font-weight: 500;
}

.footer-seo {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.footer-seo p {
  margin: 0;
}

/* Seção de Introdução */
.intro-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
  margin-top: 1rem;
}

.intro-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--card-red);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.intro-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 1rem;
}

.intro-text:last-child {
  margin-bottom: 0;
}

/* Cards de Navegação */
.nav-cards {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 1.5rem;
  text-align: center;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.nav-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--card-red);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.card-text {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.4;
}

/* Footer Expandido */
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 1rem;
}

.footer-section p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 1);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 400px) {
  .scoreboard-simple {
    grid-template-columns: 1fr;
  }
  
  .start-btn {
    font-size: 1.9rem;
    padding: 2rem 1.2rem;
  }
  
  .score-btn-simple {
    font-size: 1.3rem;
    padding: 1.2rem 0.6rem;
  }
  
  .score-value {
    font-size: 3.5rem;
  }

  .intro-title {
    font-size: 1.5rem;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  color: var(--text-soft);
}

.breadcrumb-list li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--text-soft);
  font-weight: bold;
}

.breadcrumb-list a {
  color: var(--card-red);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.breadcrumb-list a:hover {
  color: var(--card-red);
  text-decoration: underline;
}

.breadcrumb-list li[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* FAQ Section */
.faq-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
  margin-top: 2rem;
}

.faq-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--card-red);
  margin: 0 0 1.5rem;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1rem;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-question {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.faq-answer {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

/* Páginas de Conteúdo */
.content-page {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
}

.page-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--card-red);
  margin: 0 0 2rem;
  line-height: 1.2;
}

.content-section {
  margin-bottom: 2.5rem;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--card-red);
}

.content-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.content-section p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 1rem;
}

.content-section a {
  color: var(--card-red);
  text-decoration: none;
  font-weight: 600;
}

.content-section a:hover {
  text-decoration: underline;
}

.card-hierarchy {
  background: #f8f9fa;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem 0;
}

.hierarchy-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 1rem;
}

.hierarchy-item:last-child {
  border-bottom: none;
}

.numbered-list,
.bullet-list {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.numbered-list li,
.bullet-list li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.strategy-box {
  background: linear-gradient(135deg, #fef9e7 0%, #fff 100%);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem 0;
}

.glossary {
  margin: 1rem 0;
}

.glossary dt {
  font-size: 1.1rem;
  margin-top: 1rem;
  color: var(--card-red);
}

.glossary dt:first-child {
  margin-top: 0;
}

.glossary dd {
  margin: 0.5rem 0 0 1rem;
  line-height: 1.6;
  color: var(--text);
}

/* Vídeos */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.video-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.video-description {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 0;
}

/* Tipos de Truco */
.type-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--card-red);
}

.type-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--card-red);
  margin: 0 0 1rem;
}

.type-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

.type-card h4:first-of-type {
  margin-top: 0;
}

@media (max-width: 600px) {
  .page-title {
    font-size: 1.5rem;
  }

  .content-section h2 {
    font-size: 1.3rem;
  }

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


