* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at center, #1a102f, #0b0714);
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.main-container {
    width: 100vw;
    height: 100vh;
    max-width: 480px;
    max-height: 900px;
    background: linear-gradient(135deg, #1f1135, #2d164a);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    text-align: center;
    color: #fff;
}

@media (min-width: 481px) {
    .main-container {
        border-radius: 35px;
        height: 88vh;
        border: 2px solid rgba(255, 105, 180, 0.3);
    }
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.screen.active {
    display: flex;
    opacity: 1;
}

.floating-emoji {
    font-size: 50px;
    margin-bottom: 12px;
    animation: floatAnim 2s infinite ease-in-out alternate;
}

@keyframes floatAnim {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-12px) scale(1.1); }
}

h2 {
    color: #ff69b4;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(255, 105, 180, 0.4);
}

p {
    color: #d1c4e9;
    font-size: 14px;
}

.passcode-dots {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.dot {
    width: 16px;
    height: 16px;
    border: 2px solid #ff69b4;
    border-radius: 50%;
    background: transparent;
    transition: 0.3s;
}

.dot.filled {
    background-color: #ff69b4;
    box-shadow: 0 0 10px #ff69b4;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(2, 80px);
    gap: 15px;
}

.keypad button, .action-btn {
    padding: 14px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    background: linear-gradient(135deg, #ff4081, #c51162);
    color: white;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 64, 129, 0.4);
    transition: 0.2s;
}

.keypad button:active, .action-btn:active {
    transform: scale(0.95);
}

.btn-group {
    display: flex;
    gap: 25px;
    margin-top: 20px;
    justify-content: center;
    width: 100%;
}

.safe-group {
    position: relative;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

#yes-btn {
    position: relative;
    transition: transform 0.2s ease-out;
}

.cake-3d, .cake-container {
    font-size: 75px;
    margin: 15px 0;
    animation: pulseCake 1.2s infinite alternate ease-in-out;
}

@keyframes pulseCake {
    from { transform: scale(1); filter: drop-shadow(0 0 10px rgba(255,105,180,0.5)); }
    to { transform: scale(1.1); filter: drop-shadow(0 0 25px rgba(255,105,180,0.9)); }
}

.image-frame {
    width: 250px;
    height: 330px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 3px solid rgba(255, 105, 180, 0.5);
    margin: 10px 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tap-hint {
    font-size: 12px;
    color: #b39ddb;
    margin-top: 12px;
    font-style: italic;
}

.glow-title {
    color: #ff4081;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 64, 129, 0.6);
    margin: 12px 0;
    line-height: 1.4;
}

.mail-icon {
    font-size: 75px;
    cursor: pointer;
    margin: 15px 0;
    animation: floatAnim 1.5s infinite alternate ease-in-out;
}

.letter-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #fce4ec;
    text-align: left;
    max-height: 220px;
    overflow-y: auto;
    width: 100%;
}

.hidden {
    display: none;
}