* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primario: #fff;
    --fondo: #ffebf2; 
    --fondo-sobre: #ffe3ed; 
    --solapa-sobre: #ffccd5; 
    --cuerpo-sobre: #ffc1d1; 
    --sombra: rgba(0, 0, 0, 0.2);
    --texto: #003049; 
    --corazon: #ff477e; 
}

body {
    background: var(--fondo);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 100vh; /* DİKKAT: min-height yapıyoruz */
    padding: 20px;
}

h1 {
    font-family: "Marck Script", serif; 
    text-align: center;
    font-size: 60px;
    margin-bottom: 40px;
    color: #444;
}

.contenedor {
    width: 400px;
    max-width: 100%; /* max-width eklendi */
}

.envoltura-sobre {
    position: relative;
    background-color: var(--fondo-sobre);
    box-shadow: 0 0 40px var(--sombra);
    border-radius: 15px;
}

.sobre {
    position: relative;
    width: 100%; /* width: 100% */
    height: 300px;
}

.sobre::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    border-top: 180px solid var(--solapa-sobre);
    border-right: 50% solid transparent;
    border-left: 50% solid transparent;
    transform-origin: top;
    transition: all 0.5s ease-in-out 0.7s;
    border-radius: 10px;
}

.solapa-derecha,
.solapa-izquierda {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--cuerpo-sobre);
    border-radius: 10px;
}

.solapa-derecha {
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.solapa-izquierda {
    clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.carta {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primario);
    text-align: center;
    box-shadow: 0 0 5px var(--sombra);
    padding: 20px;
    border-radius: 10px;
    transition: transform .5s ease-in-out;
}

.contenido {
    font-family: "Gill Sans", Calibri, sans-serif;
    color: var(--texto);
    text-align: left;
    font-size: 14px;
    border: 3px dotted var(--texto);
    padding: 10px;
    height: 100%;
    line-height: 18px;
    cursor: pointer;
    overflow-y: auto;
}

.corazon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background-color: var(--corazon);
    transform: translate(-50%,0) rotate(45deg);
    transition: transform 0.5s ease-in-out 1s;
    z-index: 999;
    cursor: pointer;
}

.corazon::before,
.corazon::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: var(--corazon);
    border-radius: 100%;
}

.corazon:before {
    top: -15px;
}

.corazon:after {
    right: 15px;
}

.abierto .sobre::before {
    transform: rotateX(180deg);
    z-index: 0;
}

.abierto .corazon {
    transform: rotate(90deg);
    transition-delay: 0.4s;
}

.carta.mostrar-carta {
    transform: translateY(-290px);
    transition: transform .5s ease-in-out;
}

.carta.cerrando-carta {
    transform: translateY(-290px);
    transition: transform .5s ease-in-out;
}

.carta.abierta {
    z-index: 10000;
}

.envoltura-sobre.desactivar-sobre .sobre::before {
    pointer-events: none;
}

#playMusicBtn {
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 8px;
    background-color: var(--corazon);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#playMusicBtn:hover {
    background-color: #ff1f5a;
}

/* ----- Mobil Görünüm ----- */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 42px;
        margin-bottom: 30px;
    }

    .sobre {
        height: 250px;
    }

    .contenido {
        font-size: 13px;
        line-height: 16px;
    }

    #playMusicBtn {
        font-size: 15px;
        padding: 8px 16px;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 32px;
    }

    .sobre {
        height: 220px;
    }

    .contenido {
        font-size: 12px;
        line-height: 15px;
    }
}

@media screen and (max-width: 360px) {
    .contenido {
        font-size: 11px;
        line-height: 14px;
    }
}
