* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #4ea3d8 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body.locked .container {
    filter: blur(6px);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
    transition: all 0.4s ease;
}

body.locked .floating-hearts {
    opacity: 0.3;
}

.lock-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.35), rgba(78, 163, 216, 0.5)),
                linear-gradient(135deg, rgba(78, 163, 216, 0.9), rgba(102, 126, 234, 0.9));
    z-index: 999;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.lock-screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.lock-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 36px 30px 30px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    text-align: center;
    width: min(420px, 90vw);
    backdrop-filter: blur(6px);
}

.lock-emoji {
    font-size: 2.4em;
    margin-bottom: 10px;
}

.lock-card h2 {
    color: #4a7bc7;
    margin-bottom: 10px;
}

.lock-copy {
    color: #3d4a5d;
    margin-bottom: 18px;
    line-height: 1.6;
}

.lock-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid #bcd5ff;
    font-size: 1em;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 12px;
}

.lock-input:focus {
    border-color: #4a7bc7;
    box-shadow: 0 0 0 4px rgba(74, 123, 199, 0.15);
}

.lock-btn {
    width: 100%;
    background: linear-gradient(135deg, #6e9ef5 0%, #4ea3d8 100%);
    color: #fff;
    border: none;
    padding: 14px 16px;
    font-size: 1.05em;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(78, 163, 216, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 12px;
}

.lock-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(78, 163, 216, 0.45);
}

.lock-btn:active {
    transform: translateY(-1px);
}

.lock-screen.loading .lock-input,
.lock-screen.loading .lock-btn {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
}

.lock-loading {
    display: none;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin: 6px 0 10px;
    color: #4a7bc7;
    font-weight: 600;
}

.lock-screen.loading .lock-loading {
    display: flex;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid #bcd5ff;
    border-top-color: #4a7bc7;
    border-radius: 50%;
    animation: spin-small 0.8s linear infinite;
}

@keyframes spin-small {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.lock-error {
    color: #d9534f;
    min-height: 18px;
    font-size: 0.95em;
    margin-bottom: 6px;
}

.lock-hint {
    color: #5b6b7a;
    font-size: 0.9em;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

.content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: fadeIn 1s ease-in;
}

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

.title {
    font-size: 4em;
    color: #ff6b9d;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.heart {
    font-size: 3em;
    animation: heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
}

.name {
    font-size: 2.5em;
    color: #4a7bc7;
    margin: 20px 0 40px;
    font-weight: 300;
}

.message-box {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #a8d8ff 0%, #b5d8f7 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.message {
    font-size: 1.2em;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
    min-height: 3em;
}

.typing-text {
    overflow: hidden;
    white-space: pre-wrap;
}

.typing-text::after {
    content: '|';
    animation: blink 0.7s infinite;
    margin-left: 2px;
}

.typing-text.typing-complete::after {
    content: '';
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.signature {
    font-size: 1.3em;
    font-style: italic;
    color: #ff6b9d;
    margin-top: 20px;
    font-weight: 600;
    min-height: 1.5em;
}

.surprise-btn {
    background: linear-gradient(135deg, #6e9ef5 0%, #4ea3d8 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.3em;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(78, 163, 216, 0.4);
    transition: all 0.3s ease;
    margin: 30px 0;
}

.surprise-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(78, 163, 216, 0.6);
}

.surprise-btn:active {
    transform: translateY(-2px);
}

.surprise-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 8px 20px rgba(78, 163, 216, 0.3);
}

.surprise-btn.pulse {
    animation: buttonPulse 1.5s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(78, 163, 216, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 15px 40px rgba(78, 163, 216, 0.7);
    }
}

.surprise {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #a8d8ff 0%, #c4e0ff 100%);
    border-radius: 20px;
    animation: slideDown 1s ease-in-out;
}

.surprise.hidden {
    display: none;
}

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

.surprise h3 {
    font-size: 2em;
    color: #4a7bc7;
    margin-bottom: 20px;
}

.confetti {
    font-size: 3em;
    margin-bottom: 20px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.love-list {
    list-style: none;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.love-list li {
    font-size: 1.2em;
    padding: 15px;
    margin: 10px 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: #333;
    transition: all 0.3s ease;
}

.love-list li:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cake {
    font-size: 5em;
    margin-top: 40px;
    animation: swing 2s ease-in-out infinite;
}

@keyframes swing {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

/* Balloons */
.balloon {
    font-size: 3em;
    position: absolute;
    animation: float 6s ease-in-out infinite;
}

.balloon1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.balloon2 {
    top: 20%;
    right: 10%;
    animation-delay: 1s;
}

.balloon3 {
    top: 40%;
    left: 5%;
    animation-delay: 2s;
}

.balloon4 {
    top: 60%;
    right: 8%;
    animation-delay: 3s;
}

.balloon5 {
    top: 80%;
    left: 15%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

    .dedication {
        margin-top: 30px;
        padding: 24px 20px;
        background: linear-gradient(135deg, #e0ecff 0%, #c7dcff 100%);
        border-radius: 18px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    }

    .dedication-title {
        font-size: 1.4em;
        color: #4a7bc7;
        margin-bottom: 8px;
        font-weight: 700;
    }

    .dedication-subtitle {
        font-size: 1.15em;
        color: #3d4a5d;
        line-height: 1.6;
    }

/* Music hint */
.music-hint {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: linear-gradient(135deg, #6e9ef5 0%, #4ea3d8 100%);
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(78, 163, 216, 0.35);
    cursor: pointer;
    font-size: 0.95em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    z-index: 50;
}

.music-hint:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(78, 163, 216, 0.45);
}

.music-hint:active {
    transform: translateY(0);
}

.music-hint:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
}

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

.heart-float {
    position: absolute;
    font-size: 2em;
    opacity: 0.6;
    animation: floatUp 10s ease-in infinite;
}

.heart-float:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.heart-float:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
}

.heart-float:nth-child(3) {
    left: 40%;
    animation-delay: 4s;
}

.heart-float:nth-child(4) {
    left: 60%;
    animation-delay: 1s;
}

.heart-float:nth-child(5) {
    left: 75%;
    animation-delay: 3s;
}

.heart-float:nth-child(6) {
    left: 90%;
    animation-delay: 5s;
}

@keyframes floatUp {
    0% {
        bottom: -10%;
        transform: translateX(0);
    }
    50% {
        transform: translateX(100px);
    }
    100% {
        bottom: 110%;
        transform: translateX(-100px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5em;
    }
    
    .name {
        font-size: 1.8em;
    }
    
    .content {
        padding: 40px 20px;
    }
    
    .message {
        font-size: 1em;
    }
    
    .surprise-btn {
        font-size: 1.1em;
        padding: 15px 30px;
    }
    
    .balloon {
        font-size: 2em;
    }
}
