/* ==========================================
   VARIÁVEIS & RESET
   ========================================== */
   :root {
    --bg-color: #0a0505;
    --color-vinho: #4a1520;
    --color-rosa: #d4a5a5;
    --color-dourado: #c9a961;
    --color-text: #faf3e7;
    
    --font-title: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--color-text);
    font-family: var(--font-body);
    overflow-x: hidden;
    scroll-behavior: smooth;
  }
  
  h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 400;
  }
  
  .hidden {
    display: none !important;
  }
  
  /* ==========================================
     UTILITÁRIOS & ANIMAÇÕES
     ========================================== */
  .fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
  }
  
  .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  .delay-1 { transition-delay: 0.5s; }
  .delay-2 { transition-delay: 1s; }
  .delay-3 { transition-delay: 1.5s; }
  
  /* ==========================================
     PLAYER DE ÁUDIO
     ========================================== */
  #audio-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(10, 5, 5, 0.6);
    backdrop-filter: blur(5px);
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid rgba(201, 169, 97, 0.2);
    font-size: 0.8rem;
    color: var(--color-dourado);
  }
  
  #audio-player button {
    background: none;
    border: none;
    color: var(--color-dourado);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* ==========================================
     1. TELA DE SENHA
     ========================================== */
  #auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 1s ease;
  }
  
  .auth-content {
    text-align: center;
  }
  
  .auth-content h1 {
    font-size: 2rem;
    font-style: italic;
    color: var(--color-text);
    margin-bottom: 30px;
    letter-spacing: 2px;
  }
  
  #password-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-vinho);
    color: var(--color-text);
    font-size: 1rem;
    text-align: center;
    padding: 10px;
    outline: none;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
  }
  
  #password-input:focus {
    border-bottom-color: var(--color-dourado);
  }
  
  #auth-error {
    color: var(--color-rosa);
    font-size: 0.8rem;
    margin-top: 15px;
  }
  
  /* ==========================================
     2. HERO SECTION
     ========================================== */
  #hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
  }
  
  .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10,5,5,0.4) 0%, rgba(10,5,5,1) 100%);
    z-index: 1;
    pointer-events: none;
  }
  
  /* Ruído/Grain */
  .hero-overlay::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.05;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    pointer-events: none;
  }
  
  .hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
  }
  
  .hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--color-dourado);
    margin-bottom: 10px;
  }
  
  .hero-content .subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-style: italic;
    color: var(--color-rosa);
    margin-bottom: 40px;
  }
  
  .counter {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(250, 243, 231, 0.7);
    margin-bottom: 50px;
  }
  
  #start-story-btn {
    background: transparent;
    border: 1px solid var(--color-dourado);
    color: var(--color-dourado);
    padding: 15px 40px;
    font-family: var(--font-title);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.4s ease;
    letter-spacing: 1px;
  }
  
  #start-story-btn:hover {
    background: var(--color-dourado);
    color: var(--bg-color);
  }
  
  /* ==========================================
     3. STORY MODE
     ========================================== */
  #story-mode {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #000;
    z-index: 9000;
  }
  
  #story-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  
  .story-scene {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  
  .story-scene .bg-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center center;
    opacity: 0.6;
    transform: scale(1.0);
    will-change: transform;
  }
  
  .story-scene p {
    position: relative;
    z-index: 2;
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--color-text);
    max-width: 80%;
    line-height: 1.4;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    opacity: 0; /* Para fade-in via GSAP */
  }
  
  #skip-story {
    position: absolute;
    top: 20px; right: 20px;
    z-index: 9010;
    background: none; border: none;
    color: rgba(255,255,255,0.5);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: color 0.3s ease;
  }
  
  #skip-story:hover { color: #fff; }
  
  .progress-bar-container {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 2px;
    background: rgba(255,255,255,0.1);
    z-index: 9010;
  }
  
  #story-progress {
    height: 100%;
    width: 0%;
    background: var(--color-dourado);
    transition: width 0.3s linear;
  }
  
  /* ==========================================
     4. EUROGARDEN
     ========================================== */
  #eurogarden {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px;
    background-image: linear-gradient(rgba(10, 5, 5, 0.4), rgba(10, 5, 5, 0.4)), url('assets/img/ceu_eurogarden.png');
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    z-index: 1;
  }
  
  #eurogarden::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 20%, var(--bg-color) 90%);
    pointer-events: none;
    z-index: -1;
  }
  
  .eurogarden-content {
    max-width: 600px;
  }
  
  .eurogarden-content p {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--color-dourado);
    line-height: 1.6;
  }
  
  /* ==========================================
     5. TIMELINE
     ========================================== */
  #timeline {
    padding: 100px 20px;
    background: var(--bg-color);
  }
  
  .timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
  }
  
  /* Linha central */
  .timeline-container::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    width: 1px; height: 100%;
    background: rgba(201, 169, 97, 0.2);
    transform: translateX(-50%);
  }
  
  .timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
  }
  
  .timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  .timeline-item.right {
    flex-direction: row-reverse;
  }
  
  .timeline-content {
    width: 45%;
    text-align: right;
  }
  
  .timeline-item.right .timeline-content {
    text-align: left;
  }
  
  .timeline-date {
    font-size: 0.9rem;
    color: var(--color-rosa);
    margin-bottom: 10px;
    letter-spacing: 1px;
  }
  
  .timeline-text {
    font-family: var(--font-title);
    font-size: 1.3rem;
    line-height: 1.4;
  }
  
  .timeline-img {
    width: 45%;
    position: relative;
  }
  
  .timeline-img img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    filter: grayscale(20%) contrast(105%);
    transition: all 0.5s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }
  
  .timeline-item:hover .timeline-img img {
    filter: grayscale(0%) contrast(100%);
    transform: scale(1.02);
  }
  
  /* ==========================================
     6. GALERIA
     ========================================== */
  #galeria {
    padding: 100px 20px;
  }
  
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/5;
  }
  
  .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1), filter 0.5s ease;
    filter: brightness(0.7) contrast(1.1);
  }
  
  .gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1) contrast(1);
  }
  
  /* Lightbox */
  #lightbox {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  
  #lightbox.active {
    opacity: 1;
    pointer-events: auto;
  }
  
  #lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.3s ease;
  }
  
  #lightbox.active #lightbox-img {
    transform: scale(1);
  }
  
  #close-lightbox {
    position: absolute;
    top: 20px; right: 30px;
    background: none; border: none;
    color: #fff; font-size: 2rem;
    cursor: pointer;
  }
  
  /* ==========================================
     7. VÍDEOS FINAIS
     ========================================== */
  #videos-finais {
    padding: 100px 20px;
    background: var(--bg-color);
  }

  .video-section-header {
    text-align: center;
    margin-bottom: 50px;
  }

  .video-section-header h2 {
    font-size: 3rem;
    color: var(--color-dourado);
    margin-bottom: 10px;
  }

  .video-section-header p {
    font-style: italic;
    color: var(--color-rosa);
  }

  .video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .video-item {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(201, 169, 97, 0.2);
    transition: transform 0.3s ease;
  }

  .video-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-dourado);
  }

  .video-item video {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    background: #000;
  }

  .video-caption {
    padding: 15px;
    text-align: center;
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--color-text);
  }
  
  /* ==========================================
     8. SURPRESA
     ========================================== */
  #surpresa {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
  
  #btn-surpresa {
    background: var(--color-vinho);
    border: none;
    color: var(--color-text);
    padding: 15px 40px;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease, background 0.3s;
    letter-spacing: 1px;
  }
  
  #btn-surpresa:hover {
    transform: scale(1.05);
    background: #5c1b29;
  }
  
  #card-surpresa {
    position: absolute;
    z-index: 20;
    background: rgba(74, 21, 32, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 165, 165, 0.2);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    transform: scale(0.8);
    opacity: 0;
    transition: all 1s ease;
  }
  
  #card-surpresa.active {
    transform: scale(1);
    opacity: 1;
  }
  
  #texto-surpresa {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--color-dourado);
  }
  
  /* Partículas / Corações */
  .heart {
    position: absolute;
    bottom: -10vh;
    color: var(--color-vinho);
    font-size: 1.5rem;
    z-index: 1;
    animation: floatUp 5s ease-in infinite;
  }
  
  @keyframes floatUp {
    0% {
      transform: translateY(0) scale(0.5) rotate(0deg);
      opacity: 0;
    }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% {
      transform: translateY(-110vh) scale(1.5) rotate(360deg);
      opacity: 0;
    }
  }
  
  /* ==========================================
     MEDIA QUERIES (Mobile First já ajustado com clamp)
     ========================================== */
  @media (max-width: 768px) {
    .timeline-container::before {
      left: 20px;
    }
    
    .timeline-item, .timeline-item.right {
      flex-direction: column;
      align-items: flex-start;
      padding-left: 50px;
    }
    
    .timeline-content, .timeline-img {
      width: 100%;
      text-align: left !important;
    }
    
    .timeline-img {
      margin-top: 15px;
    }
    
    .gallery-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 480px) {
    .gallery-grid {
      grid-template-columns: 1fr;
    }
  }

  /* ==========================================
     DESKTOP OPTIMIZATIONS (Monitores Grandes)
     ========================================== */
  @media (min-width: 1200px) {
    .hero-content h1 {
      font-size: 6rem;
    }

    .timeline-container {
      max-width: 1000px;
    }

    .gallery-grid {
      grid-template-columns: repeat(4, 1fr);
      max-width: 1400px;
    }

    .typewriter-container {
      max-width: 1000px;
      font-size: 2.5rem;
    }
    
    /* Garante que o conteúdo não fique "infinitamente" largo */
    #scrollable-content > section {
      max-width: 1400px;
      margin-left: auto;
      margin-right: auto;
    }
  }

  /* ==========================================
     ULTRAWIDE OPTIMIZATIONS (2180px+)
     ========================================== */
  @media (min-width: 2000px) {
    body {
      background-color: #000;
    }
    
    #main-content {
      max-width: 1800px;
      margin: 0 auto;
      box-shadow: 0 0 100px rgba(74, 21, 32, 0.2);
      border-left: 1px solid rgba(201, 169, 97, 0.1);
      border-right: 1px solid rgba(201, 169, 97, 0.1);
    }

    #hero-section, #story-mode {
      max-width: 1800px;
      left: 50% !important;
      transform: translateX(-50%);
    }
    
    .gallery-grid {
      grid-template-columns: repeat(5, 1fr);
    }
  }
  
