@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;700&display=swap');

body {
    font-family: 'Playfair Display', serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #e7cdc7;
    color: #333;
}

header {
    color: #8B0000;
    text-align: center;
    padding: 1.5em 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 500;
    color: #8B0000;
}

.heart {
    color: #e74c3c;
}

main {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #e7cdc7;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.gallery {
    margin-bottom: 30px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.image-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message {
    text-align: center;
    font-size: 36px;
    margin-bottom: 30px;
    color: #000000;
    line-height: 38px;
}

.message p {
    margin-bottom: 1em;
}

.holiday-message {
    font-weight: bold;
    color: #8B0000;
    font-size: 1.2em;
}

.history {
    margin-bottom: 30px;
    text-align: center;
}

.history h2, .love-list h2 {
    font-family: 'Playfair Display', serif;
    color: #8B0000;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 2px solid #ffc0cb;
    display: inline-block;
    padding-bottom: 5px;
    font-weight: 500;
}

/* **AJUSTES PARA A LINHA DO TEMPO** */
.timeline {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 40px 0; /* Espaço para a linha e para o conteúdo acima/abaixo */
    margin-top: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 50%; /* Centraliza verticalmente a linha */
    transform: translateY(-50%); /* Ajuste fino */
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ffc0cb; /* Cor da linha */
    z-index: 0;
}

.timeline-item {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 50%; /* Bolinha alinhada ao centro da linha */
    left: 50%;
    transform: translate(-50%, -50%); /* Centraliza a bolinha */
    width: 10px;
    height: 10px;
    background-color: #e74c3c;
    border-radius: 50%;
    z-index: 2;
}

.timeline-item .date {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #e74c3c;
    display: block;
    font-size: 1.1em;
    position: relative; /* Para mover a data */
    top: -30px; /* Move a data para cima da bolinha/linha */
    margin-bottom: -20px; /* Compensa a margem top para não afastar o p */
}

/* Texto da timeline agora em preto */
.timeline-item p {
    font-family: 'Playfair Display', serif;
    color: #000;
    margin-top: 15px; /* Espaço da descrição abaixo da linha */
}

/* **AJUSTES PARA A LISTA COM AS BOLINHAS ABAIXO** */
.love-list h2{
  text-align: center;
  align-items: center;
  justify-content: center;
  display: flex;
}
.love-items .love-item {
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
    padding-left: 20px;
    font-size: 1.05em;
    color: #000;
    position: relative;
    align-items: center;
    align-self: center;
    text-align: center;
}

.love-items .love-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    transform: translateY(-50%);
    transform: translateX(5100%);

    width: 6px;
    height: 6px;
    background-color: #000;
    border-radius: 50%;
}


footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    background-color: #e7cdc7;
    color: #8B0000;
    font-size: 0.9em;
}

/* Estilos para a nova seção de música */
.music-player-section {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 50px;
    padding: 30px 20px;
    background-color: #fce7e3;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.click-heart-message {
    font-size: 1.3em;
    color: #8B0000;
    margin-bottom: 20px;
    font-weight: 500;
}

.music-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 5em;
    color: #e74c3c;
    transition: transform 0.2s ease-in-out;
    padding: 0;
    line-height: 1;
}

.music-button:hover {
    transform: scale(1.1);
}

.music-button:focus {
    outline: none;
}

.music-button .heart-icon {
    display: block;
}

.audio-control-bar {
    display: flex;
    flex-wrap: wrap; /* Permite quebrar em várias linhas se necessário */
    align-items: center;
    justify-content: center; /* Centraliza os itens */
    gap: 15px; /* Aumentado o gap para melhor espaçamento */
    background-color: #ffc0cb;
    padding: 15px 25px; /* Aumentado padding */
    border-radius: 8px; /* Aumentado border-radius */
    margin-top: 20px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease-in-out, height 0.5s ease-in-out;
    pointer-events: none;
    width: 80%; /* Para que a barra não ocupe 100% no desktop */
    max-width: 500px; /* Limite máximo para a largura da barra */
}

.audio-control-bar.show {
    opacity: 1;
    height: auto;
    pointer-events: all;
}

.play-icon, .pause-icon, .rewind-icon { /* Aplicado a todos os ícones */
    font-size: 1.8em; /* Ícones um pouco maiores */
    cursor: pointer;
    color: #8B0000;
}

.pause-icon {
    display: none;
}

.music-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2em;
    color: #8B0000;
    font-weight: 500;
    margin: 0 10px; /* Espaço ao redor do título */
    white-space: nowrap; /* Evita que o título quebre linha */
}

/* Progress bar styles */
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%; /* Ocupa a largura total dentro da barra de controle */
    margin-top: 10px; /* Espaço da barra de progresso para os controles */
    flex-basis: 100%; /* Garante que a barra de progresso ocupe toda a linha */
}

#progressBar {
    -webkit-appearance: none; /* Remove estilos padrão do navegador para Webkit */
    width: 100%;
    height: 8px; /* Altura da barra */
    background: #e74c3c; /* Cor da barra preenchida (será coberta pelo 'track' preenchido) */
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    overflow: hidden; /* Garante que o track preenchido não vaze */
}

#progressBar::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: #f9f9f9; /* Cor do fundo da barra */
    border-radius: 5px;
}

#progressBar::-moz-range-track {
    width: 100%;
    height: 8px;
    background: #f9f9f9;
    border-radius: 5px;
}

#progressBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #8B0000; /* Cor do thumb */
    border-radius: 50%;
    cursor: pointer;
    margin-top: -5px; /* Ajuste para centralizar o thumb na barra */
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    background-clip: content-box;
    border: 5px solid #e74c3c; /* Cor da parte preenchida da barra */
}

#progressBar::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #8B0000;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    border: 5px solid #e74c3c;
}

#currentTime, #durationTime {
    font-family: 'Playfair Display', serif;
    font-size: 0.9em;
    color: #8B0000;
    white-space: nowrap; /* Evita que o tempo quebre linha */
}

.signature-message {
    font-family: 'Playfair Display', serif;
    font-size: 1.2em;
    color: #8B0000;
    margin-top: 30px;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }

    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
        top: 0;
        bottom: 0;
        width: 2px;
        height: 100%;
    }

    .timeline-item {
        margin-bottom: 40px;
        min-width: 80%;
        padding-left: 0;
        text-align: center;
    }

    .timeline-item::before {
        left: 50%;
        transform: translate(-50%, -50%); /* Centraliza a bolinha */
        top: 0; /* Bolinha no topo do item (ajustado para mobile) */
    }

    .timeline-item .date {
        position: static;
        text-align: center;
        margin-top: 10px;
        margin-bottom: 5px;
    }

    .timeline-item p {
        margin-top: 0;
    }

    .love-items {
        flex-direction: column;
        align-items: center; /* Centraliza as colunas da lista no mobile */
        gap: 15px; /* Reduzido o gap aqui para diminuir o espaçamento entre as colunas */
    }

    .love-column {
        max-width: 90%; /* Ocupar mais largura no mobile */
    }

    .love-items ul li {
        text-align: left; /* Mantém o texto alinhado à esquerda para a lista */
    }
   @media (max-width: 768px) {
  .love-items .love-item::before {
    display: none;
  }

}

    .music-button {
        font-size: 4em;
    }

    .audio-control-bar {
        flex-direction: column; /* Coloca os controles em coluna no mobile */
        width: 95%; /* Ocupa mais largura no mobile */
        padding: 15px; /* Ajusta padding */
        gap: 10px; /* Reduz o gap no mobile */
    }

    .music-title {
        margin: 10px 0; /* Espaço vertical no mobile */
    }

    .progress-container {
        margin-top: 15px;
    }
}
