html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    overflow-y: scroll;
}

body {
    background-color: #ffe6e6;
    font-family: 'Dancing Script', cursive;
    text-align: center;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

h1 {
    color: #ff4d4d;
    font-size: 3.5em;
    margin: 20px;
    text-shadow: 3px 3px 6px rgba(255, 77, 77, 0.3);
    animation: titlePulse 2s infinite;
}

@keyframes titlePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.heartbeat-title {
    color: #ff4d4d;
    font-size: 4em;
    margin: 20px;
    text-shadow: 3px 3px 6px rgba(255, 77, 77, 0.3);
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    40% { transform: scale(1); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.mystery-box {
    width: 300px;
    height: 300px;
    background: linear-gradient(145deg, #ff6b6b, #ff4d4d);
    border: 12px solid rgba(255, 26, 26, 0.5);
    border-radius: 50%;
    cursor: pointer;
    margin: 50px auto;
    position: relative;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 150px;
    animation: floatHeart 3s infinite;
    box-shadow: 0 10px 30px rgba(255, 77, 77, 0.3),
                inset 0 5px 15px rgba(255, 255, 255, 0.3);
}

.heart-glow {
    position: absolute;
    animation: glow 2s infinite;
}

.heart-sparkles {
    position: absolute;
    font-size: 30px;
    opacity: 0;
    transition: all 0.3s;
}

.mystery-box:hover .heart-sparkles {
    opacity: 1;
    animation: sparkle 1s infinite;
}

@keyframes glow {
    0% { filter: drop-shadow(0 0 5px rgba(255, 77, 77, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 77, 77, 0.8)); }
    100% { filter: drop-shadow(0 0 5px rgba(255, 77, 77, 0.5)); }
}

@keyframes sparkle {
    0% { transform: rotate(0deg) translate(80px) rotate(0deg); }
    100% { transform: rotate(360deg) translate(80px) rotate(-360deg); }
}

.content {
    text-align: center;
    display: none;
    margin: 20px auto;  /* Changed to auto horizontal margins */
    max-width: 800px;   /* Added max-width */
    padding: 0 20px;    /* Added horizontal padding */
    box-sizing: border-box;  /* Makes padding included in width */
}

.content h2 {
    color: #ff4d4d;
    font-size: 3em;
}

.content p {
    color: #ff6666;
    font-size: 2em;
}

img {
    max-width: 300px;
    margin: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.3);
}

.button-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 30px 0;
}

.btn {
    font-size: 1.8em;
    padding: 15px 40px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    animation: fadeInUp 1s 0.6s both;
}

.yes-btn {
    background: linear-gradient(145deg, #ff6b6b, #ff4d4d);
    color: white;
}

.no-btn {
    background: linear-gradient(145deg, #ffb3b3, #ff8c8c);
    color: white;
}

.btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(255, 77, 77, 0.3);
}

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

.response {
    font-size: 2em;
    color: #ff4d4d;
    margin: 20px;
    min-height: 60px;
    animation: fadeIn 0.5s;
}

.password-prompt {
    text-align: center;
    margin-top: 50px;
}

.password-prompt input {
    padding: 10px;
    font-size: 1.2em;
    margin: 10px;
}

.password-prompt button {
    padding: 10px 20px;
    font-size: 1.2em;
    cursor: pointer;
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.password-prompt button:hover {
    background-color: #ff1a1a;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 30px auto;
    max-width: 350px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(255, 77, 77, 0.1);
}

.number-pad button {
    padding: 25px;
    font-size: 2em;
    font-family: 'Dancing Script', cursive;
    background: linear-gradient(145deg, #ff6b6b, #ff4d4d);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 5px 5px 15px rgba(255, 77, 77, 0.2),
                -5px -5px 15px rgba(255, 255, 255, 0.5);
}

.number-pad button:hover {
    background: linear-gradient(145deg, #ff4d4d, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 7px 7px 20px rgba(255, 77, 77, 0.3),
                -7px -7px 20px rgba(255, 255, 255, 0.7);
}

.number-pad button:active {
    transform: translateY(1px);
    box-shadow: 3px 3px 10px rgba(255, 77, 77, 0.2),
                -3px -3px 10px rgba(255, 255, 255, 0.3);
}

/* Special styling for Clear and Submit buttons */
.number-pad button:nth-child(10),
.number-pad button:last-child {
    background: linear-gradient(145deg, #ff8c8c, #ff6b6b);
    font-size: 1.5em;
}

.password-display {
    font-size: 2.5em;
    margin: 30px;
    color: #ff4d4d;
    text-shadow: 2px 2px 4px rgba(255, 77, 77, 0.2);
    min-height: 50px;
}

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

.heart {
    position: absolute;
    font-size: 40px;
    animation: float-up 8s linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.music-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ff4d4d;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.3);
    transition: transform 0.3s;
}

.music-btn:hover {
    transform: scale(1.1);
}

.valentine-title {
    font-size: 3.5em;
    color: #ff4d4d;
    margin-bottom: 20px;
    animation: fadeInUp 1s;
}

.love-message {
    font-size: 2.5em;
    color: #ff6b6b;
    margin-bottom: 30px;
    animation: fadeInUp 1s 0.3s both;
} 