:root {
  --navy: #0A1628;
  --navy-light: #12233A;
  --navy-card: #152A45;
  --gold: #D4AF37;
  --gold-light: #F0D78C;
  --gold-dark: #B8942D;
  --cream: #F8F1E3;
  --text: #E8E0D5;
  --text-muted: #A89F92;
  --teal: #5B9A8B;
  --pink: #C97B9A;
  --orange: #D4A574;
  --purple: #8B7BA8;
  --radius: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center; /* Centraliza a aplicação na tela */
  align-items: flex-start;
  min-height: 100vh;
  /* Dark midnight blue background for the outer desktop canvas */
  background-color: #070d18;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, .serif { font-family: 'Cinzel', serif; }
.playfair { font-family: 'Playfair Display', serif; }


/* Container principal do app mobile */
.app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  position: relative;
  /* Soft blue gradient body with enhanced gold/amber highlights at top & bottom */
  background: linear-gradient(180deg, #152A45 0%, var(--navy) 100%);
  padding: 20px 18px 22px;
    /* Borda dourada sutil em toda a volta */
  border: 2px solid rgba(212, 175, 55, 0.18);
  border-radius: 0 0 10px 10px; /* Curvatura elegante nos cantos inferiores */
    /* Sombra ambiental dourada ultra suave (~90% mais leve que o card ativo) */
  box-shadow: 
    0 8px 24px -4px rgba(212, 175, 55, 0.08),
    0 2px 8px 0 rgba(0, 0, 0, 0.3);
   margin-bottom: 12px;
  background-attachment: fixed;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

/* ===== ONBOARDING ===== */
#onboarding, .onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 40px 22px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(ellipse at top, #152A45 0%, #0A1628 65%);
  z-index: 99999;
  overflow-y: auto;
}

#onboarding.hidden {
  display: none !important;
}

.cycle-option-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 10px;
  font-weight: 500;
}

.radio-option input[type="radio"] {
  accent-color: var(--gold, #d4af37);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.option-fields {
  margin-top: 12px;
  transition: all 0.3s ease-in-out;
}

#regularFields.collapsed {
  display: none;
}




.logo-area { text-align: center; margin-bottom: 28px; }
.logo-circle {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 16px;
  background: transparent;
}

.main-logo-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.4));
}

.logo-area h1 {
  font-size: 26px;
  letter-spacing: 3.5px;
  color: var(--gold-light);
  font-weight: 500;
}

.logo-area .tagline {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
}

.logo-area .subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  max-width: 290px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

.card {
  background: var(--navy-card);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 17px;
  color: var(--gold-light);
  margin-bottom: 6px;
  letter-spacing: 0.8px;
}

.card > p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.6px;
  color: var(--gold);
  margin-bottom: 7px;
  text-transform: uppercase;
}

input[type="date"], input[type="number"], select {
  width: 100%;
  padding: 13px 14px;
  background: var(--navy);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 10px;
  color: var(--cream);
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 14px;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}

.checkbox-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px;
  background: rgba(212, 175, 55, 0.06);
  border-radius: 10px;
  margin: 14px 0;
  border: 1px solid rgba(212, 175, 55, 0.12);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

.checkbox-row label {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--text);
  font-weight: 400;
  line-height: 1.4;
}

.btn {
  display: block;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Cinzel', serif;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--navy);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.32);
}

.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.35);
  margin-top: 10px;
}

.disclaimer {
  font-size: 11px;
  color: #6B6560;
  text-align: center;
  margin-top: 22px;
  line-height: 1.5;
}

/* ===== MAIN APP & HEADER ===== */
#main-app { display: none; }

.top-bar {
  background: linear-gradient(180deg, #152A45 0%, var(--navy) 100%);
  padding: 20px 18px 22px;
  
  /* Borda dourada sutil em toda a volta */
  border: 2px solid rgba(212, 175, 55, 0.18);
  border-radius: 0 0 10px 10px; /* Curvatura elegante nos cantos inferiores */
  
  /* Sombra ambiental dourada ultra suave (~90% mais leve que o card ativo) */
  box-shadow: 
    0 8px 24px -4px rgba(212, 175, 55, 0.08),
    0 2px 8px 0 rgba(0, 0, 0, 0.3);
    
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  position: relative;
}

.header-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.header-logo-img {
  max-width: 160px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.3));
}

.settings-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: var(--gold);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.settings-btn:hover {
  background: var(--gold);
  color: var(--navy);
}

/* Botão de Download posicionado exatamente abaixo da engrenagem */
.settings-btn.install-btn {
  top: 49px; /* Posicionamento vertical com espaçamento ideal */
  right: 5px;
  display: flex; /* Mantém o botão visível no layout */
}

/* Botão de Feedback*/
.settings-btn.feedback-btn {
  top: 5px; /* Posicionamento vertical com espaçamento ideal */
  left: 5px;
  display: flex; /* Mantém o botão visível no layout */
}

/* Botão de calendário */
.settings-btn.lunarcalendar-btn {
  top: 49px; /* Posicionamento vertical com espaçamento ideal */
  left: 5px;
  display: flex; /* Mantém o botão visível no layout */
}

.phase-header { text-align: center; }

.phase-progress-container {
  position: relative;
  margin: 18px 10px 8px;
}



.phase-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.phase-name {
  font-size: 22px;
  color: var(--cream);
  letter-spacing: 0.8px;
  margin-bottom: 3px;
  font-family: 'Cinzel', serif;
}

.phase-day {
  font-size: 13px;
  color: var(--text-muted);
}

.phase-day strong {
  color: var(--gold-light);
  font-size: 16px;
  font-family: 'Cinzel', serif;
}

/* Barra de progresso com o dobro da espessura antiga (12px) */
.phase-colors {
  display: flex;
  height: 12px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Proporções exatas baseadas num ciclo de 30 dias */
.pc-energia { flex: 10; background: #5B9A8B; } /* 10 dias */
.pc-manif   { flex: 5;  background: #C97B9A; } /* 5 dias  */
.pc-pico    { flex: 4;  background: #D4A574; } /* 4 dias  */
.pc-cuidado { flex: 11; background: #8B7BA8; } /* 11 dias */


/* Pin/Marcador da Lua */
.cycle-pin {
  position: absolute;
  top: 50%;
  left: 0%; /* Será controlado dinamicamente via JS */
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: var(--navy);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
  transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 5;
}

.cycle-pin i {
  color: var(--gold-light);
  font-size: 11px;
}

/* ===== ABAS ===== */
.tabs {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(15, 28, 48, 0.6);
  box-sizing: border-box;
  border-radius: 16px;
  margin-top: 15px;
  color: var(--gold);
  margin-bottom: 6px;
  border: 1px solid rgba(212, 175, 55, 0.12);
}

.tab {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  cursor: pointer;
  white-space: nowrap;
  background-color: #0e1a2d;
  color: #c9d6e8;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.75rem;
  transition: all 0.25s ease;
}

.tab:hover {
  background-color: #162740;
  color: #ffffff;
}

.tab.active {
  background-color: var(--gold);
  color: var(--navy);
  font-weight: 600;
  border-color: var(--gold);
}

/* ===== CONTEÚDO ===== */
.content { padding: 18px 14px 48px; }

.section-title {
  font-size: 12px;
  letter-spacing: 1.8px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212,175,55,0.28), transparent);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 18px;
}

.info-box, .summary-card {
  background: var(--navy-card);
  border: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
}
.summary-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
}

/* Estado selecionado com gradiente e brilho (Glow) */
.summary-card.selected {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, var(--navy-card) 100%);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
  transform: translateY(-2px);
}

.card-icons {
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 6px;
  transition: transform 0.2s ease;
}
.summary-card.selected .card-icons {
  transform: scale(1.15);
  color: var(--gold-light);
}

.card-label, .info-box .label {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.card-value, .info-box .value {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.3;
}

.info-box .icon { font-size: 20px; margin-bottom: 5px; }

.detail-card {
  background: var(--navy-card);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 13px;
  padding: 16px;
  margin-bottom: 10px;
}

.detail-card h4 {
  font-size: 13.5px;
  color: var(--gold-light);
  margin-bottom: 7px;
  letter-spacing: 0.4px;
}

.detail-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.14);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  min-width: 320px;
}

th {
  background: rgba(212, 175, 55, 0.11);
  color: var(--gold);
  padding: 11px 8px;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 9.5px;
}

td {
  padding: 10px 8px;
  border-top: 1px solid rgba(212, 175, 55, 0.07);
  color: var(--text);
  vertical-align: top;
}

tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

/* Main card container */
.lunarCalendar-card {
  position: relative;
  background: var(--navy-light);
  border: 1px solid var(--border-gold, rgba(212, 175, 55, 0.3));
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  color: var(--text);
}

.lunar-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}

.table-moon-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  object-fit: contain;
  margin-right: 4px;
}

.lunar-name {
  font-size: 18px;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.lunar-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.45;
}

.tips { list-style: none; }
.tips li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 9px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
}

.tips li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 9px;
  top: 3px;
}

.panel { display: none; }
.panel.active { display: block; }

/* ===== MODAL CONFIGURAÇÕES ===== */
#settingsModal {
  display: none; /* Inicia oculto */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 100000;
}

/* Exibe a modal apenas quando ativa */
#settingsModal.active {
  display: flex;
}

.modal {
  background: var(--navy-light);
  width: 100%;
  max-width: 480px;
  border-radius: 22px 22px 0 0;
  padding: 26px 20px 36px;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
}

#settingsModal.active .modal { transform: translateY(0); }

.modal h3 {
  font-size: 17px;
  color: var(--gold-light);
  margin-bottom: 18px;
  letter-spacing: 0.8px;
}

/* Top close button */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted, #aaa);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

/* Blocos de opção dentro do modal de configurações (mesma linguagem visual do onboarding) */
.option-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.option-block.selected {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

.option-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.option-header input[type="radio"] {
  accent-color: var(--gold);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.option-title strong {
  display: block;
  font-size: 14px;
  color: var(--cream);
}

.option-title small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.collapsible-content {
  margin-top: 12px;
}

.form-group { margin-bottom: 4px; }

.option-description {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.step-item {
  background: var(--navy-card);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 11px;
  padding: 13px 10px;
  text-align: center;
}

.step-num {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 3px;
}

.step-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 3px;
}

.step-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.35;
}

.footer {
  text-align: center;
  padding: 20px 14px;
  font-size: 11px;
  color: #5A554D;
}

.footer em { color: var(--gold); font-style: italic; }

.badge {
  display: inline-block;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(212,175,55,0.12);
  color: var(--gold);
  margin-left: 6px;
  letter-spacing: 0.3px;
}

.hidden { display: none !important; }


/* Layout do Botão de Download abaixo da engrenagem */
.app-header {
  position: relative;
}

/* Modal Overlay com fundo semitransparente (tudo visível atrás, mas bloqueado) */
#pwaInstallModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  padding: 20px;
}

#pwaInstallModal.active {
  display: flex !important;
}

/* Card centralizado do popup de instalação */
.install-card {
  background: var(--navy-light);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 20px;
  padding: 28px 22px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
}

.install-card .install-icon {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.install-card h3 {
  font-size: 18px;
  color: var(--gold-light);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.install-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
}


/* Direct overlay positioning to escape flex layouts */
#pwaInstallModal.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(4px);
  z-index: 999999 !important;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}
/* Base overlay state */
.lunar-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Active overlay state triggered by JS */
.lunar-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}


#pwaInstallModal.modal-overlay.active {
  display: flex !important;
}

/* Feedback Overlay Container */
#feedbackModal.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(4px);
  z-index: 999999 !important;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
  box-sizing: border-box;
}

#feedbackModal.modal-overlay.active {
  display: flex !important;
}

/* Card Container for iframe */
.feedback-card {
  background: var(--navy-light);
  border: 5px solid rgba(212, 175, 55, 0.28);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  height: 85vh;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.feedback-card iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 20px;
}
/* High-Visibility Close Button for Feedback Modal */
.feedback-card .feedback-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy); /* Dark midnight background to contrast white forms */
  border: 1px solid var(--gold); /* Subtle gold ring */
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10; /* Ensures it floats above the iframe content */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.feedback-card .feedback-close-btn:hover {
  background: var(--gold);
  color: var(--navy);
  transform: scale(1);
}

.modal-content {
  position: relative;
  /* Prevent iframe from overflowing rounded corners */
  overflow: hidden; 
}

.modal-content {
  position: relative;
  /* Prevent iframe from overflowing rounded corners */
  overflow: hidden; 
}

.modal-close-btn {
  position: absolute;

  top: 10px;
  left: 15px;
  z-index: 10; /* Ensures it sits ABOVE the iframe */
  font-size: 24px;
  cursor: pointer;
    background: #0A1628;
  border: 2px solid rgba(212, 175, 55, 0.22);
  color: var(--gold);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Full-screen Overlay Backdrop */
.modal-overlay {
 display: none; /* Keeps it hidden until triggered by user  THIS ONE*/
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Modal Content Box */
.modal-card {
  position: relative;
  background: #0A1628;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 32px 20px 20px 20px; /* Top padding (32px) keeps header below the X */
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Close Button Fixed Positioning */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20; /* High z-index so it receives click events */
   background: #0A1628;
  border: 2px solid rgba(212, 175, 55, 0.22);
  color: #D4AF37;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  transform: scale(1.05);
  border-color: var(--gold, #D4AF37);
}

/* Month Navigation Bar Styles */
.lunar-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  margin-bottom: 8px;
}

.lunar-nav-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #FFFFFF;
}

.lunar-nav-btn {
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold, #D4AF37);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s;
}

.lunar-nav-btn:hover {
  background: rgba(212, 175, 55, 0.15);
}

/* Dynamic schedule list */
.lunar-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.lunar-schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
}

.lunar-schedule-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.lunar-schedule-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lunar-schedule-phase {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-light);
}

.lunar-schedule-date {
  font-size: 12px;
  color: var(--text-muted);
}

.lunar-schedule-empty {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 0;
}

/* Botão X centralizado, abaixo de todo o conteúdo do calendário lunar */
.lunar-close-bottom {
  display: block;
  margin: 18px auto 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lunar-close-bottom:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ===== RESPONSIVIDADE FLUIDA PARA COMPUTADOR / MONITOR GRANDE ===== */
@media (min-width: 768px) {
  /* O app passa a ocupar até 95% da largura da janela, limitado a no máximo 1400px */
  .app {
    width: 95vw;
    max-width: 1400px;
    border-radius: 16px;
    margin-top: 20px;
    margin-bottom: 20px;
  }

  /* Os 4 cards do topo se esticam na horizontal */
  .info-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  /* Ajuste no bloco do topo (Logo + Barra de progresso do ciclo) */
  .top-bar {
    padding: 24px 32px;
  }

  /* Os cards de recomendações ocupam a largura total de forma elegante */
  .detail-card {
    padding: 20px 24px;
  }

  .detail-card p {
    font-size: 14px; /* Aumenta levemente a fonte no PC para facilitar a leitura */
    line-height: 1.7;
  }

  /* Centraliza e segura a largura ideal dos modais/popups no PC */
  .modal, .feedback-card, .lunarCalendar-card {
    max-width: 600px;
    margin: 0 auto;
  }
}