* {
    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;
    height: 100vh;
}

.yanan-baslik {
    animation: yavasYanSondur 2.5s linear infinite;
    font-family: 'Marck Script', cursive;
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(45deg, #ff477e, #ff6b9d, #c9184a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 4px 24px #ffb5cd55;
    margin-bottom: 36px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(255, 71, 126, 0.2));
}

.alt-baslik {
    font-size: 32px;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    color: #b3003c;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.80;
}

@keyframes yavasYanSondur {
    0% { opacity: 1; }
    40% { opacity: 1; }
    60% { opacity: 0.15; }
    100% { opacity: 1; }
}

.contenedor {
    width: 400px;
}

.envoltura-sobre {
    position: relative;
    background-color: var(--fondo-sobre);
    box-shadow: 0 0 40px var(--sombra);
    border-radius: 15px;
}

.sobre {
    position: relative;
    width: 400px;
    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: 200px solid transparent;
    border-left: 200px solid transparent;
    transform-origin: top;
    transition: all 0.5s ease-in-out 0.7s;
    border-radius: 10px;
}

.solapa-derecha {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
    background-color: var(--cuerpo-sobre);
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
}

.solapa-izquierda {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 0 100%, 100% 100%);
    background-color: var(--cuerpo-sobre);
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.carta {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fff0f5, #ffe4e1);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(255, 105, 180, 0.3);
    text-align: center;
    box-shadow: 0 0 5px var(--sombra);
    padding: 20px;
    border-radius: 10px;
    transition: transform .5s ease-in-out;
}

.carta:hover {
    transform: scale(1.02);
}

.contenido {
    font-family: 'Marck Script', cursive;
    font-size: 24px;
    color: #d6336c;
    line-height: 1.6;
    text-align: center;
    border: 3px dotted var(--texto);
    padding: 10px;
    height: 100%;
    cursor: pointer;
    overflow-Y: scroll;
}

strong {
    font-size: 26px;
    color: #c9184a;
}

/* Evet-Hayır kapsayıcıya yükseklik kazandırır, animasyonlu geçiş için */
.evet-hayir-anim-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    min-width: 240px;
    position: relative;
}

/* Tek buton için container */
.evet-hayir-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    transition: opacity 0.2s;
}

.evet-buton {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff477e, #ff6b9d);
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(255, 71, 126, 0.3);
    transition: all 0.3s ease;
    font-family: 'Marck Script', cursive;
    font-size: 18px;
    margin: 0;
    min-width: 200px;
    border: none;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.evet-buton:hover {
    background: linear-gradient(135deg, #e0386b, #ff477e);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 71, 126, 0.5);
}

.evet-buton:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 71, 126, 0.4);
}

/* Responsive: Mobilde de güzel görünüm */
@media screen and (max-width:400px) {
    .contenedor {
        width: 300px;
    }
    .sobre {
        width: 300px;
        height: 250px;
    }
    .sobre::before {
        border-top:150px solid var(--solapa-sobre) ;
        border-right: 150px solid transparent;
        border-left: 150px solid transparent;
    }
    .evet-buton {
      padding: 10px 20px;
      font-size: 16px;
      min-width: 180px;
    }
    .yanan-baslik {
        font-size: 38px;
    }
}

.corazon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background-color: var(--corazon);
    transform: translate(-50%,0) rotate(45deg);
    transition: all 0.5s ease-in-out 1s;
    z-index: 999;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 71, 126, 0.5);
    animation: heartBeat 2s ease-in-out infinite;
}

.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;
}

/* Dinamik sınıflar */
.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;
}

@keyframes heartBeat {
    0% { transform: translate(-50%,0) rotate(45deg) scale(1); }
    14% { transform: translate(-50%,0) rotate(45deg) scale(1.1); }
    28% { transform: translate(-50%,0) rotate(45deg) scale(1); }
    42% { transform: translate(-50%,0) rotate(45deg) scale(1.1); }
    70% { transform: translate(-50%,0) rotate(45deg) scale(1); }
}