* {
    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: 46px;
    font-weight: bold;
    color: #4e4b4c;
    letter-spacing: 2px;
    text-shadow: 0 4px 24px #ffb5cd55;
    margin-bottom: 36px;
    text-align: center;
}

.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;
}

/* Butonlar için */
.evet-hayir-container {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 15px;
    transition: opacity 0.2s;
}

/* Hata mesajı */
.hayir-error {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Marck Script', cursive;
    font-size: 12px;
    color: #262223;
    font-weight: bold;
    letter-spacing: 1px;
    background: #fff4f8;
    border: 2px solid #ffb5cd;
    border-radius: 10px;
    box-shadow: 0 2px 10px #ff477e22;
    opacity: 0;
    transition: opacity 0.3s;
    text-align: center;
    padding: 8px 12px;
    min-width: 140px;
    margin-top: 0;
    margin-bottom: 0;
    animation: hayirBlinkSoft 0.7s linear 0s 3 alternate;
    z-index: 10;
    white-space: nowrap;    /* Tek satırda tutar, taşarsa kayar */
    overflow: hidden;       /* Taşan kısmı gizler */
    text-overflow: ellipsis;/* Gerekirse üç nokta koyar */
}
@keyframes hayirBlinkSoft {
    0% { opacity: 0.2; }
    40% { opacity: 0.9; }
    70% { opacity: 0.15; }
    100% { opacity: 0.9; }
}

.evet-buton {
    display: inline-block;
    padding: 7px 16px;
    background-color: #ff477e;
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 18px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.14);
    transition: background 0.3s ease;
    font-family: 'Marck Script', cursive;
    font-size: 15px;
    margin: 0;
    min-width: 74px;
    border: none;
    cursor: pointer;
}

.evet-buton:hover {
    background-color: #e0386b;
}

/* Responsive: Mobilde de yan yana ve daha küçük */
@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-hayir-container {
      gap: 9px;
    }
    .evet-buton {
      padding: 5px 11px;
      font-size: 13px;
      min-width: 56px;
    }
}

.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;
}

/* 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;
}.heart {
  position: fixed;
  font-size: 2rem;
  animation: heartFloat 2.5s ease-out forwards;
  pointer-events: none;
  z-index: 999;
}

@keyframes heartFloat {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-150px) scale(1.5);
    opacity: 0;
  }
}

