@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Mochiy+Pop+P+One&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
	height: 100vh;		
	align-items: center;
	background-color: #90D0DA;
	font-family: 'Mochiy Pop P One', sans-serif;	
}

.contenedor-grid {
	display: grid; /* Habilita Grid */
	grid-template-columns: repeat(2, 1fr); /* 3 columnas de igual tamaño */
	gap: 5px; /* Espacio entre filas y columnas */
}

.columna {
  	/*background-color: #e0e0e0;*/
  	padding: 20px;	
	text-align: center;
}

/* Columna 1 Click Para Abrir */
input#open {
	display: none;
}

.valentines-day-card {
	position: relative;
	width: 300px;
	height:300px;
	transform-style: preserve-3d;
	transform: perspective(2500px);
	transition: .3s;
	/*border: 1px solid #F10004;*/
}

.card-front {
	position: relative;
	background-color: #fff0f3;
	width:  300px;
	height: 300px;
	transform-origin: left;
	box-shadow: inset 100px 20px 100px rgba(0,0,0,.15), 30px 0 50px rgba(0,0,0,0.3);
	transition: .3s;
}

.card-front:before {
	content:"";
	position: absolute;
	width: 280px;
	height: 280px;
	background-color: #FBA858;
	top: 10px;
	left: 10px;
}

.card-inside {
	position: absolute;
	background-color: #fff0f3;
	width: 300px;
	height:300px;
	z-index:-1;
	left:0;
	top:0;
	box-shadow: inset 100px 20px 100px rgba(0,0,0,0.22), 100px 20px 100px rgba(0,0,0,0.1);
}

.open {
	position: absolute;
	width: 300px;
	height:300px;
	left:0;
	top:0;
	background-color: transparent;
	z-index:6;
	cursor: pointer;
}

#open:checked ~ .card-front {
	transform: rotateY(-155deg);
	box-shadow: inset 100px 20px 100px rgba(0,0,0,.13), 30px 0 50px rgba(0,0,0,0.1);
}

#open:checked ~ .card-front:before {
	z-index:5;
	background-color: #fff0f3;
	width:300px;
	height:300px;
	top:0;
	left:0;
	box-shadow: inset 100px 20px 100px rgba(0,0,0,.1), 30px 0 50px rgba(0,0,0,0.1);
}

.note {
	position: relative;
	width: 200px;
	height: 150px;
	background-color: #fff0f3;
	top:75px;
	left:0px;
	color: #333;
	font-size:30px;
	display: flex;
	align-items: center;
	text-align: center;
	filter: drop-shadow(0 0 20px rgba(0,0,0,0.3));
	border-radius: 8px;
}

.note:before, .note:after {
	position: absolute;
	content:"";
	background-color: #ff7c39;
	width: 40px;
	height:40px;
}

.note:before {
	transform: rotate(-45deg);
	top:-20px;
	left:80px;
}

.note:after {
	border-radius:50%;
	top:-35px;
	left:65px;
	box-shadow:30px 0 #ff7c39;
}

.text-one {
	position: absolute;
	color: #333; /* Color de texto de Feliz Cumpleaños */
	font-size: 30px;
	top:30px;
	width:300px;
	text-align: center;
}
.text-one:before, .text-one:after {
	position: absolute;
	left:5px;
	text-align: center;
	width:300px;
}

.text-one:before {
	content:"Cumpleaños!!!";
	top:70px;
	color: #d04e4e;
}

.text-one:after {
	content:"Feliz";
	top:37px;
	color: #d04e4e;
}

.heart {
	position: relative;
	background-color: #F4883F;
	height: 60px;
	width:60px;
	top:180px;
	left:0px;
	transform: rotate(-45deg);
	animation: .8s beat infinite;
}

.heart:before, .heart:after {
	content:"";
	background-color: #F4883F;
	border-radius:50%;
	height: 60px;
	width: 60px;
	position: absolute;
  }

.heart:before {
	top:-30px;
	left:0;
}
  
.heart:after {
	left:30px;
	top:0;
}

.smile {
	position: absolute;
	width:30px;
	height:15px;
	background-color: #333;
	z-index:1;
	border-radius: 0 0 100px 100px;
	top:200px;
	left:135px;
	overflow: hidden;
}

.smile:before {
	content:"";
	position: absolute;
	border-radius:50%;
	width:20px;
	height:20px;
	background-color: #030202;
	top:5px;
	left:5px;
}

.eyes {
	position: absolute;
	border-radius: 50%;
	background-color: #333;
	width:10px;
	height:10px;
	z-index:1;
	top:190px;
	left:165px;
	box-shadow: -40px 0 #333;
	transform-origin: 50%;
	animation: close 2s infinite;
}

@keyframes close {
    0%, 100% {
        transform: scale(1, .05);
    }
    5%, 95% {
        transform: scale(1, 1);
    }
}

@keyframes beat {
  0%, 40%, 100% {
    transform: scale(1) rotate(-45deg);
  }
  25%, 60% {
    transform: scale(1.1) rotate(-45deg);
  }
}

/*Columna 2 Photo and Music */
.container_photo{
	width: 300px;
	background: #149BEE; /*#6FD1FA;*/
    box-shadow: 0 0 40px #28A5DD;
    border-radius: 10px;
	padding: 3px;
}

.photo{
	width: 98%;
	border-radius: 8px;
	margin-top: 4px;
}

.audio{
	width: 98%;
	border-radius: 5px;
}

/* Columna 3 Carta de Cumpleaños */

.container {
    width: 380px;
	margin-top: 150px;
}

.container > .envelope-wrapper {
    position: relative;
    background-color: #ffe3ed;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

.envelope-wrapper > .envelope {
    position: relative;
    width: 380px;
    height: 260px;
}

.envelope-wrapper > .envelope::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    border-top: 160px solid #ffccd5;
    border-right: 190px solid transparent;
    border-left: 190px solid transparent;
    transform-origin: top;
    transition: all 0.5s ease-in-out 0.7s;
    border-radius: 10px;
}

.tap-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
    transform: rotate(-90deg,90deg);
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    background-color: #ffc1d1;
}

.tap-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 0% 100%, 100% 100%);
    background-color: #ffc1d1;
    transform: rotate(90deg, -90deg);
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.envelope-wrapper.disable-envelope .envelope::before {
    pointer-events: none;
}

.envelope > .letter {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    text-align: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
    transition: transform .5s ease-in-out;
}

.envelope > .letter > .text {
    font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
    color: #003049;
    text-align: left;
    font-size: 12px;
    border: 3px dotted #003049;
    padding: 10px;
    height: 100%;
    line-height: 16px;
    cursor: pointer;
    overflow: scroll;
}

.heart_letter {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background: #ff477e;
    transform: translate(-50%, 0%) rotate(45deg);
    transition: transform 0.5s ease-in-out 1s;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;
}

.heart_letter:before,
.heart_letter:after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #ff477e;
    border-radius: 80%;
}

.heart_letter:before {
    top: -15px;
	left: 0px;
}
  
.heart_letter:after {
    right: 15px;
	top: 0px;
}

.flap > .envelope:before {
    transform: rotateX(180deg);
    z-index: 0;
}

.flap > .heart_letter {
    transform: rotate(90deg);
    transition-delay: 0.4s;
}

.letter.letter-opening {
    transform: translateY(-290px);
    transition: transform .5s ease-in-out;
}

.letter.closing-letter {
    transform: translateY(-290px);
    transition: transform .5s ease-in-out;
    z-index: 10000;
}

.letter.opened{
    z-index: 10000;
}

::-webkit-scrollbar {
    width: 8px; 
}

::-webkit-scrollbar-track {
    background: transparent; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ffc1d1; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff477e; 
}


@media  screen and  (max-width: 400px){
    .container {
        width: 300px;
    }

    
    .envelope-wrapper > .envelope {
        position: relative;
        width: 300px;
        height: 250px;
    }

    .tap-left,
    .tap-right{
        width: 100%;
    }

    
    .envelope-wrapper > .envelope::before {
        border-top: 150px solid #ffccd5;
        border-right: 150px solid transparent;
        border-left: 150px solid transparent;
}

}


/* Media Query para pantallas pequeñas (ej. menos de 768px) */
@media (max-width: 768px) {
  .contenedor-grid {
    grid-template-columns: 1fr; /* Una sola columna */
  }
}

