:root {
    --primary-color: #ff4d6d;
    --background-color: #ffe5ec;
    --text-color: #590d22;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Lock Screen Styles */
#lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 1s ease-in-out;
}

.lock-content {
    text-align: center;
    color: white;
}

.camera-container {
    position: relative;
    margin: 20px auto;
    width: 720px;
    height: 560px;
    background: #222;
    border: 5px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    /* Responsive sizing */
    max-width: 90vw;
    max-height: 70vh;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
}

button {
    padding: 10px 20px;
    font-size: 1.2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background-color: #ff0a54;
}

/* Valentine Content Styles */
.hidden {
    display: none !important;
}

#valentine-content {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #ffe5ec 0%, #ffc2d1 100%);
    opacity: 0;
    animation: fadeIn 2s forwards;
    flex-direction: column;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.slideshow-container {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 77, 109, 0.3);
    max-width: 800px;
    width: 90%;
    position: relative;
    z-index: 10;
}

#slide-image-container {
    width: 100%;
    height: 60vh; /* Adjust height based on screen */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 2rem;
    background-color: #ffe5ec;
}

#slide-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#slide-img.active {
    opacity: 1;
}

.message {
    font-size: 2rem;
    line-height: 1.4;
    color: #800f2f;
    min-height: 3em; 
    font-style: italic;
    font-family: 'Georgia', serif;
}

.final-message {
    font-size: 1.8rem;
    font-weight: bold;
    color: #590d22;
    padding: 2rem;
    border: 3px double #ff4d6d;
    border-radius: 15px;
    background-color: #fff0f3;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: #ffccd5;
    margin-top: 20px;
    border-radius: 5px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: #ff0a54;
    width: 0%;
    transition: width linear;
}

/* Falling Hearts Animation */
.heart {
    position: fixed;
    top: -10vh;
    font-size: 2rem;
    color: #ff0a54;
    user-select: none;
    pointer-events: none;
    animation: fall linear forwards;
}

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

.final-message {
    font-family: 'Georgia', sans-serif;
    font-size: 1.5rem;
    line-height: 1.8;
    color: #a4133c;
    padding: 2rem;
    background: #fff0f3;
    border-radius: 15px;
    border: 2px solid #ffccd5;
    text-align: center;
    margin-top: 1rem;
    animation: fadeIn 2s ease-in;
}

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