body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(
        270deg,
        #ff9a9e,
        #fad0c4,
        #ffd1dc,
        #ffc3a0
    );
    background-size: 800% 800%;
    animation: gradientMove 20s ease infinite;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Passcode Screen */
.passcode-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: fadeIn 1s ease-in;
}

.passcode-title {
    font-family: 'Great Vibes', cursive;
    font-size: 56px;
    color: white;
    text-shadow: 3px 3px 8px rgba(0,0,0,0.2);
    margin: 0 0 10px 0;
    animation: floatIn 1.2s ease-out;
}

.passcode-subtitle {
    font-size: 18px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 40px;
    font-weight: 500;
    opacity: 0.9;
}

.passcode-input {
    width: 100%;
    max-width: 350px;
    padding: 18px 25px;
    font-size: 18px;
    border-radius: 50px;
    border: 3px solid white;
    background: rgba(255, 255, 255, 0.95);
    color: #2d3436;
    font-weight: 500;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    font-family: 'Poppins', sans-serif;
}

.passcode-input:focus {
    border-color: #e63946;
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.3);
    transform: scale(1.02);
}

.passcode-input::placeholder {
    color: #999;
}

.passcode-button {
    margin-top: 25px;
    padding: 18px 50px;
    font-size: 18px;
    border-radius: 50px;
    background: white;
    color: #e63946;
    border: 3px solid transparent;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.passcode-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(230, 57, 70, 0.3);
    border-color: #e63946;
}

.passcode-button:active {
    transform: translateY(-2px) scale(1.02);
}

.passcode-error {
    color: #ff4757;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    min-height: 20px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

#mainContent {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.intro {
    text-align: center;
    margin-bottom: 30px;
}

.intro h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 64px;
    color: white;
    text-shadow: 3px 3px 8px rgba(0,0,0,0.2);
    margin: 0 0 20px 0;
    animation: floatIn 1.2s ease-out;
}

.intro .message {
    font-size: 18px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 500;
}


body > h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 64px;
    color: white;
    text-shadow: 3px 3px 8px rgba(0,0,0,0.2);
    margin: 0 0 20px 0;
    animation: floatIn 1.2s ease-out;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.screen {
    margin: 20px auto;
    padding: 45px;
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    text-align: center;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    scroll-behavior: smooth;
}

.screen.active { display: block; }

#home.screen {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    padding: 60px 45px;
    animation: fadeIn 1s ease-in;
}

#home h1 {
    font-size: 56px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.15);
    animation: heartbeat 2s ease-in-out infinite;
}

#home p {
    font-size: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    font-weight: 500;
}

#home button {
    margin: 15px 10px;
    padding: 18px 40px;
    font-size: 18px;
    border-radius: 50px;
    background: white;
    color: #e63946;
    border: 3px solid transparent;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

#home button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(230, 57, 70, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

#home button:hover::before {
    width: 300px;
    height: 300px;
}

#home button span {
    position: relative;
    z-index: 2;
}

#home button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(230, 57, 70, 0.3);
    border-color: #e63946;
}

#home button:active {
    transform: translateY(-2px) scale(1.02);
}

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

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10% {
        transform: scale(1.05);
    }
    20% {
        transform: scale(1);
    }
}

/* Responsive design for home screen */
@media (max-width: 600px) {
    body > h1 {
        font-size: 48px;
    }

    #home h1 {
        font-size: 42px;
    }

    #home button {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 15px auto;
    }

    .passcode-title {
        font-size: 42px;
    }

    .passcode-subtitle {
        font-size: 16px;
        padding: 0 20px;
    }

    .passcode-input {
        max-width: 280px;
        padding: 16px 20px;
        font-size: 16px;
    }

    .passcode-button {
        padding: 16px 40px;
        font-size: 16px;
    }
}

.screen::-webkit-scrollbar {
    display: none;
}

.screen {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 40px;
    color: #e63946;
    margin: 0 0 10px 0;
}

h2 {
    font-size: 22px;
    margin: 20px 0 10px 0;
}

.date-display {
    font-size: 14px;
    color: #666;
    margin: 5px 0 15px 0;
    font-weight: 500;
}

button {
    margin: 10px;
    padding: 12px 25px;
    border-radius: 30px;
    border: none;
    background: #e63946;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.locks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.lock {
    padding: 15px;
    background: #ffe5ec;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.lock:hover {
    transform: scale(1.05);
}

.lock.unlocked {
    background: #b8f2e6;
    font-weight: 600;
}

.lock.selected {
    background: #ffd166;
    border: 2px solid #e63946;
    font-weight: 700;
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.val-message {
    margin: 15px 0;
    font-size: 16px;
    color: #444;
}

.message-card {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    padding: 20px;
    border-radius: 15px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    animation: slideIn 0.5s ease;
}

.message-card h3 {
    font-family: 'Great Vibes', cursive;
    font-size: 26px;
    color: #e63946;
    margin: 0 0 8px 0;
}

.message-card p {
    font-size: 15px;
    line-height: 1.5;
    color: #2d3436;
    margin: 0;
}

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

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.gallery img {
    width: 100%;
    border-radius: 12px;
}

.proposal {
    margin-top: 20px;
}

.proposal h2 {
    margin-top: 15px;
    color: #c1121f;
}

.answer-badge {
    display: inline-block;
    background: linear-gradient(135deg, #b8f2e6 0%, #a8e6cf 100%);
    color: #2d3436;
    font-size: 20px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 25px;
    margin-left: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 2px solid #06d6a0;
    vertical-align: middle;
}

@media (max-width: 600px) {
    .answer-badge {
        display: block;
        margin: 10px auto 0;
        width: fit-content;
    }
}

.hidden { display: none; }

#confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 14px;
    opacity: 0.9;
    animation: fall 3s linear forwards;
}

@keyframes fall {
    from {
        transform: translateY(-10vh) rotate(0deg);
    }
    to {
        transform: translateY(110vh) rotate(360deg);
    }
}


.gallery.single {
    grid-template-columns: 1fr;
}

.gallery.single img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-top: 10px;
}

#hearts-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    color: #d60606;
}

.bg-heart {
    position: absolute;
    bottom: -30px;
    font-size: 40px;
    opacity: 0.35;
    animation: rise linear infinite;
}

@keyframes rise {
    from {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
    to {
        transform: translateY(-120vh) scale(1.6);
        opacity: 0;
    }
}

.popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-card {
    background: white;
    padding: 25px 30px;
    border-radius: 20px;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: popupIn 0.4s ease;
}

.popup-card p {
    font-size: 16px;
    color: #444;
    line-height: 1.6;
}

.popup-card button {
    margin-top: 15px;
    padding: 10px 22px;
    border-radius: 25px;
    border: none;
    background: #e63946;
    color: white;
    font-size: 15px;
    cursor: pointer;
}

.hidden {
    display: none;
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

