/* Estilos específicos para a página de visualização do cartão */

/* Layout Principal */
body {
    position: relative;
    min-height: 100vh;
    background: var(--gradient-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-primary);
}

.view-container {
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
}

/* Ajuste do layout do cartão */
.card-preview-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #050505, #000000);
    animation: fadeInUp 0.8s ease-out;
    transition: opacity 0.3s ease;
    z-index: 1;
    -webkit-perspective: 1000px; /* Adiciona perspectiva para transições 3D */
    perspective: 1000px;
}

/* Tela inicial aprimorada */
.initial-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  background: radial-gradient(circle at center, rgba(6, 6, 8, 0.9), rgba(0, 0, 0, 1));
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.initial-screen-container {
  max-width: 500px;
  width: 90%;
  padding: clamp(2rem, 5vw, 3rem);
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(244, 196, 64, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease-out;
  overflow: hidden;
  position: relative;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.initial-screen-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.8;
}

.initial-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.initial-logo {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at center, rgba(244, 196, 64, 0.2), transparent 70%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(244, 196, 64, 0.3);
}

.initial-logo i {
  font-size: 2.5rem;
  color: var(--color-accent);
  filter: drop-shadow(0 0 10px rgba(244, 196, 64, 0.5));
}

.initial-title {
  font-family: var(--font-decorative, 'Crimson Pro', serif);
  font-size: clamp(2rem, 6vw, 2.8rem);
  color: var(--color-light);
  margin: 0 0 1rem;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.initial-button-container {
  margin: 2rem 0;
  width: 100%;
  max-width: 300px;
  position: relative;
  z-index: 5;
  padding: 2px;
  border-radius: 50px;
  background: linear-gradient(45deg, rgba(244, 196, 64, 0.1), rgba(244, 196, 64, 0.4), rgba(244, 196, 64, 0.1));
  box-shadow: 0 0 20px rgba(244, 196, 64, 0.2);
  animation: pulseGlow 3s infinite alternate;
  transition: transform 0.3s ease;
}

.initial-button-container:hover {
  transform: scale(1.03);
}

.button-glow-effect {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 60px;
  background: radial-gradient(ellipse at center, rgba(244, 196, 64, 0.4) 0%, transparent 70%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.5s ease;
  animation: breathe 4s infinite alternate;
}

.initial-button-container:hover .button-glow-effect {
  opacity: 0.8;
}

.initial-button {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #1e1e24, #0c0c10, #1e1e24);
  color: #f4e7c0;
  font-size: clamp(1rem, 3vw, 1.1rem);
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: inset 0 0 10px rgba(244, 196, 64, 0.3);
}

.button-content {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}

.initial-button:hover .button-content {
  transform: scale(1.05);
}

.initial-button i {
  font-size: 1.3rem;
  color: #ffffff;
  filter: drop-shadow(0 0 5px rgba(244, 196, 64, 0.5));
  transition: transform 0.3s ease;
}

.initial-button:hover i {
  color: #f4e7c0;
  filter: drop-shadow(0 0 8px rgba(244, 196, 64, 0.6));
  transform: translateX(-3px);
}

.button-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(244, 196, 64, 0.2),
    rgba(255, 255, 255, 0.2),
    transparent
  );
  z-index: 1;
  transition: 0.5s;
}

.initial-button:hover .button-shine {
  left: 100%;
  transition: 0.7s;
}

.initial-button:active {
  transform: translateY(2px);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.initial-button:active .button-content {
  transform: scale(0.97);
}

/* Animações keyframes */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 15px rgba(244, 196, 64, 0.2); }
  100% { box-shadow: 0 0 25px rgba(244, 196, 64, 0.4); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes borderGlow {
  0% { opacity: 0.1; }
  100% { opacity: 0.3; }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Estados de Tela */
.state-container {
    max-width: 500px;
    width: 90%;
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.state-container h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--color-light);
}

.state-container p {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.state-container.error-state {
    border-top: 4px solid var(--color-error);
}

.state-container .error-icon {
    font-size: 3rem;
    color: var(--color-error);
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.error-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Spinner de carregamento */
.spinner {
    width: 60px;
    height: 60px;
    position: relative;
    margin: 0 auto 1.5rem;
}

.spinner-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(212, 175, 55, 0.1);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    background: linear-gradient(45deg, transparent, rgba(212, 175, 55, 0.1));
}

/* Conteúdo do Cartão */
/* Removed empty hover rule for better performance */

.card-preview-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--color-accent), transparent 50%, var(--color-accent));
    opacity: 0.2;
    z-index: -1;
    animation: borderGlow 4s infinite alternate;
}

.card-preview {
    height: 100%;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #020202, #000000);
}

.preview-theme {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #000000;
}

.preview-sections {
    height: 100%;
    width: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    height: 100vh;
    max-height: 100vh;
    scroll-padding: 0;
    background: #000000;
    -webkit-overflow-scrolling: touch; /* Melhor desempenho para iOS */
    overscroll-behavior: none; /* Evita scroll bounce */
    background: #000000;
}

.preview-sections::-webkit-scrollbar {
    display: none;
}

.preview-section {
    height: 100vh; /* Força a altura exata de 100% da viewport */
    min-height: 100vh;
    max-height: 100vh;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 2rem);
    position: relative;
    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.3);
    transition: background-color 0.6s cubic-bezier(0.19, 1, 0.22, 1), 
                transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), 
                opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden; /* Previne conteúdo ultrapassando os limites */
    will-change: transform, opacity; /* Otimização de desempenho */
    touch-action: none; /* Melhor controle em dispositivos de toque */
}

/* Efeito de transição entre seções */
.section-transition {
    animation: sectionFadeIn 0.6s ease-out forwards;
}

@keyframes sectionFadeIn {
    0% { opacity: 0.7; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

/* Animações para a seção final */
@keyframes heartbeat {
    0% { transform: scale(1) rotate(0deg); }
    15% { transform: scale(1.2) rotate(5deg); }
    30% { transform: scale(1) rotate(0deg); }
    45% { transform: scale(1.2) rotate(-5deg); }
    60% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes heartbeat-intense {
    0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 2px 8px rgba(244, 196, 64, 0.5)); }
    20% { transform: scale(1.4) rotate(10deg); filter: drop-shadow(0 3px 12px rgba(244, 196, 64, 0.9)); }
    40% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 2px 10px rgba(244, 196, 64, 0.7)); }
    60% { transform: scale(1.4) rotate(-10deg); filter: drop-shadow(0 3px 12px rgba(244, 196, 64, 0.9)); }
    80% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 2px 8px rgba(244, 196, 64, 0.5)); }
    100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 2px 8px rgba(244, 196, 64, 0.5)); }
}

.message-decoration i.heartbeat {
    animation: heartbeat 2s infinite;
}

.message-decoration i.heartbeat-intense {
    animation: heartbeat-intense 1.2s 1;
}

.final-message.active {
    opacity: 1;
    transform: translateZ(0); /* Force hardware acceleration to prevent flickering */
    transition: opacity 0.6s ease, transform 0.4s ease;
}

.final-message.active .message-decoration {
    animation: pulseGlow 2s 0.3s ease-out forwards, shimmer 3s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 rgba(244, 196, 64, 0); transform: scale(0.95); }
    50% { box-shadow: 0 0 20px rgba(244, 196, 64, 0.4); transform: scale(1.05); }
    100% { box-shadow: 0 0 12px rgba(244, 196, 64, 0.3); transform: scale(1); }
}

@keyframes shimmer {
    0% { opacity: 0.8; filter: brightness(0.95); }
    50% { opacity: 1; filter: brightness(1.1); }
    100% { opacity: 0.8; filter: brightness(0.95); }
}

/* Estilo unificado para todas as seções */
.preview-section:nth-child(odd),
.preview-section:nth-child(even) {
  background: rgba(18, 18, 20, 0.95);
}

/* Estilização da seção de título */
#titleSection {
  background: rgba(18, 18, 20, 0.95);
}

/* Estilo para a seção de mensagem */
#messageSection {
  background: rgba(18, 18, 20, 0.95);
}

.title-container {
  width: 100%;
  max-width: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.title-wrapper {
  width: 100%;
  max-width: 600px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--border-radius);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(244, 196, 64, 0.15);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.title-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(244, 196, 64, 0.4), transparent);
  opacity: 0.7;
}

.title-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(244, 196, 64, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.card-title {
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 1.2;
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 0 1rem;
  padding: 0;
  font-family: var(--font-decorative, 'Crimson Pro', serif);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 15px rgba(244, 196, 64, 0.3);
  word-break: break-word;
  hyphens: auto;
}

.title-decorators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-top: clamp(0.8rem, 2vw, 1.2rem);
  padding: 0 clamp(0.5rem, 3vw, 2rem);
}

.decorator-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to var(--direction, right),
    transparent,
    rgba(244, 196, 64, 0.6)
  );
}

.decorator-line.left {
  --direction: right;
}

.decorator-line.right {
  --direction: left;
}

.decorator-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(2rem, 8vw, 2.5rem);
  height: clamp(2rem, 8vw, 2.5rem);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(244, 196, 64, 0.3);
  color: var(--color-accent);
  font-size: clamp(0.8rem, 3vw, 1.2rem);
  position: relative;
  box-shadow: 0 0 15px rgba(244, 196, 64, 0.2);
}

.decorator-icon i {
  filter: drop-shadow(0 0 5px rgba(244, 196, 64, 0.5));
}

.title-wrapper:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 
              0 0 20px rgba(244, 196, 64, 0.2);
}

/* Seção de conteúdo */
.section-content {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  min-height: 100%;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform, opacity;
}

/* Message Section Enhancement */
.message-container {
  width: 100%;
  max-width: 85%;
  padding: clamp(2rem, 5vw, 3rem);
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(244, 196, 64, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  justify-content: center; 
  margin: auto;
}

.message-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

#cardMessage {
  font-family: var(--font-primary);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  line-height: 1.9;
  color: var(--color-light);
  margin: 0 auto;
  text-align: left;
  font-weight: 400;
  letter-spacing: 0.01em;
  word-spacing: 0.05em;
  white-space: pre-line;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  position: relative;
}

#cardMessage::first-letter {
  font-size: 2.2em;
  font-weight: 500;
  color: var(--color-accent);
  line-height: 0.8;
  margin-right: 0.1em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  float: left;
  padding-right: 0.1em;
}

#cardMessage p {
  margin-bottom: 1.2rem;
}

#cardMessage p:last-child {
  margin-bottom: 0;
}

.message-container:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 15px rgba(244, 196, 64, 0.1);
}

/* Custom scrollbar for overflow content */
.message-container::-webkit-scrollbar {
  width: 6px;
}

.message-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.message-container::-webkit-scrollbar-thumb {
  background: rgba(244, 196, 64, 0.3);
  border-radius: 10px;
}

/* Verse Section Enhancement */
#verseSection {
  background: rgba(18, 18, 20, 0.95);
}

.verse-container {
  width: 100%;
  max-width: 85%;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--border-radius);
  border: 1px solid rgba(244, 196, 64, 0.15);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  margin: auto;
  backdrop-filter: blur(4px);
}

.verse-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 196, 64, 0.3), transparent);
  opacity: 0.8;
}

.verse-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 196, 64, 0.2), transparent);
  opacity: 0.6;
}

.verse-content {
  position: relative;
  width: 100%;
  text-align: center;
  padding: clamp(0.5rem, 3vw, 1.5rem);
}

.quote-icon {
  color: rgba(244, 196, 64, 0.3);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
  display: inline-block;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
}

#verseText {
  font-family: var(--font-decorative, 'Crimson Pro', serif);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  line-height: 1.6;
  font-weight: 500;
  color: var(--color-light);
  margin: clamp(0.8rem, 3vw, 1.5rem) auto;
  font-style: italic;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  max-width: 90%;
}

#verseRef {
  display: block;
  font-family: var(--font-primary);
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  color: var(--color-accent);
  margin-top: clamp(0.8rem, 2vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  position: relative;
  padding-top: clamp(0.5rem, 1vw, 0.8rem);
}

#verseRef::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(2rem, 15%, 4rem);
  height: 1px;
  background-color: rgba(244, 196, 64, 0.4);
}

.verse-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: clamp(1rem, 3vw, 2rem);
  padding: 0 clamp(1rem, 5%, 2rem);
  gap: clamp(0.8rem, 3vw, 1.5rem);
}

.verse-decoration.bottom {
  margin-top: clamp(1.2rem, 4vw, 2rem);
}

.verse-decoration i {
  color: rgba(244, 196, 64, 0.7);
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.decoration-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(var(--direction, to right), 
                             transparent, 
                             rgba(244, 196, 64, 0.3), 
                             transparent);
}

.decoration-line:first-child {
  --direction: to right;
}

.decoration-line:last-child {
  --direction: to left;
}

.verse-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(244, 196, 64, 0.1);
}

/* Scrollbar for long verses */
.verse-content::-webkit-scrollbar {
  width: 3px;
}

.verse-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.verse-content::-webkit-scrollbar-thumb {
  background: rgba(244, 196, 64, 0.3);
  border-radius: 10px;
}

/* Mensagem Final Enhancement */
.final-message {
  width: 100%;
  max-width: 85%;
  padding: clamp(1.5rem, 5vw, 2.8rem);
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius);
  border: 1px solid rgba(244, 196, 64, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1); /* Smoother, more controlled transition */
  margin: auto;
  backdrop-filter: blur(4px);
  opacity: 0.95; /* Start slightly transparent */
}

.final-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(244, 196, 64, 0.4), transparent);
  opacity: 0.8;
}

.final-message::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(244, 196, 64, 0.05) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

#finalMessage {
  font-family: var(--font-decorative, 'Crimson Pro', serif);
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  color: var(--color-light);
  margin: 0 0 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  text-align: center;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.message-decoration {
  margin: 1rem 0 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(244, 196, 64, 0.1), transparent 70%);
  border: 1px solid rgba(244, 196, 64, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}

.message-decoration i {
  color: rgba(244, 196, 64, 0.8);
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  filter: drop-shadow(0 2px 8px rgba(244, 196, 64, 0.5));
  transition: transform 0.4s ease, color 0.4s ease, filter 0.4s ease;
}

.message-decoration:hover {
  background: radial-gradient(circle at center, rgba(244, 196, 64, 0.15), transparent 80%);
  border-color: rgba(244, 196, 64, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.message-decoration:hover i {
  transform: scale(1.2) rotate(5deg);
  color: var(--color-accent);
  filter: drop-shadow(0 3px 10px rgba(244, 196, 64, 0.6));
}

.card-author {
  font-family: var(--font-primary);
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 0.8rem;
  padding: 0.6rem 1.2rem;
  position: relative;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  border: 1px solid rgba(244, 196, 64, 0.15);
  transition: all 0.3s ease;
}

.card-author:hover {
  background: rgba(244, 196, 64, 0.08);
  border-color: rgba(244, 196, 64, 0.25);
  transform: translateY(-2px);
}

.card-author::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 1px;
  background: rgba(244, 196, 64, 0.3);
}

.final-message:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(244, 196, 64, 0.15);
  border-color: rgba(244, 196, 64, 0.3);
}

/* Gallery Section - Simple & Responsive */
#gallerySection {
  background: rgba(18, 18, 20, 0.95);
}

/* Estilo para a seção final */
#finalSection {
  background: rgba(18, 18, 20, 0.95);
}

.gallery-container {
  width: 100%;
  max-width: 85%;
  aspect-ratio: 16/12;
  position: relative;
  border-radius: var(--border-radius);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-inner {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-inner img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1), transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  transform: scale(1.05);
  will-change: opacity, transform;
}

.gallery-inner img.active {
  opacity: 1;
  z-index: 1;
  transform: scale(1);
}

/* Media Section Enhancement */
#mediaSection {
  background: rgba(18, 18, 20, 0.95);
}

.media-container {
  width: 100%;
  max-width: 85%;
  aspect-ratio: 16/9;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  margin: auto;
  background: rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  min-height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}

.media-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.6;
  z-index: 2;
}

.media-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.95;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity, transform;
}

.media-container:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 20px rgba(244, 196, 64, 0.15);
  border-color: rgba(244, 196, 64, 0.15);
}

.media-container:hover iframe {
  opacity: 1;
  transform: scale(1.01);
}

.media-container.loaded::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  animation: mediaProgress 3s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  will-change: transform, opacity;
}

@keyframes mediaProgress {
  0% { width: 0; opacity: 1; }
  100% { width: 100%; opacity: 0.7; }
}

.youtube-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.youtube-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
}

.youtube-preview:hover::before {
  background: rgba(0, 0, 0, 0.2);
}

.youtube-play-button {
  width: 70px;
  height: 70px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.youtube-play-button i {
  color: var(--color-accent);
  font-size: 24px;
  margin-left: 5px; /* Ajuste para centralizar visualmente */
  filter: drop-shadow(0 0 5px rgba(244, 196, 64, 0.5));
}

.youtube-preview:hover .youtube-play-button {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.7);
  border-color: var(--color-accent);
}

.media-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
}

.media-spinner {
  color: var(--color-accent);
  font-size: 30px;
}

.media-visible {
  animation: mediaPulse 0.8s ease-out;
}

@keyframes mediaProgress {
  0% { width: 0; }
  100% { width: 100%; }
}

@keyframes mediaPulse {
  0% { transform: scale(0.98); opacity: 0.7; filter: brightness(0.9); }
  50% { transform: scale(1.02); opacity: 1; filter: brightness(1.05); }
  100% { transform: scale(1); opacity: 1; filter: brightness(1); }
}

/* Carousel Controls */
.carousel-controls {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
}

.carousel-prev, 
.carousel-next {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.carousel-prev:hover, 
.carousel-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-prev i, 
.carousel-next i {
  font-size: 14px;
  color: var(--color-accent);
}

/* Image Counter */
.image-counter {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-light);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-counter .current {
  color: var(--color-accent);
  font-weight: 600;
  margin: 0 2px;
}

/* Section indicators */
.section-indicators {
  display: flex !important; /* Força a exibição */
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: fixed; /* Fixo na tela */
  bottom: 60px;
  left: 0;
  right: 0;
  z-index: 1000; /* Aumentado para garantir que fique sobre outros elementos */
  padding: 12px 22px;
  background: rgba(0, 0, 0, 0.6);
  width: fit-content;
  margin: 0 auto;
  border-radius: 30px;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(244, 196, 64, 0.08);
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: auto; /* Garante que os cliques funcionem */
  animation: fadeIn 0.8s ease-out;
  visibility: visible !important; /* Força visibilidade */
  opacity: 1 !important; /* Força opacidade */
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-indicators:hover {
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.section-dot {
  width: 22px;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 1.5px;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28); /* Enhanced elastic transition */
  position: relative;
  overflow: hidden; /* Contains the shine effect */
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.1);
}

.section-dot:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: 0.8s cubic-bezier(0.19, 1, 0.22, 1); /* Smoother transition */
}

.section-dot:hover {
  background-color: rgba(244, 196, 64, 0.5);
  transform: scaleX(1.3);
  box-shadow: 0 0 8px rgba(244, 196, 64, 0.4);
}

.section-dot:hover:before {
  left: 100%;
}

.section-dot.active {
  background-color: var(--color-accent);
  transform: scaleX(1.5) scaleY(1.2);
  box-shadow: 0 0 15px rgba(244, 196, 64, 0.7);
  width: 28px;
  transition: all 0.7s cubic-bezier(0.18, 0.89, 0.32, 1.28); /* Enhanced elastic animation */
  animation: glow 1.5s infinite alternate;
}

/* Add glow animation */
@keyframes glow {
  0% { box-shadow: 0 0 8px rgba(244, 196, 64, 0.5); }
  100% { box-shadow: 0 0 18px rgba(244, 196, 64, 0.8); }
}

.section-indicators:hover {
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* Responsividade */
@media (max-width: 768px) {
  .gallery-container {
    max-width: 90%;
    aspect-ratio: 4/4;
  }
  
  .media-container {
    max-width: 90%;
    aspect-ratio: 16/13; /* Aumentado para telas médias */
    min-height: 260px;
  }
  
  .verse-container {
    max-width: 90%;
    padding: clamp(1.2rem, 4vw, 2rem);
  }
  
  #verseText {
    font-size: clamp(1.1rem, 3.5vw, 1.6rem);
    line-height: 1.5;
  }
    /* Ajustes para os indicadores de seção em formato de traço */  .section-indicators {
    display: flex !important;
    position: fixed !important;
    bottom: 80px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1001 !important;
    padding: 10px 18px !important;
    gap: 0.8rem !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(244, 196, 64, 0.3) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6) !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    min-width: fit-content !important;
    margin: 0 !important;
    border-radius: 25px !important;
  }
  
  .section-dot {
    width: 18px;
    height: 3px;
  }
  
  .section-dot.active {
    width: 24px;
  }
  
  .message-container {
    max-width: 90%;
    padding: clamp(1.5rem, 4vw, 2.5rem);
  }
 
  #cardMessage {
    font-size: clamp(1.05rem, 2.8vw, 1.25rem);
    line-height: 1.8;
  }
  
  /* Melhorias para os indicadores de seção em telas menores */
  .section-indicators {
    bottom: 10px;
    padding: 6px;
    gap: 0.6rem;
  }
  
  .section-dot {
    width: 10px;
    height: 10px;
  }
  
  /* Ajustes para seções em tela cheia em telas menores */
  .preview-section {
    padding: clamp(0.8rem, 3vw, 1.5rem);
  }
}

@media (max-width: 480px) {
  .gallery-container {
    max-width: 95%;
    aspect-ratio: 1/1.2;
  }
  
  .media-container {
    max-width: 95%;
    aspect-ratio: 16/15; /* Ainda mais alto em telas pequenas */
    min-height: 220px;
  }
  
  .section-content {
    padding: clamp(0.5rem, 2vw, 1rem);
  }
    /* Ajustes para os indicadores de seção em formato de traço */  .section-indicators {
    display: flex !important;
    position: fixed !important;
    bottom: 70px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1002 !important;
    padding: 8px 15px !important;
    gap: 0.7rem !important;
    background: rgba(0, 0, 0, 0.85) !important;
    border: 2px solid rgba(244, 196, 64, 0.4) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7) !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    min-width: fit-content !important;
    margin: 0 !important;
    border-radius: 20px !important;
    backdrop-filter: blur(15px) !important;
  }
  
  .section-dot {
    width: 15px;
    height: 2.5px;
  }
  
  .section-dot.active {
    width: 20px;
  }
  
  .message-container {
    max-width: 95%;
    padding: clamp(1.2rem, 3vw, 1.8rem);
  }
 
  #cardMessage {
    font-size: clamp(1rem, 4vw, 1.2rem);
    line-height: 1.7;
  }
 
  #cardMessage::first-letter {
    font-size: 1.7em;
  }
  
  .title-container {
    padding: 1rem;
  }
  
  .title-wrapper {
    padding: 1.2rem 1rem;
  }
  
  .card-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }
  
  .decorator-icon {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.8rem;
  }
  
  .verse-container {
    max-width: 95%;
    padding: clamp(1rem, 3vw, 1.5rem);
  }
  
  .verse-content {
    padding: 0.5rem 0;
  }
  
  #verseText {
    font-size: clamp(1rem, 4vw, 1.3rem);
    margin: 0.8rem auto;
    max-width: 95%;
  }
  
  .quote-icon {
    font-size: clamp(1.2rem, 4vw, 2rem);
    margin-bottom: 0.5rem;
  }
  
  #verseRef {
    margin-top: 0.7rem;
    padding-top: 0.5rem;
  }
  
  .verse-decoration {
    margin-top: 1rem;
    gap: 0.8rem;
  }
  
  .verse-decoration.bottom {
    margin-top: 1rem;
  }
}

/* Específico para dispositivos móveis nativos - força exibição dos indicadores */
@media screen and (max-width: 768px) and (pointer: coarse) {  .section-indicators {
    display: flex !important;
    position: fixed !important;
    bottom: 90px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 9999 !important;
    padding: 12px 20px !important;
    gap: 1rem !important;
    background: rgba(0, 0, 0, 0.95) !important;
    border: 3px solid rgba(244, 196, 64, 0.6) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9) !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    min-width: fit-content !important;
    margin: 0 !important;
    border-radius: 30px !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
  }
  
  .section-dot {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Forçar visibilidade em todos os dispositivos de toque */
@media (pointer: coarse) {
  .section-indicators {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Para dispositivos muito pequenos */
@media (max-width: 360px) {
  .gallery-container {
    aspect-ratio: 1/1.3;
  }
  
  .verse-container {
    padding: 1rem 0.8rem;
  }
  
  #verseText {
    font-size: 1rem;
    margin: 0.7rem auto;
  }
  
  .quote-icon {
    font-size: 1.2rem;
  }
}

/* Para telas maiores */
@media (min-width: 992px) {
  .gallery-container {
    aspect-ratio: 16/13;
    max-width: 75%; /* Reduzido para melhor responsividade em desktop */
  }
  
  .gallery-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
  }
  
  .gallery-inner img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Mudado de cover para contain para melhor visualização */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.02);
    transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1), 
                transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  }
  
  .gallery-inner img.active {
    transform: translate(-50%, -50%) scale(1);
  }
  
  .media-container {
    max-width: 75%; /* Consistente com gallery-container */
    aspect-ratio: 16/12; /* Mantido como no CSS principal para telas grandes */
    min-height: 350px; /* Maior altura mínima em telas grandes */
  }
}

/* Para telas extra grandes */
@media (min-width: 1200px) {
  .gallery-container {
    max-width: 70%; /* Ainda menor para telas muito grandes */
    aspect-ratio: 16/12; /* Proporção mais elegante */
  }
  
  .gallery-inner {
    border-radius: calc(var(--border-radius) * 1.2);
  }
  
  .gallery-inner img {
    border-radius: calc(var(--border-radius) * 1.2);
  }
  
  .media-container {
    max-width: 70%;
    aspect-ratio: 16/11;
    min-height: 400px;
  }
}

/* Para telas ultra amplas */
@media (min-width: 1440px) {
  .gallery-container {
    max-width: 65%;
    aspect-ratio: 16/11;
  }
  
  .media-container {
    max-width: 65%;
    aspect-ratio: 16/10;
    min-height: 450px;
  }
}

/* Para telas em modo paisagem */
@media (max-height: 500px) and (orientation: landscape) {
  .gallery-container {
    aspect-ratio: 16/10;
    max-height: 70vh;
  }
  
  .media-container {
    max-width: 75%;
    aspect-ratio: 16/10; /* Ajustado para modo paisagem */
    max-height: 65vh;
  }
  
  .section-content {
    padding: 0.5rem;
  }
  
  .message-container {
    padding: 1rem 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
  }
    /* Ajustes para os indicadores de seção em formato de traço */  .section-indicators {
    display: flex !important;
    position: fixed !important;
    bottom: 60px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1003 !important;
    padding: 6px 12px !important;
    gap: 0.6rem !important;
    background: rgba(0, 0, 0, 0.9) !important;
    border: 2px solid rgba(244, 196, 64, 0.5) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8) !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    min-width: fit-content !important;
    margin: 0 !important;
    border-radius: 18px !important;
    backdrop-filter: blur(20px) !important;
  }
  
  .section-dot {
    width: 14px;
    height: 2px;
  }
  
  .section-dot.active {
    width: 18px;
    transform: scaleX(1.2) scaleY(1.2);
  }
  
  #cardMessage {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  #cardMessage::first-letter {
    font-size: 1.5em;
  }
  
  .title-container {
    padding: 0.8rem;
  }
  
  .title-wrapper {
    padding: 0.8rem;
  }
  
  .card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .title-decorators {
    margin-top: 0.5rem;
  }
  
  .verse-container {
    padding: 1rem;
    max-height: 80vh;
  }
  
  .verse-content {
    max-height: calc(80vh - 80px);
    overflow-y: auto;
    padding: 0.3rem 0;
  }
  
  #verseText {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0.5rem auto;
  }
  
  .quote-icon {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }
  
  #verseRef {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding-top: 0.4rem;
  }
  
  .verse-decoration {
    margin-top: 0.8rem;
  }
  
  .verse-decoration.bottom {
    margin-top: 0.8rem;
  }
  
  .verse-decoration i {
    font-size: 0.8rem;
  }
}