/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #ffe0ec 0%, #f9f6ff 100%);
    color: #4a148c;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s, color 0.5s;
    line-height: 1.6;
}

body.dark {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    color: #fff;
}

/* Dark Mode Toggle */
#dark-toggle {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 100;
    background: #fff0f7;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    box-shadow: 0 2px 8px #c2185b22;
    cursor: pointer;
    transition: all 0.3s ease;
}

#dark-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px #c2185b44;
}

body.dark #dark-toggle {
    background: #232526;
    color: #ffe0ec;
}

/* Music Toggle Button */
#music-toggle {
    position: fixed;
    top: 12px;
    right: 62px;
    z-index: 100;
    background: #fff0f7;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    box-shadow: 0 2px 8px #c2185b22;
    cursor: pointer;
    transition: all 0.3s ease;
}

#music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px #c2185b44;
}

#music-toggle.playing {
    animation: musicPlaying 1.5s infinite ease-in-out;
}

#music-toggle.paused {
    animation: none;
    opacity: 0.6;
}

body.dark #music-toggle {
    background: #232526;
    color: #ffe0ec;
}

body.dark #music-toggle.paused {
    opacity: 0.4;
}

@keyframes musicPlaying {
    0% { 
        transform: scale(1);
        box-shadow: 0 2px 8px #c2185b22;
        background: #fff0f7;
    }
    25% { 
        transform: scale(1.05);
        box-shadow: 0 4px 12px #c2185b44;
        background: #ffe0ec;
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 6px 16px #c2185b66;
        background: #ffd0e0;
    }
    75% { 
        transform: scale(1.05);
        box-shadow: 0 4px 12px #c2185b44;
        background: #ffe0ec;
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px #c2185b22;
        background: #fff0f7;
    }
}

body.dark #music-toggle.playing {
    animation: musicPlayingDark 1.5s infinite ease-in-out;
}

@keyframes musicPlayingDark {
    0% { 
        transform: scale(1);
        box-shadow: 0 2px 8px #ff7eb322;
        background: #232526;
    }
    25% { 
        transform: scale(1.05);
        box-shadow: 0 4px 12px #ff7eb344;
        background: #2c2c2c;
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 6px 16px #ff7eb366;
        background: #333333;
    }
    75% { 
        transform: scale(1.05);
        box-shadow: 0 4px 12px #ff7eb344;
        background: #2c2c2c;
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px #ff7eb322;
        background: #232526;
    }
}

/* Password Gate */
#password-gate {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #f8bbd0 0%, #fce4ec 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s;
}

.password-gate-box {
    background: linear-gradient(120deg, #fff0f7 60%, #ffe0ec 100%);
    padding: 40px 30px;
    border-radius: 18px;
    box-shadow: 0 8px 32px #ff7eb355, 0 1.5px 0 #ff7eb3;
    text-align: center;
    border: 2px solid #ff7eb3;
    animation: popIn 0.7s;
    max-width: 90vw;
    width: 400px;
}

.password-gate-box h2 {
    margin-bottom: 20px;
    color: #c2185b;
}

.password-gate-box input {
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #c2185b;
    margin-bottom: 15px;
    width: 100%;
    font-size: 16px;
    transition: all 0.3s ease;
}

.password-gate-box input:focus {
    outline: none;
    border-color: #ff7eb3;
    background: #fff0f7;
    box-shadow: 0 0 0 3px #ff7eb322;
}

.password-gate-box button {
    padding: 12px 32px;
    border-radius: 8px;
    border: none;
    background: #c2185b;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.password-gate-box button:hover {
    background: #ad1457;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px #c2185b44;
}

.password-gate-box button:active {
    transform: translateY(0);
}

.password-hint {
    font-size: 0.9em;
    color: #888;
    display: block;
    margin-top: 10px;
}

.error-message {
    color: #d32f2f;
    font-weight: 500;
    margin-top: 10px;
    display: none;
}

/* WhatsApp Contact */
.whatsapp-contact {
    margin: 15px 0;
    padding: 12px 16px;
    background: linear-gradient(120deg, #fff0f7 60%, #ffe0ec 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px #ff7eb322, 0 1.5px 0 #ff7eb3;
    border: 2px solid #ff7eb3;
    transition: all 0.3s ease;
}

.whatsapp-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px #ff7eb344;
}

.whatsapp-contact p {
    margin: 0;
    color: #c2185b;
    font-size: 0.95em;
    font-weight: 500;
}

.whatsapp-btn {
    display: inline-block;
    background: #c2185b;
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    margin-left: 8px;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9em;
}

.whatsapp-btn:hover {
    background: #ad1457;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px #c2185b44;
}

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

.whatsapp-btn span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Dark mode support for WhatsApp */
body.dark .whatsapp-contact {
    background: linear-gradient(120deg, #232526 60%, #2c2c2c 100%);
    border-color: #ff7eb3;
    box-shadow: 0 4px 12px #ff7eb322, 0 1.5px 0 #ff7eb3;
}

body.dark .whatsapp-contact p {
    color: #ffe0ec;
}

body.dark .whatsapp-btn {
    background: #c2185b;
    color: #fff;
}

body.dark .whatsapp-btn:hover {
    background: #ad1457;
}

/* Animations */
@keyframes popIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

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

@keyframes sectionPop {
    0% { transform: scale(0.98) translateY(30px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Main Content */
#main-content {
    animation: fadeIn 1.2s;
}

/* Sections */
.section {
    margin: 32px auto 0 auto;
    max-width: 900px;
    padding: 24px 8px;
    background: #fff6;
    border-radius: 18px;
    box-shadow: 0 4px 32px #ff7eb322, 0 1.5px 0 #ff7eb3;
    position: relative;
    transition: opacity 0.7s, transform 0.7s;
    border: 2px solid #ff7eb3;
    animation: sectionPop 0.8s;
}

body.dark .section {
    background: #232526e6;
    border-color: #ff7eb3;
}

.section[style*='display:none'] {
    opacity: 0;
    pointer-events: none;
    transform: translateY(40px) scale(0.98);
}

.section.fade-in {
    opacity: 1;
    transform: none;
}

/* Typography */
.fade-in {
    opacity: 0;
    animation: fadeIn 1.2s forwards;
}

.typewriter {
    overflow: hidden;
    border-right: 0.15em solid #c2185b;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.08em;
    animation: typing 2.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    50% { border-color: transparent; }
}

.slide-in {
    opacity: 0;
    transform: translateY(30px);
    animation: slideIn 1.2s 0.7s forwards;
}

@keyframes slideIn {
    to { opacity: 1; transform: none; }
}

/* Buttons */
.scroll-btn, .proposal-btn, #send-secret, #compliment-btn, #shuffle-memories, #quiz-btn, #funfact-btn, #motd-btn, #memory-quiz-btn {
    margin-top: 24px;
    padding: 12px 32px;
    border-radius: 8px;
    border: 2px solid #ff7eb3;
    background: #c2185b;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px #ff7eb322;
    letter-spacing: 0.03em;
    font-weight: 500;
    margin-bottom: 10px;
}

.scroll-btn:hover, .proposal-btn:hover, #compliment-btn:hover, #shuffle-memories:hover, #quiz-btn:hover, #funfact-btn:hover, #motd-btn:hover, #memory-quiz-btn:hover {
    background: #ad1457;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px #ff7eb344;
}

.scroll-btn:focus, .proposal-btn:focus, #compliment-btn:focus, #shuffle-memories:focus, #quiz-btn:focus, #funfact-btn:focus, #motd-btn:focus, #memory-quiz-btn:focus {
    outline: 2px solid #ff7eb3;
    background: #fff0f7;
    color: #c2185b;
}

.scroll-btn:active, .proposal-btn:active, #compliment-btn:active, #shuffle-memories:active, #quiz-btn:active, #funfact-btn:active, #motd-btn:active, #memory-quiz-btn:active {
    transform: scale(0.96);
    background: #ff7eb3;
}

/* Reasons List */
.reasons-list {
    list-style: none;
    padding: 0;
    margin: 32px 0;
}

.reasons-list li {
    opacity: 0;
    transform: translateY(30px);
    background: #f8bbd0;
    margin: 12px 0;
    padding: 16px 18px;
    border-radius: 12px;
    font-size: 1.1em;
    box-shadow: 0 2px 8px #c2185b11;
    transition: all 0.5s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.reasons-list li:hover {
    border-color: #ff7eb3;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px #c2185b22;
}

.reasons-list li.revealed {
    opacity: 1;
    transform: none;
    background: #fff;
    border-color: #ff7eb3;
}

body.dark .reasons-list li {
    background: #232526;
    color: #fff;
}

body.dark .reasons-list li.revealed {
    background: #2d2d2d;
}

/* Timeline Section */
.timeline {
    position: relative;
    margin: 40px 0;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #ff7eb3, #c2185b);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin: 30px 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: #fff;
    border: 4px solid #ff7eb3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px #ff7eb344;
}

.timeline-item:hover .timeline-marker {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px #ff7eb366;
}

.timeline-content {
    width: 45%;
    background: #fff0f7;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #ff7eb3;
    box-shadow: 0 4px 16px #ff7eb322;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px #ff7eb344;
}

.timeline-content h3 {
    color: #c2185b;
    margin-bottom: 8px;
    font-size: 1.2em;
}

.timeline-date {
    color: #888;
    font-style: italic;
    margin-bottom: 12px;
}

.timeline-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ff7eb3;
}

.timeline-feeling {
    margin-top: 10px;
    font-weight: 500;
    color: #c2185b;
    font-style: italic;
}

body.dark .timeline-content {
    background: #2d2d2d;
    color: #fff;
}

/* Love Story Section */
.story-chapters {
    margin: 30px 0;
}

.story-chapter {
    background: #fff0f7;
    border: 2px solid #ff7eb3;
    border-radius: 12px;
    margin: 20px 0;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px #ff7eb322;
}

.story-chapter:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px #ff7eb344;
}

.story-chapter h3 {
    color: #c2185b;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.chapter-preview {
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

.chapter-full {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ff7eb3;
}

.story-quote {
    margin-top: 15px;
    padding: 15px;
    background: #ffe0ec;
    border-left: 4px solid #c2185b;
    border-radius: 8px;
    font-style: italic;
    color: #c2185b;
    font-weight: 500;
}

.story-feeling {
    margin-top: 12px;
    padding: 10px 15px;
    background: #fff0f7;
    border: 2px solid #ff7eb3;
    border-radius: 8px;
    font-weight: 500;
    color: #c2185b;
    font-style: italic;
    display: inline-block;
}

body.dark .story-chapter {
    background: #2d2d2d;
    color: #fff;
}

body.dark .story-quote {
    background: #232526;
    color: #ff7eb3;
}

body.dark .story-feeling {
    background: #232526;
    color: #ff7eb3;
    border-color: #ff7eb3;
}

/* Dreams Section */
.dreams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.dream-card {
    background: #fff0f7;
    border: 2px solid #ff7eb3;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px #ff7eb322;
}

.dream-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px #ff7eb344;
}

.dream-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.dream-card h3 {
    color: #c2185b;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.dream-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ff7eb3;
    text-align: left;
}

.dream-details ul {
    margin-top: 10px;
    padding-left: 20px;
}

.dream-details li {
    margin-bottom: 5px;
    color: #666;
}

body.dark .dream-card {
    background: #2d2d2d;
    color: #fff;
}

/* Poetry Section */
.poetry-container {
    margin: 30px 0;
}

.poem-card {
    background: #fff0f7;
    border: 2px solid #ff7eb3;
    border-radius: 12px;
    margin: 20px 0;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px #ff7eb322;
}

.poem-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px #ff7eb344;
}

.poem-card h3 {
    color: #c2185b;
    margin-bottom: 15px;
    font-size: 1.3em;
    text-align: center;
}

.poem-preview {
    color: #666;
    font-style: italic;
    text-align: center;
    margin-bottom: 10px;
}

.poem-full {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ff7eb3;
    text-align: center;
    line-height: 1.8;
}

.poem-full p {
    margin-bottom: 15px;
    color: #4a148c;
    font-size: 1.1em;
}

body.dark .poem-card {
    background: #2d2d2d;
    color: #fff;
}

body.dark .poem-full p {
    color: #fff;
}

/* Gratitude Section */
.gratitude-messages {
    margin: 30px 0;
}

.gratitude-card {
    background: #fff0f7;
    border: 2px solid #ff7eb3;
    border-radius: 12px;
    margin: 20px 0;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px #ff7eb322;
}

.gratitude-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px #ff7eb344;
}

.gratitude-card h3 {
    color: #c2185b;
    margin-bottom: 15px;
    font-size: 1.3em;
    text-align: center;
}

.gratitude-card p {
    color: #4a148c;
    line-height: 1.7;
    text-align: center;
    font-size: 1.1em;
}

body.dark .gratitude-card {
    background: #2d2d2d;
    color: #fff;
}

body.dark .gratitude-card p {
    color: #fff;
}

/* Gallery */
.memories-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    align-items: center;
    margin: 24px 0 0 0;
    position: relative;
    border-radius: 18px;
    background: linear-gradient(120deg, #fff0f7 60%, #ffe0ec 100%);
    border: 2px solid #ff7eb3;
    padding: 12px 0 18px 0;
}

.memories-gallery canvas {
    background: #fff0f7;
    border-radius: 18px;
    box-shadow: 0 4px 32px #0001;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 340px;
    height: 340px;
    max-width: 98vw;
    max-height: 60vw;
    border: 2px solid #ff7eb3;
}

.memories-gallery canvas:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 32px #ff7eb344;
}

.memories-gallery canvas.memory-highlight {
    border: 4px solid #43a047;
    box-shadow: 0 0 32px #43a04799, 0 0 0 4px #fff inset;
    background: #e8f5e9;
    animation: highlightPulse 1.2s infinite alternate;
}

@keyframes highlightPulse {
    0% { box-shadow: 0 0 32px #43a04799, 0 0 0 4px #fff inset; }
    100% { box-shadow: 0 0 48px #43a047cc, 0 0 0 8px #fff inset; }
}

.gallery-loading {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    text-align: center;
    transform: translateY(-50%);
    z-index: 2;
    font-size: 1.2em;
    color: #c2185b;
    display: none;
}

/* Proposal */
.proposal-box {
    margin: 32px auto;
    text-align: center;
}

.proposal-btn {
    padding: 12px 32px;
    border-radius: 8px;
    border: none;
    background: #4CAF50;
    color: #fff;
    font-size: 1.1em;
    margin: 0 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#yes-btn:hover {
    background: #388e3c;
    transform: scale(1.1);
}

#no-btn {
    position: relative;
    transition: all 0.3s ease;
}

#no-btn.runaway {
    position: relative;
    left: 100px;
    top: -50px;
    transform: rotate(15deg);
}

#proposal-response {
    margin-top: 24px;
    font-size: 1.2em;
    min-height: 1.5em;
    color: #c2185b;
    font-weight: bold;
}

/* YouTube Videos */
.youtube-videos {
    margin: 32px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.youtube-videos iframe {
    border-radius: 12px;
    box-shadow: 0 4px 24px #0002;
    transition: transform 0.3s ease;
}

.youtube-videos iframe:hover {
    transform: scale(1.02);
}

/* Footer */
.footer {
    text-align: center;
    margin: 40px 0 0 0;
    color: #880e4f;
    font-size: 1.1em;
    padding: 20px;
}

.footer-note {
    margin-top: 10px;
    font-size: 0.9em;
    color: #c2185b;
    font-style: italic;
}

/* Floating Hearts */
#hearts-container {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.floating-heart {
    position: absolute;
    font-size: 2.2em;
    animation: floatHeart 3.5s linear forwards;
}

@keyframes floatHeart {
    0% { opacity: 0; transform: translateY(0) scale(1); }
    10% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-120vh) scale(1.5); }
}

/* Image Modal */
.img-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000d;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.img-modal.open {
    display: flex;
}

.img-modal-btn {
    position: absolute;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.img-modal-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.img-modal-btn:active {
    transform: scale(0.95);
}

#img-modal-home {
    left: 2vw;
    top: 2vh;
}

#img-modal-prev {
    left: 4vw;
    top: 50%;
    transform: translateY(-50%);
}

#img-modal-next {
    right: 4vw;
    top: 50%;
    transform: translateY(-50%);
}

#img-modal-close {
    right: 2vw;
    top: 2vh;
}

#img-modal-canvas {
    background: #fff;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 18px;
    box-shadow: 0 8px 32px #0004;
}

/* Anti-capture Overlay */
#anti-capture-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000d;
    pointer-events: all;
}

/* Confetti */
.confetti {
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.confetti-piece {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0.8;
}

/* Instructions */
.instructions {
    color: #c2185b;
    font-size: 1.1em;
    margin-bottom: 18px;
    background: #fff3;
    border-radius: 8px;
    padding: 8px 0;
}

.gallery-instructions {
    text-align: center;
    color: #c2185b;
    font-size: 1.1em;
    margin: 18px 0 0 0;
    background: #fff3;
    border-radius: 8px;
    padding: 8px 0;
}

.step-instructions {
    background: linear-gradient(120deg, #fff0f7 60%, #ffe0ec 100%);
    border: 2px solid #ff7eb3;
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    text-align: center;
    color: #c2185b;
    font-size: 1.1em;
}

/* Popups */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 8px 32px #0004;
    z-index: 10002;
    max-width: 90vw;
    width: 400px;
    border: 2px solid #ff7eb3;
}

#compliment-popup, #funfact-popup {
    text-align: center;
    font-size: 1.2em;
    color: #c2185b;
}

#compliment-popup button, #funfact-popup button {
    margin-top: 20px;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    background: #c2185b;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

#compliment-popup button:hover, #funfact-popup button:hover {
    background: #ad1457;
    transform: translateY(-2px);
}

#compliment-popup button:active, #funfact-popup button:active {
    transform: scale(0.95);
}

/* Help Button */
#help-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #c2185b;
    color: #fff;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px #c2185b44;
}

#help-btn:hover {
    transform: scale(1.1);
    background: #ad1457;
}

/* Help Modal */
#help-modal {
    max-width: 500px;
    width: 90vw;
}

#help-modal h3 {
    color: #c2185b;
    margin-bottom: 20px;
    text-align: center;
}

#help-modal ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

#help-modal li {
    margin-bottom: 10px;
    line-height: 1.6;
}

#help-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #c2185b;
    transition: color 0.3s ease;
}

#help-modal-close:hover {
    color: #ad1457;
}

.help-note {
    font-size: 0.95em;
    color: #888;
    text-align: center;
    font-style: italic;
}

/* Button Rows */
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

/* Textarea */
#secret-message {
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    padding: 12px;
    border: 2px solid #c2185b;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    transition: all 0.3s ease;
}

#secret-message:focus {
    outline: none;
    border-color: #ff7eb3;
    box-shadow: 0 0 0 3px #ff7eb322;
}

#secret-confirm {
    margin-top: 16px;
    color: #43a047;
    font-weight: bold;
}

/* Quiz Styles */
.quiz-q {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #c2185b;
    font-weight: 500;
}

.quiz-a {
    display: block;
    padding: 12px 16px;
    margin: 8px 0;
    background: #f8bbd0;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-a:hover {
    background: #ff7eb3;
    border-color: #c2185b;
    transform: translateX(5px);
}

.quiz-a.selected {
    background: #c2185b;
    color: #fff;
    border-color: #ff7eb3;
}

/* Responsive Design */
@media (max-width: 700px) {
    .section {
        padding: 16px 4vw;
        margin: 16px 2vw;
        min-height: 80vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .section h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .section h2 {
        font-size: 1.6em;
        margin-bottom: 18px;
    }
    
    .section h3 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }
    
    .memories-gallery {
        padding: 8px 0 12px 0;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .memories-gallery canvas {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        min-width: 120px;
        min-height: 120px;
        max-width: 100%;
        max-height: 100%;
    }
    
    #img-modal-canvas {
        width: 95vw !important;
        height: 60vw !important;
    }
    
    .footer {
        font-size: 0.9em;
        padding: 15px;
        text-align: center;
    }
    
    #dark-toggle {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    #music-toggle {
        top: 12px;
        right: 62px;
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .btn-row {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .btn-row button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 12px 20px;
        font-size: 1em;
    }
    
    .youtube-videos {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .youtube-videos iframe {
        width: 100%;
        max-width: 360px;
        height: 200px;
    }
    
    .popup {
        width: 95vw;
        padding: 20px;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .password-gate-box {
        padding: 30px 20px;
        margin: 20px;
        width: 90vw;
        max-width: 400px;
    }
    
    /* Timeline responsive */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        margin-left: 60px;
        margin-bottom: 25px;
    }
    
    .timeline-marker {
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 40px;
        padding: 15px;
    }
    
    .timeline-content h3 {
        font-size: 1.1em;
    }
    
    /* Dreams grid responsive */
    .dreams-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dream-card {
        padding: 20px;
    }
    
    /* Story chapters responsive */
    .story-chapters {
        margin: 20px 0;
    }
    
    .story-chapter {
        margin: 15px 0;
        padding: 15px;
    }
    
    .story-chapter h3 {
        font-size: 1.2em;
    }
    
    /* Poetry responsive */
    .poetry-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .poem-card {
        padding: 15px;
    }
    
    /* Gratitude responsive */
    .gratitude-messages {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .gratitude-card {
        padding: 15px;
    }
    
    /* Reasons list responsive */
    .reasons-list {
        margin: 20px 0;
    }
    
    .reasons-list li {
        padding: 12px 15px;
        margin: 10px 0;
        font-size: 0.95em;
    }
    
    /* Step instructions responsive */
    .step-instructions {
        font-size: 0.9em;
        padding: 12px 15px;
        margin: 15px 0;
    }
    
    /* Navigation buttons */
    .navigation-buttons {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 20px 0;
        gap: 10px;
    }
    
    .nav-btn {
        padding: 10px 20px;
        font-size: 0.9em;
        min-width: 80px;
    }
    
    .nav-btn.back {
        background: #ff7eb3;
    }
    
    .nav-btn.next {
        background: #c2185b;
    }
    
    /* Welcome message */
    .welcome-message {
        text-align: center;
        padding: 30px 20px;
        background: linear-gradient(135deg, #ffe0ec 0%, #f9f6ff 100%);
        border-radius: 15px;
        margin: 20px 0;
        box-shadow: 0 4px 16px #ff7eb322;
    }
    
    .welcome-message h2 {
        color: #c2185b;
        margin-bottom: 15px;
        font-size: 1.8em;
    }
    
    .welcome-message p {
        font-size: 1.1em;
        line-height: 1.6;
        margin-bottom: 20px;
    }
    
    /* Progress indicator */
    .progress-indicator {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 20px 0;
        gap: 8px;
    }
    
    .progress-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: #ff7eb3;
        opacity: 0.3;
        transition: all 0.3s ease;
    }
    
    .progress-dot.active {
        opacity: 1;
        background: #c2185b;
        transform: scale(1.2);
    }
    
    .progress-dot.completed {
        opacity: 0.7;
        background: #ff7eb3;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .section {
        padding: 12px 3vw;
        margin: 12px 1vw;
    }
    
    .section h1 {
        font-size: 1.6em;
    }
    
    .section h2 {
        font-size: 1.4em;
    }
    
    .btn-row button {
        padding: 10px 16px;
        font-size: 0.9em;
    }
    
    .memories-gallery {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .password-gate-box {
        padding: 25px 15px;
        margin: 15px;
    }
    
    .welcome-message {
        padding: 25px 15px;
    }
    
    .welcome-message h2 {
        font-size: 1.6em;
    }
    
    .welcome-message p {
        font-size: 1em;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #c2185b;
    border-radius: 4px;
}

body.dark ::-webkit-scrollbar-thumb {
    background: #ff7eb3;
}

/* Placeholder Styling */
::-webkit-input-placeholder { color: #c2185b99; }
::-moz-placeholder { color: #c2185b99; }
:-ms-input-placeholder { color: #c2185b99; }
::placeholder { color: #c2185b99; }

/* Focus Styles for Accessibility */
button:focus, input:focus, textarea:focus {
    outline: 2px solid #ff7eb3;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    #password-gate, #dark-toggle, #music-toggle, #help-btn, .img-modal, .popup {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .section {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* Popup Close Buttons */
.popup button,
#quiz-close,
#memory-quiz-close,
#compliment-popup button,
#funfact-popup button,
#help-modal-close {
    display: inline-block;
    margin: 18px auto 0 auto;
    padding: 10px 28px;
    border-radius: 24px;
    border: none;
    background: linear-gradient(90deg, #ff7eb3 0%, #c2185b 100%);
    color: #fff;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 2px 8px #c2185b22;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    outline: none;
}

.popup button:hover,
#quiz-close:hover,
#memory-quiz-close:hover,
#compliment-popup button:hover,
#funfact-popup button:hover,
#help-modal-close:hover {
    background: linear-gradient(90deg, #c2185b 0%, #ff7eb3 100%);
    transform: scale(1.07);
    box-shadow: 0 4px 16px #ff7eb344;
}

.popup button:focus,
#quiz-close:focus,
#memory-quiz-close:focus,
#compliment-popup button:focus,
#funfact-popup button:focus,
#help-modal-close:focus {
    outline: 2px solid #ff7eb3;
    background: #fff0f7;
    color: #c2185b;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    gap: 15px;
}

.nav-btn {
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 100px;
}

.nav-btn.back {
    background: #ff7eb3;
    color: #fff;
}

.nav-btn.back:hover {
    background: #f06292;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,126,179,0.3);
}

.nav-btn.next {
    background: #c2185b;
    color: #fff;
}

.nav-btn.next:hover {
    background: #ad1457;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194,24,91,0.3);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, #ffe0ec 0%, #f9f6ff 100%);
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 8px 24px #ff7eb322;
    border: 2px solid #ff7eb3;
}

.welcome-message h2 {
    color: #c2185b;
    margin-bottom: 20px;
    font-size: 2.2em;
}

.welcome-message p {
    font-size: 1.2em;
    line-height: 1.7;
    margin-bottom: 25px;
    color: #4a148c;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0;
    gap: 10px;
}

.progress-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ff7eb3;
    opacity: 0.3;
    transition: all 0.3s ease;
    cursor: pointer;
}

.progress-dot.active {
    opacity: 1;
    background: #c2185b;
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(194,24,91,0.3);
}

.progress-dot.completed {
    opacity: 0.8;
    background: #ff7eb3;
    transform: scale(1.1);
}

/* Dark mode support for new elements */
body.dark .welcome-message {
    background: linear-gradient(135deg, #232526 0%, #2c2c2c 100%);
    border-color: #ff7eb3;
    color: #ffe0ec;
}

body.dark .welcome-message h2 {
    color: #ff7eb3;
}

body.dark .welcome-message p {
    color: #ffe0ec;
}

body.dark .nav-btn.back {
    background: #ff7eb3;
    color: #232526;
}

body.dark .nav-btn.next {
    background: #c2185b;
    color: #ffe0ec;
}

/* Contact Form Styles */
.contact-form {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: linear-gradient(135deg, #ffe0ec 0%, #f9f6ff 100%);
    border-radius: 20px;
    box-shadow: 0 8px 24px #ff7eb322;
    border: 2px solid #ff7eb3;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #ff7eb3;
    border-radius: 12px;
    font-size: 1em;
    background: #fff0f7;
    color: #4a148c;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: #c2185b;
    background: #fff;
    box-shadow: 0 0 0 3px #ff7eb322;
    transform: translateY(-2px);
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
    top: -10px;
    left: 15px;
    font-size: 0.85em;
    color: #c2185b;
    background: #fff0f7;
    padding: 0 8px;
    border-radius: 6px;
}

.form-label {
    position: absolute;
    top: 15px;
    left: 20px;
    color: #888;
    font-size: 1em;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(90deg, #ff7eb3 0%, #c2185b 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px #c2185b22;
}

.submit-btn:hover {
    background: linear-gradient(90deg, #c2185b 0%, #ff7eb3 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px #c2185b44;
}

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

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

/* Form Success/Error Messages */
.form-success,
.form-error {
    max-width: 600px;
    margin: 30px auto;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    animation: slideIn 0.5s ease;
}

.form-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.form-error {
    background: linear-gradient(135deg, #ffebee 0%, #fff5f5 100%);
    border: 2px solid #f44336;
    color: #c62828;
}

.form-success h3,
.form-error h3 {
    margin-bottom: 15px;
    font-size: 1.4em;
}

/* Dark mode support for contact form */
body.dark .contact-form {
    background: linear-gradient(135deg, #232526 0%, #2c2c2c 100%);
    border-color: #ff7eb3;
    color: #ffe0ec;
}

body.dark .form-control {
    background: #2d2d2d;
    border-color: #ff7eb3;
    color: #ffe0ec;
}

body.dark .form-control:focus {
    background: #232526;
    border-color: #ff7eb3;
}

body.dark .form-control:focus + .form-label,
body.dark .form-control:not(:placeholder-shown) + .form-label {
    background: #232526;
    color: #ff7eb3;
}

body.dark .form-label {
    color: #ccc;
}

body.dark .form-success {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    border-color: #4caf50;
    color: #e8f5e8;
}

body.dark .form-error {
    background: linear-gradient(135deg, #c62828 0%, #d32f2f 100%);
    border-color: #f44336;
    color: #ffebee;
}

/* Mobile responsive for contact form */
@media (max-width: 700px) {
    .contact-form {
        margin: 20px auto;
        padding: 20px;
        border-radius: 15px;
    }
    
    .form-control {
        padding: 12px 16px;
        font-size: 0.95em;
    }
    
    .form-label {
        font-size: 0.95em;
    }
    
    .submit-btn {
        padding: 12px 24px;
        font-size: 1em;
    }
    
    .form-success,
    .form-error {
        margin: 20px auto;
        padding: 20px;
    }
    
    .form-success h3,
    .form-error h3 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .contact-form {
        padding: 15px;
        margin: 15px auto;
    }
    
    .form-control {
        padding: 10px 14px;
        font-size: 0.9em;
    }
    
    .submit-btn {
        padding: 10px 20px;
        font-size: 0.95em;
    }
}

/* Security and Anti-Screenshot Styles */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Allow text selection only for specific elements */
input, textarea, .form-control {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Prevent screenshots on mobile */
@media screen and (max-width: 768px) {
    body {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    img, canvas, video, iframe {
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -khtml-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        pointer-events: none;
    }
    
    /* Allow interaction with buttons and interactive elements */
    button, .scroll-btn, .proposal-btn, .nav-btn, #dark-toggle, #music-toggle, #help-btn {
        pointer-events: auto;
    }
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #f8bbd0 0%, #fce4ec 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeOut 0.5s ease-in-out 3s forwards;
}

.loading-content {
    text-align: center;
    color: #c2185b;
}

.loading-heart {
    font-size: 4em;
    animation: heartBeat 1.5s infinite ease-in-out;
    margin-bottom: 20px;
}

.loading-content h2 {
    font-size: 1.8em;
    margin-bottom: 30px;
    font-weight: 500;
}

.loading-bar {
    width: 300px;
    height: 8px;
    background: rgba(194, 24, 91, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #c2185b, #ff7eb3);
    border-radius: 4px;
    animation: loadingProgress 3s ease-in-out;
}

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

@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

body.dark #loading-screen {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
}

body.dark .loading-content {
    color: #ffe0ec;
}

body.dark .loading-bar {
    background: rgba(255, 126, 179, 0.2);
}

body.dark .loading-progress {
    background: linear-gradient(90deg, #ff7eb3, #c2185b);
}

/* Mobile responsive for loading screen */
@media (max-width: 700px) {
    .loading-content h2 {
        font-size: 1.4em;
    }
    
    .loading-bar {
        width: 250px;
    }
    
    .loading-heart {
        font-size: 3em;
    }
}

@media (max-width: 480px) {
    .loading-content h2 {
        font-size: 1.2em;
    }
    
    .loading-bar {
        width: 200px;
    }
    
    .loading-heart {
        font-size: 2.5em;
    }
}
