:root {
    --primary-red: #d9001c;
    /* Brand color */
    --gold: #FFD700;
    --dark-red: #8B0000;
    --white: #ffffff;
    --text-color: #333;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--primary-red);
    background-image: url('images/Background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
}

#fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.header {
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out;
}

.main-title-img {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    width: 500px;
    /* Base width, scalable via max-width */
}

.subtitle {
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0.9;
}

.envelope-container {
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Envelope Image */
.envelope-image {
    width: 640px;
    max-width: 120%;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.envelope-image:hover {
    transform: translateY(-5px) scale(1.02);
}

.action-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    color: var(--dark-red);
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* Music Toggle Button */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    /* White icon on red background */
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

.music-btn:hover {
    transform: scale(1.1);
    opacity: 1;
    background: transparent;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.shaking {
    animation: shake 0.1s;
    /* Fast vibration */
    animation-iteration-count: 20;
    /* 2 seconds total */
}



/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    color: var(--text-color);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal h2 {
    color: var(--primary-red);
    text-align: center;
    margin-top: 0;
}

.modal-desc {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    /* Fix padding issue */
}

.submit-btn {
    width: 100%;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #b30000;
}

.disclaimer {
    font-size: 0.75rem;
    color: #888;
    margin-top: 15px;
    text-align: center;
    font-style: italic;
}

/* Result Modal Special Styles */
.result-content {
    text-align: center;
}

#resultIcon {
    font-size: 4rem;
    margin-bottom: 10px;
}

#resultMessage {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.close-result-btn {
    background-color: #888;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 480px) {
    .tet-title {
        font-size: 2.5rem;
    }

    .envelope-image {
        width: 420px;
        /* Increased size for mobile */
        max-width: 110%;
        /* Allow it to take up more width */
    }
}