/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --rose-pink: #f4c2c2;
    --soft-rose: #f8d7da;
    --warm-cream: #fff8f0;
    --deep-burgundy: #8b4a6b;
    --gold-shimmer: #d4af37;
    --light-gold: #f5e6d3;
    --dark-burgundy: #6b2d4a;
}

body {
    font-family: 'Crimson Text', serif;
    background: linear-gradient(135deg, var(--warm-cream) 0%, var(--soft-rose) 100%);
    color: var(--deep-burgundy);
    line-height: 1.6;
    overflow-x: hidden;
}

.script-font {
    font-family: 'Dancing Script', cursive;
}

.body-font {
    font-family: 'Crimson Text', serif;
}

.hidden {
    display: none !important;
}

/* Giant Beating Heart Landing Page */
.heart-landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--warm-cream) 0%, var(--soft-rose) 50%, var(--warm-cream) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease-in;
}

.giant-heart-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.giant-heart {
    font-size: 10rem;
    cursor: pointer;
    user-select: none;
    animation: heartbeat 2.5s ease-in-out infinite;
    transition: transform 2.0s ease;
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.6));
}

.giant-heart:hover {
    transform: scale(1.1);
}

.giant-heart:active {
    transform: scale(0.95);
}

.heart-hint {
    margin-top: 2rem;
    font-size: 1.3rem;
    color: var(--deep-burgundy);
    font-style: italic;
    animation: fadeInUp 1s ease-out 0.5s both;
    opacity: 0.8;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    60% {
        transform: scale(1);
    }
}

/* Password Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(107, 45, 74, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in;
}

.modal-content {
    background: linear-gradient(135deg, var(--warm-cream) 0%, #fff 100%);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(107, 45, 74, 0.3);
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 3px solid var(--rose-pink);
    animation: slideUp 0.5s ease-out;
}

.modal-header h2 {
    font-size: 2.5rem;
    color: var(--deep-burgundy);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(212, 175, 55, 0.3);
}

.modal-header p {
    color: var(--dark-burgundy);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.date-picker-container {
    margin: 2rem 0;
}

.date-input {
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--rose-pink);
    border-radius: 10px;
    background: white;
    color: var(--deep-burgundy);
    font-family: 'Crimson Text', serif;
    width: 100%;
    max-width: 300px;
    transition: all 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: var(--deep-burgundy);
    box-shadow: 0 0 15px rgba(139, 74, 107, 0.3);
}

.submit-btn {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--deep-burgundy) 0%, var(--dark-burgundy) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(107, 45, 74, 0.3);
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 45, 74, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.error-message {
    color: #d32f2f;
    margin-top: 1rem;
    font-size: 1rem;
    min-height: 1.5rem;
    font-style: italic;
}

.attempts-message {
    color: var(--deep-burgundy);
    margin-top: 0.5rem;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

/* Landing Page */
.landing-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--warm-cream) 0%, var(--soft-rose) 50%, var(--warm-cream) 100%);
}

.hearts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 2rem;
    color: var(--rose-pink);
    opacity: 0.7;
    animation: float 15s infinite ease-in-out;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

.landing-content {
    text-align: center;
    z-index: 10;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.main-title {
    font-size: 4.5rem;
    color: var(--deep-burgundy);
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(212, 175, 55, 0.4);
    animation: pulse 3s ease-in-out infinite;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--dark-burgundy);
    font-style: italic;
    margin-bottom: 3rem;
}

.scroll-indicator {
    margin-top: 4rem;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    color: var(--deep-burgundy);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.scroll-arrow {
    font-size: 2rem;
    color: var(--rose-pink);
}

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

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

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

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

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

/* Timeline Section */
.timeline-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3.5rem;
    text-align: center;
    color: var(--deep-burgundy);
    margin-bottom: 4rem;
    text-shadow: 2px 2px 4px rgba(212, 175, 55, 0.3);
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--rose-pink), var(--deep-burgundy), var(--rose-pink));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }

.timeline-marker {
    position: absolute;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--deep-burgundy);
    border: 4px solid var(--warm-cream);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.timeline-content {
    width: 45%;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(107, 45, 74, 0.2);
    border: 2px solid var(--rose-pink);
    transition: all 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    margin-left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(107, 45, 74, 0.3);
}

.timeline-image-placeholder {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    border: 2px dashed var(--deep-burgundy);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--soft-rose) 0%, var(--rose-pink) 100%);
    overflow: hidden;
}

.timeline-image-placeholder:hover {
    background: linear-gradient(135deg, var(--rose-pink) 0%, var(--soft-rose) 100%);
}

.timeline-media {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 10px 25px rgba(107, 45, 74, 0.3);
    display: block;
}

.timeline-media-click {
    cursor: pointer;
}

.timeline-video {
    background: black;
}

/* Lightbox - enlarged view */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2002;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.lightbox-content {
    position: relative;
    z-index: 2001;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-image.hidden,
.lightbox-video.hidden {
    display: none !important;
}

.timeline-image-placeholder p {
    color: var(--deep-burgundy);
    font-style: italic;
}

.timeline-title {
    font-size: 2rem;
    color: var(--deep-burgundy);
    margin-bottom: 0.5rem;
}

.timeline-description {
    color: var(--dark-burgundy);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.timeline-date {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--rose-pink);
    color: var(--deep-burgundy);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Card Section */
.card-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.video-message-preview {
    margin: 1.5rem auto 2.5rem;
    display: flex;
    justify-content: center;
}

.video-message-thumb {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.video-message-thumb .timeline-media {
    width: 260px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(107, 45, 74, 0.35);
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.video-message-label {
    margin-top: 0.75rem;
    font-size: 1.1rem;
    color: var(--dark-burgundy);
}

.card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    perspective: 1000px;
}

.valentine-card {
    width: 400px;
    height: 500px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    cursor: pointer;
}

.valentine-card.flipped {
    transform: rotateY(180deg);
}

/* Memories Gallery */
.gallery-section {
    padding: 5rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.gallery-subtitle {
    margin-top: 0.5rem;
    margin-bottom: 3rem;
    color: var(--dark-burgundy);
    font-style: italic;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: 16px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 30px rgba(107, 45, 74, 0.25);
}

.gallery-item .timeline-media {
    height: 180px;
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item .timeline-media {
        height: 200px;
    }
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(107, 45, 74, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.card-front {
    background: linear-gradient(135deg, var(--deep-burgundy) 0%, var(--dark-burgundy) 100%);
    color: white;
}

.card-back {
    background: linear-gradient(135deg, var(--warm-cream) 0%, white 100%);
    color: var(--deep-burgundy);
    transform: rotateY(180deg);
    border: 3px solid var(--rose-pink);
}

.card-decoration {
    margin-bottom: 2rem;
}

.heart-decoration {
    font-size: 4rem;
    animation: pulse 2s ease-in-out infinite;
    display: inline-block;
}

.card-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.card-hint {
    font-size: 1.1rem;
    opacity: 0.9;
    font-style: italic;
}

.card-message {
    text-align: left;
    max-width: 90%;
}

.message-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.message-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--dark-burgundy);
}

.message-signature {
    font-size: 1.8rem;
    text-align: right;
    margin-top: 2rem;
    color: var(--deep-burgundy);
}

/* Video Modal */
.video-modal-content {
    max-width: 90%;
    width: min(800px, 100%);
    max-height: 90vh;
    background: var(--warm-cream);
    border: 3px solid var(--rose-pink);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: var(--deep-burgundy);
    cursor: pointer;
    transition: transform 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.2);
}

.video-container {
    padding: 2rem;
    text-align: center;
    flex: 1;
    overflow: auto;
}

.video-container video {
    width: 100%;
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(107, 45, 74, 0.3);
    object-fit: contain;
}

.video-placeholder {
    margin-top: 1rem;
    color: var(--dark-burgundy);
    font-style: italic;
}

/* Message Form Section */
.message-form-section {
    padding: 5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
}

.form-container {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(107, 45, 74, 0.2);
    border: 3px solid var(--rose-pink);
}

.form-subtitle {
    text-align: center;
    font-size: 1.3rem;
    color: var(--dark-burgundy);
    margin-bottom: 2.5rem;
    font-style: italic;
}

.message-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-size: 1.8rem;
    color: var(--deep-burgundy);
    margin-bottom: 1rem;
    text-align: center;
}

.message-textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--rose-pink);
    border-radius: 15px;
    background: var(--warm-cream);
    color: var(--deep-burgundy);
    font-family: 'Crimson Text', serif;
    resize: vertical;
    min-height: 200px;
    transition: all 0.3s ease;
    line-height: 1.8;
}

.message-textarea:focus {
    outline: none;
    border-color: var(--deep-burgundy);
    box-shadow: 0 0 20px rgba(139, 74, 107, 0.3);
    background: white;
}

.message-textarea::placeholder {
    color: var(--dark-burgundy);
    opacity: 0.6;
    font-style: italic;
}

.submit-message-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--deep-burgundy) 0%, var(--dark-burgundy) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(107, 45, 74, 0.3);
    margin-top: 1rem;
}

.submit-message-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 45, 74, 0.4);
}

.submit-message-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-message-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-status {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
    min-height: 1.5rem;
    transition: all 0.3s ease;
}

.form-status.success {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border: 2px solid rgba(76, 175, 80, 0.3);
}

.form-status.error {
    background: rgba(211, 47, 47, 0.1);
    color: #c62828;
    border: 2px solid rgba(211, 47, 47, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .giant-heart {
        font-size: 10rem;
    }

    .heart-hint {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .main-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 3rem;
    }

    .timeline-marker {
        left: 20px;
    }

    .timeline-content {
        width: 100%;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
    }

    .valentine-card {
        width: 90%;
        max-width: 350px;
        height: 450px;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 2rem;
    }

    .message-form-section {
        padding: 3rem 1.5rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
    }

    .form-label {
        font-size: 1.5rem;
    }

    .message-textarea {
        font-size: 1rem;
        min-height: 150px;
    }

    .submit-message-btn {
        font-size: 1.3rem;
        padding: 1rem 1.5rem;
    }
}

