@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --primary: #2d1b3d;
    --secondary: #8b4567;
    --accent: #d4a574;
    --light: #f5e6d3;
    --text: #1a1a1a;
    --bg: #0a0515;
    --card-bg: #faf8f5;
}

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

}

.pacifico-regular {
  font-family: "Pacifico", cursive;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Myfont';
  src: url('Myfont-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}


body {
    font-family: 'Myfont', Arial, sans-serif;
    font-size: 30px !important;
    background: var(--bg);
    color: white;
    overflow: hidden;
}

/* Main Constellation Map */
.constellation-map {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

#starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-title {
    position: absolute;
    top: 20px;
    margin-bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    animation: fadeInDown 1s ease-out;
}

.page-title h1 {
    font-family: "Pacifico", cursive;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 300;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(212, 165, 116, 0.5);
}

.page-title p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-style: italic;
    opacity: 0.8;
}

/* Memory Counter */
.memory-counter {
    position: absolute;
    margin-top: 2rem;
    bottom: 20px;
    left: 40%;
    transform: translateX(-50%);
    z-index: 100;
    padding: 15px 35px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    animation: fadeInUp 1s ease-out 0.5s both;
}

#unlocked-count {
    font-weight: 600;
    color: var(--accent);
    font-size: 1.3em;
}

/* Memory Points */
.memory-point {
    position: absolute;
    z-index: 50;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 1s ease-out both;
}

/* Major stars - larger */
.memory-point.major .star-icon {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
}

.memory-point.major .star-glow {
    width: 80px;
    height: 80px;
}

/* Small stars - smaller */
.memory-point.small .star-icon {
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
}

.memory-point.small .star-glow {
    width: 40px;
    height: 40px;
}

.memory-point:nth-child(4) { animation-delay: 0.1s; }
.memory-point:nth-child(5) { animation-delay: 0.2s; }
.memory-point:nth-child(6) { animation-delay: 0.3s; }
.memory-point:nth-child(7) { animation-delay: 0.4s; }
.memory-point:nth-child(8) { animation-delay: 0.5s; }
.memory-point:nth-child(9) { animation-delay: 0.6s; }
.memory-point:nth-child(10) { animation-delay: 0.7s; }
.memory-point:nth-child(11) { animation-delay: 0.8s; }
.memory-point:nth-child(12) { animation-delay: 0.9s; }
.memory-point:nth-child(13) { animation-delay: 1s; }
.memory-point:nth-child(14) { animation-delay: 1.1s; }
.memory-point:nth-child(15) { animation-delay: 1.2s; }
.memory-point:nth-child(16) { animation-delay: 1.3s; }

.star-glow {
    position: absolute;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.star-icon {
    position: relative;
    background: rgb(139, 69, 103);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.memory-point:hover .star-icon {
    transform: scale(1.15);
    background: rgba(139, 69, 103, 0.5);
    box-shadow: 0 0 30px var(--accent);
}

.memory-label {
    position: absolute;
    top: calc(100% + 30px);  /* Changed from 10px to 15px for more spacing */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    margin-top: 5px;  /* Add this line for extra spacing */
}

.memory-point:hover .memory-label {
    opacity: 1;
}

.lock-icon {
    position: absolute;
    top: -8px;  /* Adjusted for star shape */
    right: 5px;  /* Adjusted for star shape */
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.memory-point.unlocked .lock-icon {
    opacity: 0;
    transform: scale(0);
}

.memory-point.unlocked .star-icon {
    background: rgba(235, 195, 152, 0.607);
    border-color: var(--accent);
    animation: unlockGlow 0.6s ease-out;
}

.memory-point.final-memory.locked .star-icon {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* Constellation Lines */
.constellation-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.connection-line {
    stroke: var(--accent);
    stroke-width: 0.4;
    opacity: 0.2;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s ease-out forwards;
    animation-delay: 1.5s;
}

.connection-line.small-line {
    stroke-width: 1;
    opacity: 0.15;
}

/* Home Button */
.home-btn {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 200;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.home-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Music Toggle Button */
.music-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 200;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.music-toggle.muted .music-icon::after {
    content: '🔇';
}

/* Memory Modal */
.memory-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    overflow-y: auto;
}

.memory-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
    margin: 50px 0;
}

.memory-modal.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    color: var(--text);
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.memory-content-wrapper {
    max-height: 90vh;
    overflow-y: auto;
    padding: 50px;
}

/* Scrollbar styling */
.memory-content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.memory-content-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.memory-content-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

/* Memory Detail Styles */
.memory-detail {
    color: var(--text);
}

.memory-header {
    text-align: center;
    margin-bottom: 40px;
}

.memory-icon-large {
    font-size: 4rem;
    margin-bottom: 20px;
}

.memory-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    margin-bottom: 10px;
    color: var(--primary);
}

.memory-date {
    font-size: 1.1rem;
    color: var(--secondary);
    font-style: italic;
}

/* Unlock Challenges */
.unlock-challenge {
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5b7 100%);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.challenge-text {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
    font-weight: 600;
}

.choice-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.choice-btn {
    padding: 15px 25px;
    background: white;
    border: 2px solid var(--accent);
    border-radius: 15px;
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.choice-btn.correct {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.choice-btn.incorrect {
    background: #f44336;
    color: white;
    border-color: #f44336;
    animation: shake 0.5s;
}

.input-unlock {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.unlock-input {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid var(--accent);
    border-radius: 50px;
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    text-align: center;
}

.unlock-submit-btn {
    padding: 15px 35px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap;
}

.unlock-submit-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.feedback-message {
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 30px;
}

.feedback-message.success {
    color: #4CAF50;
}

.feedback-message.error {
    color: #f44336;
}

/* Drag and Sort */
.drag-sort-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.sortable-item {
    padding: 15px 20px;
    background: white;
    border: 2px solid var(--accent);
    border-radius: 10px;
    cursor: move;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.sortable-item:hover {
    background: #f5f5f5;
    transform: translateX(5px);
}

.sortable-item.dragging {
    opacity: 0.5;
}

.drag-handle {
    font-size: 1.5rem;
    color: var(--secondary);
}

/* Matching Game */
.matching-game {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.match-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-item {
    padding: 15px 20px;
    background: white;
    border: 2px solid var(--accent);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.match-item:hover {
    background: var(--light);
    transform: scale(1.05);
}

.match-item.selected {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.match-item.matched {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    pointer-events: none;
}

/* Pumpkin Finding Game */
.pumpkin-field {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.pumpkin-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.pumpkin-item:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.5);
}

.pumpkin-item.clicked {
    animation: pumpkinPop 0.4s ease-out;
}

.pumpkin-item.found-pumpkin {
    font-size: 2.5rem;
    animation: pumpkinFound 0.6s ease-out;
}

.game-score {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 15px;
}

/* Slider Unlock */
.slider-unlock {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.nervousness-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    margin: 20px 0;
}

.nervousness-slider::-webkit-slider-thumb {
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
}

.slider-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Counter Game */
.counter-game {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.counter-btn {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.counter-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.counter-display {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 100px;
    text-align: center;
}

/* Image Carousel */
/* Image Carousel */
.image-carousel {
    margin-bottom: 40px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    height: 500px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    cursor: pointer;
}

/* Gradient variations for placeholders */
.gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gradient-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(139, 69, 103, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--secondary);
    transform: scale(1.3);
}

/* Memory Story Content */
.memory-story {
    animation: fadeInUp 0.6s ease-out;
}

.unlocked-content {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.story-text {
    font-size: 1.2rem;
    line-height: 1.9;
}

.story-text p {
    margin-bottom: 25px;
}

.memory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-box {
    background: var(--light);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border-left: 4px solid var(--accent);
}

.stat-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.stat-text {
    font-size: 1rem;
    color: var(--text);
}

.concert-moments,
.date-highlights,
.family-notes,
.maryland-memories,
.ice-skating-stats {
    background: var(--light);
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
}

.concert-moments h4,
.date-highlights h4,
.maryland-memories h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.concert-moments ul,
.maryland-memories ul {
    list-style: none;
    padding: 0;
}

.concert-moments li,
.maryland-memories li {
    padding: 10px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.concert-moments li:last-child,
.maryland-memories li:last-child {
    border-bottom: none;
}

.date-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
}

.highlight-item {
    text-align: center;
}

.highlight-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.highlight-item p {
    font-size: 1rem;
    color: var(--secondary);
    margin: 0;
}

.family-notes p,
.ice-skating-stats .stat {
    padding: 10px 0;
    font-size: 1.1rem;
}

.anniversary-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-top: 30px;
    color: white;
}

.anniversary-box h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.big-date {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent);
    margin: 20px 0;
}

/* Valentine Letter */
.valentine-letter {
    max-width: 800px;
    margin: 0 auto;
}

.letter-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    line-height: 1.9;
}

.letter-content p {
    margin-bottom: 25px;
}

.opening {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--secondary);
}

.highlight {
    background: linear-gradient(120deg, #f5e6d3 0%, #f5e6d3 100%);
    background-repeat: no-repeat;
    background-size: 100% 40%;
    background-position: 0 80%;
    padding: 5px 0;
    font-weight: 600;
    font-style: italic;
}

.closing {
    font-style: italic;
    margin-top: 40px;
}

.signature {
    text-align: right;
    margin-top: 20px;
}

.signature-heart {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--secondary);
}

/* Final Stats */
.our-stats {
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 20px;
    color: white;
}

.our-stats h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
}

.stat-grid-final {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat {
    text-align: center;
}

.stat-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--accent);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.final-message {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-top: 40px;
}

.final-message p {
    font-size: 1.3rem;
    line-height: 1.8;
    font-style: italic;
    margin: 0;
}

/* Progress for final unlock */
.unlock-progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px auto;
}

.progress-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes unlockGlow {
    0% {
        box-shadow: 0 0 0 var(--accent);
    }
    50% {
        box-shadow: 0 0 30px var(--accent);
    }
    100% {
        box-shadow: 0 0 10px var(--accent);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes pumpkinPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes pumpkinFound {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.5) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        top: 30px;
    }
    
    .memory-counter {
        bottom: 20px;
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    .memory-content-wrapper {
        padding: 30px 20px;
    }
    
    .choice-buttons {
        grid-template-columns: 1fr;
    }
    
    .matching-game {
        grid-template-columns: 1fr;
    }
    
    .pumpkin-field {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .letter-content {
        padding: 30px 20px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .carousel-btn.prev {
        left: 10px;
    }
    
    .carousel-btn.next {
        right: 10px;
    }
    
    .input-unlock {
        flex-direction: column;
    }
}

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

/* Heart Catching Game */
.heart-catching-game {
    position: relative;
    margin: 20px 0;
}

.game-area {
    position: relative;
    height: 400px;
    background: linear-gradient(180deg, #fef9f5 0%, #f5e6d3 100%);
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid var(--accent);
}

.game-score {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.basket {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    cursor: grab;
    user-select: none;
    z-index: 10;
    transition: transform 0.1s ease;
}

.basket:active {
    cursor: grabbing;
}

.falling-heart {
    position: absolute;
    font-size: 2rem;
    user-select: none;
    pointer-events: none;
    animation: heartFall linear;
    z-index: 5;
}

@keyframes heartFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(360deg);
        opacity: 0.8;
    }
}

.heart-caught-effect {
    position: absolute;
    font-size: 3rem;
    animation: heartPop 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 15;
}

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

.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.game-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.game-modal .modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.game-modal h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 10px;
}

/* Fullscreen image viewer */
.fullscreen-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fullscreen-viewer.active {
    opacity: 1;
    pointer-events: all;
}

.fullscreen-viewer img,
.fullscreen-viewer .fullscreen-placeholder {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.fullscreen-placeholder {
    width: 80%;
    height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.fullscreen-placeholder .placeholder-icon {
    font-size: 8rem;
    margin-bottom: 2rem;
}

.fullscreen-placeholder .placeholder-text {
    font-size: 2rem;
    font-weight: 600;
}

.fullscreen-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 10001;
}

.fullscreen-close:hover {
    transform: scale(1.1);
    background: #f0f0f0;
}

/* Make carousel slides clickable */
.carousel-slide {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.carousel-slide:hover {
    transform: scale(1.02);
}


/* Fullscreen viewer styles */
.fullscreen-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fullscreen-viewer.active {
    opacity: 1;
    pointer-events: all;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#fullscreen-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#fullscreen-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
}

.memory-card-game {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
}

.memory-card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #fff8f0 0%, #f5e6d3 100%);
    border: 3px solid var(--accent);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    transform-style: preserve-3d;
}

.memory-card:hover:not(.flipped):not(.matched) {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.memory-card.flipped {
    background: white;
    border-color: var(--secondary);
}

.memory-card.matched {
    background: #4CAF50;
    border-color: #4CAF50;
    cursor: default;
    animation: matchPulse 0.5s ease;
}

.memory-card .card-back {
    display: block;
}

.memory-card .card-front {
    display: none;
}

.memory-card.flipped .card-back {
    display: none;
}

.memory-card.flipped .card-front {
    display: block;
}

@keyframes matchPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes cardShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.memory-card.wrong {
    animation: cardShake 0.3s ease;
}