
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    color: #ff9ec6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 15px;
}


.matrix-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.heart-matrix {
    position: absolute;
    color: #ff6b9e;
    font-size: 16px;
    animation: fall linear infinite;
    text-shadow: 0 0 5px #ff9ec6;
}

@media (min-width: 768px) {
    .heart-matrix {
        font-size: 20px;
    }
}

@keyframes fall {
    to { transform: translateY(100vh); }
}

.card {
    width: 100%;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    border: 1px solid #ff6b9e;
    box-shadow: 0 0 30px rgba(255, 107, 158, 0.5);
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(5px);
}

@media (min-width: 768px) {
    .card {
        padding: 25px;
        border-radius: 15px;
    }
}

.header {
    margin-bottom: 15px;
    position: relative;
}

h1 {
    font-size: 1.8rem;
    background: linear-gradient(45deg, #ff6b9e, #ff9ec6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 107, 158, 0.3);
    line-height: 1.3;
}

@media (min-width: 768px) {
    h1 {
        font-size: 2rem;
    }
}

.date {
    font-size: 0.9rem;
    color: #ff9ec6;
    letter-spacing: 2px;
}

@media (min-width: 768px) {
    .date {
        font-size: 1rem;
        letter-spacing: 2px;
    }
}

.photo-frame {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 3px solid transparent;
    box-shadow: 0 0 15px #ff6b9e, 
                inset 0 0 15px #ff6b9e;
    padding: 5px;
    position: relative;
    overflow: hidden;
    animation: glow 2s infinite alternate;
}

@media (min-width: 768px) {
    .photo-frame {
        width: 150px;
        height: 150px;
        margin-bottom: 25px;
    }
}

@keyframes glow {
    from { box-shadow: 0 0 10px #ff6b9e, inset 0 0 10px #ff6b9e; }
    to { box-shadow: 0 0 20px #ff6b9e, inset 0 0 20px #ff6b9e; }
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.message {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 auto 15px;
    max-width: 95%;
    color: #ffcce0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

@media (min-width: 768px) {
    .message {
        font-size: 1.1rem;
        margin-bottom: 20px;
        max-width: 90%;
    }
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.heart-btn {
    background: transparent;
    color: #ff9ec6;
    border: 2px solid #ff6b9e;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    margin: 15px 0;
    box-shadow: 0 0 15px rgba(255, 107, 158, 0.5);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .heart-btn {
        padding: 12px 30px;
        font-size: 1rem;
        margin: 15px 0;
    }
}

.heart-btn:hover {
    background: rgba(255, 107, 158, 0.2);
    box-shadow: 0 0 25px rgba(255, 107, 158, 0.8);
}

.heart-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        transparent, 
        rgba(255, 158, 198, 0.3), 
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -50%; }
    100% { left: 150%; }
}

.signature {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: #ff6b9e;
    margin-top: 15px;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
    text-shadow: 0 0 10px rgba(255, 107, 158, 0.5);
}

@media (min-width: 768px) {
    .signature {
        font-size: 1.8rem;
        margin-top: 20px;
    }
}

.music-btn {
    position: absolute;
    top: 45px;
    right: 15px;
    background: transparent;
    border: 1px solid #ff6b9e;
    color: #ff9ec6;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 0 10px rgba(255, 107, 158, 0.5);
    transition: all 0.3s;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .music-btn {
        top: 10%;
        right: 20px;
    }
}

.music-btn:hover {
    background: rgba(255, 107, 158, 0.2);
    box-shadow: 0 0 15px rgba(255, 107, 158, 0.8);
}


.modal {
    display: none;
    position: fixed;
   top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease forwards;
    overflow-y: auto;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    border: 1px solid #ff6b9e;
    box-shadow: 0 0 30px rgba(255, 107, 158, 0.5);
    padding: 40px 20px;
    color: #ffcce0;
    text-align: center;
    margin: 20px 0;
}

@media (min-width: 768px) {
    .modal-content {
        padding: 40px;
        margin: 30px 0;
    }
}

.torn-paper {
    position: relative;
    margin-top: 80%;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 5px;
}
@media (max-width: 568px) {
    .torn-paper {
        margin-top: 0%;
    }
}
@media (min-width: 768px) {
    .torn-paper {
        padding: 40px 30px;
    }
}

.torn-paper::before,
.torn-paper::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 15px;
    background-image: 
        radial-gradient(circle at 0 0, transparent 25%, #ff6b9e 25%, #ff6b9e 75%, transparent 75%),
        radial-gradient(circle at 10px 0, transparent 25%, #ff6b9e 25%, #ff6b9e 75%, transparent 75%);
    background-size: 20px 15px;
    background-repeat: repeat-x;
    z-index: 2;
}

.torn-paper::before {
    top: -10px;
}

.torn-paper::after {
    bottom: -10px;
    transform: rotate(180deg);
}

.letter-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    color: #ff6b9e;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 107, 158, 0.6);
}

@media (min-width: 768px) {
    .letter-title {
        font-size: 2.8rem;
        margin-bottom: 25px;
    }
}

.letter-content {
    font-size: 1rem;
    line-height: 1.7;
    text-align: left;
    margin-bottom: 25px;
    color: #ffcce0;
    padding: 0 10px;
}

@media (min-width: 768px) {
    .letter-content {
        font-size: 1.1rem;
        line-height: 1.8;
        padding: 0 20px;
    }
}

.letter-content p {
    margin-bottom: 15px;
}

.letter-signature {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    color: #ff6b9e;
    text-align: right;
    margin-top: 20px;
    padding-right: 30px;
    text-shadow: 0 0 10px rgba(255, 107, 158, 0.5);
}

@media (min-width: 768px) {
    .letter-signature {
        font-size: 2.4rem;
    }
}

.close-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    color: #ff9ec6;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #ff6b9e;
    z-index: 1100;
}

@media (min-width: 768px) {
    .close-btn {
        top: 25px;
        right: 25px;
        width: 50px;
        height: 50px;
        font-size: 32px;
    }
}

.close-btn:hover {
    color: #ff6b9e;
    transform: scale(1.1);
}

/* Efectos de corazones */
@keyframes pop {
    to { transform: scale(1); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: scale(0.5); }
}

@media (max-width: 767px) {
    .modal {
        align-items: flex-start;
        padding-top: 60px;
        -webkit-overflow-scrolling: touch;
    }

    .modal-content {
        margin-bottom: 40px;
    }

    .letter-title {
        font-size: 1.8rem;
    }

    .letter-content {
        font-size: 0.95rem;
    }

    .letter-signature {
        font-size: 1.8rem;
    }
}