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

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #333;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.main-title {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    color: #8b4a6b;
    margin-bottom: 1rem;
    text-align: center;
}

/* Love Letter Opening Animation */
.love-letter-opening {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: opacity 0.8s ease;
    cursor: pointer;
}

.letter-envelope {
    position: relative;
    width: 300px;
    height: 200px;
    animation: envelopeFloat 3s ease-in-out infinite;
}

.envelope-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.envelope-flap {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(45deg, #ff8e8e, #ff6b6b);
    border-radius: 10px 10px 0 0;
    transform-origin: bottom;
    animation: envelopeOpen 2s ease-in-out 1s forwards;
}

.letter-paper-opening {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 150px;
    background: #fefefe;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: letterAppear 1.5s ease-in-out 3s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
}

.letter-content-opening {
    text-align: center;
    padding: 1rem;
}

.letter-greeting {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    color: #8b4a6b;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.letter-text {
    font-family: 'Dancing Script', cursive;
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
}

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

@keyframes envelopeOpen {
    0% {
        transform: rotateX(0deg);
    }
    100% {
        transform: rotateX(-180deg);
    }
}

@keyframes letterAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Intro Sequence */
.intro-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.intro-sequence.hidden {
    display: none;
}

.intro-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s ease;
}

.intro-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 2rem;
}

.slide-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.slide-text {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
}

.enter-button {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Playfair Display', serif;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.enter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.intro-progress {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Main Application */
.main-app {
    min-height: 100vh;
    transition: opacity 0.5s ease;
}

.main-app.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Navigation */
.main-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: #8b4a6b;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-item {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    color: #666;
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    transform: translateY(-2px);
}

/* Sections */
.section {
    display: none;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section.active {
    display: block;
    animation: fadeInUp 0.6s ease;
}

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-description {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Home Section */
.home-content {
    text-align: center;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.home-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.home-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.home-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #8b4a6b;
}

/* Photo Wall */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.photo-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-overlay {
    transform: translateY(0);
}

/* Timeline */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 15px;
    height: 15px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 15px;
    width: 2px;
    height: calc(100% + 1rem);
    background: linear-gradient(to bottom, #ff6b6b, #ff8e8e);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    color: #8b4a6b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.timeline-description {
    color: #666;
    line-height: 1.6;
}

/* Love Letter */
.love-letter-container {
    max-width: 600px;
    margin: 0 auto;
}

.letter-paper {
    background: #fefefe;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid #e0e0e0;
}

.letter-paper::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #ff6b6b, #ff8e8e);
}

.letter-content {
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
    line-height: 1.8;
    color: #333;
    min-height: 400px;
}


/* Quiz */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-question {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quiz-options {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.quiz-option {
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid transparent;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.quiz-option.selected {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
}

/* Games */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Buttons */
.add-event-btn,
.edit-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
}

.add-event-btn:hover,
.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: #ff6b6b;
}

/* Forms */
input, textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

button[type="submit"] {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Game Containers */
.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-container.hidden {
    display: none;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 800px;
    margin-bottom: 2rem;
}

.game-header h3 {
    color: white;
    font-size: 2rem;
}

.close-game {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.game-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

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

.heart {
    position: absolute;
    color: #ff6b6b;
    font-size: 1.5rem;
    animation: float 6s infinite linear;
    opacity: 0.7;
}

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

.sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sparkle {
    position: absolute;
    color: #ffd700;
    font-size: 1rem;
    animation: sparkle 3s infinite;
    opacity: 0;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .home-grid {
        grid-template-columns: 1fr;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .letter-paper {
        padding: 2rem;
    }
    
    .letter-content {
        font-size: 1.1rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

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