body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-image: url(media/BG.jpg);
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

#startButton {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
}

.header h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: #e63946;
    text-align: center;
    margin: 2rem auto;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.letter {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 1.5rem;
    margin: 1rem auto;
    border-radius: 1rem;
    max-width: 90%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.icon-container {
    position: relative;
    width: fit-content;
    margin: 0 auto 1rem auto;
    min-height: 10rem;
}

.icon-container i {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.icon-container img.envelope {
    width: 100%;
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto 1rem auto;
    z-index: 2;
}

.info-box {
    width: 100%;
    box-sizing: border-box;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.75rem;
}

.info-box p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    line-height: 1.6;
    color: #4a4a4a;
    text-align: center;
    margin: 0;
    padding: 0.5rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#openPopup {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 3.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#openPopup:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.music-player {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    padding: 12px;
    overflow: hidden;
    transition: height 0.3s ease;
}

.music-player.collapsed {
    height: 25px;
}

.music-player:not(.collapsed) {
    height: auto;
}

.music-player.collapsed .music-controls {
    display: none;
}

.toggle-music-btn {
    position: absolute;
    top: -20px;
    right: 10px;
    background: #e63946;
    border: none;
    color: white;
    border-radius: 50%;
    padding: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.toggle-music-btn:hover {
    transform: scale(1.1);
}

.music-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.music-info i {
    font-size: 24px;
    transition: transform 0.5s ease-in-out;
}

.music-info i.playing {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-text h3 {
    margin: 0;
    font-size: 16px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.music-text p {
    margin: 0;
    font-size: 12px;
    color: gray;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.music-controls button {
    color: black;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.music-controls button:hover {
    transform: scale(1.2);
}

.music-controls button:focus {
    outline: none;
}

.hidden {
    display: none;
}

body.blur > *:not(.popup) {
    filter: blur(15px);
    transition: filter 0.3s ease-in-out;
}

@keyframes popupEnter {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    padding: 80px 60px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 1001;
    animation: popupEnter 0.6s ease-out forwards;
}

#gifimage {
    width: 50%;
    height: auto;
}

#question {
    font-size: 36px;
    font-family: 'Dancing Script', cursive;
    color: #d6336c;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.popup-buttons button {
    padding: 12px 25px;
    font-size: 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.popup-buttons button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.yes-btn {
    background: #28a745;
    color: white;
}

.no-btn {
    background: #dc3545;
    color: white;
}

.yes-btn:hover {
    background: #218838;
}

.no-btn:hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
        margin: 1.5rem auto;
    }
    .letter {
        padding: 1rem;
        font-size: 1.5rem;
    }
    .music-player {
        width: 90%;
        padding: 10px;
    }
    .popup {
        padding: 60px 20px;
    }
    #question {
        font-size: 32px;
    }
    .popup-buttons button {
        padding: 10px 20px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
        margin: 1rem auto;
    }
    .letter {
        padding: 0.8rem;
        font-size: 1.2rem;
    }
    .music-player {
        width: 95%;
        padding: 8px;
    }
    .popup {
        padding: 40px 10px;
    }
    #question {
        font-size: 28px;
    }
    .popup-buttons button {
        padding: 8px 15px;
        font-size: 20px;
    }
}

