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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe0f0 50%, #ffd4e8 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 105, 180, 0.3);
    transform: rotate(45deg);
    animation: float 15s infinite ease-in-out;
}

.heart::before,
.heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 105, 180, 0.3);
    border-radius: 50%;
}

.heart::before {
    top: -10px;
    left: 0;
}

.heart::after {
    top: 0;
    left: 10px;
}

.heart:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.heart:nth-child(2) { left: 30%; top: 60%; animation-delay: 3s; }
.heart:nth-child(3) { left: 50%; top: 10%; animation-delay: 6s; }
.heart:nth-child(4) { left: 70%; top: 40%; animation-delay: 9s; }
.heart:nth-child(5) { left: 85%; top: 70%; animation-delay: 12s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(45deg) scale(1); opacity: 0.3; }
    50% { transform: translateY(-50px) rotate(45deg) scale(1.2); opacity: 0.6; }
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: gold;
    border-radius: 50%;
    animation: sparkle 3s infinite ease-in-out;
}

.sparkle:nth-child(6) { left: 20%; top: 30%; animation-delay: 0s; }
.sparkle:nth-child(7) { left: 60%; top: 50%; animation-delay: 1s; }
.sparkle:nth-child(8) { left: 80%; top: 20%; animation-delay: 2s; }

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.3);
    max-width: 90%;
    width: 400px;
    animation: modalSlideIn 0.5s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header h2 {
    color: #d63384;
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#nameInput {
    padding: 15px;
    border: 2px solid #ffb3d9;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#nameInput:focus {
    border-color: #ff69b4;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.3);
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    min-height: 20px;
    text-align: center;
}

.magic-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.magic-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.5);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe0f0 50%, #ffd4e8 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.loading-content {
    text-align: center;
}

.magic-circle {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 105, 180, 0.2);
    border-top-color: #ff69b4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: #d63384;
    font-size: 20px;
    font-weight: 600;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Header */
.site-header {
    text-align: center;
    padding: 40px 20px;
}

.site-title {
    font-size: 48px;
    color: #d63384;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.3);
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.3); }
    50% { text-shadow: 2px 2px 20px rgba(255, 105, 180, 0.6); }
}

/* Message Section */
.message-section {
    padding: 40px 20px;
}

.message-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.2);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.message-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #ff69b4, #ffd700, #ff69b4);
    border-radius: 20px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.reveal-animation {
    animation: revealCard 1s ease-out;
}

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

.message-title {
    color: #d63384;
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
}

.message-text {
    color: #555;
    font-size: 18px;
    line-height: 1.8;
    text-align: center;
}

/* Special Section */
.special-section {
    padding: 40px 20px;
}

.section-title {
    color: #d63384;
    font-size: 36px;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
}

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

.special-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.15);
    text-align: center;
    transition: all 0.3s ease;
}

.special-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 105, 180, 0.3);
}

.special-card .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.special-card p {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
}

/* Memories Section */
.memories-section {
    padding: 40px 20px;
}

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

.memory-card {
    text-align: center;
}

.memory-placeholder {
    background: linear-gradient(135deg, #ffe0f0, #ffd4e8);
    height: 200px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.15);
    transition: all 0.3s ease;
}

.memory-card:hover .memory-placeholder {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.25);
}

.memory-icon {
    font-size: 64px;
}

.memory-caption {
    color: #d63384;
    font-size: 16px;
    font-weight: 600;
}

/* Question Section */
.question-section {
    padding: 40px 20px;
}

.question-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.2);
    text-align: center;
}

.question-text {
    font-size: 28px;
    color: #d63384;
    margin-bottom: 30px;
    font-weight: 600;
}

.button-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.answer-button {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.yes-button {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
}

.yes-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.5);
}

.no-button {
    background: linear-gradient(135deg, #ffc0cb, #ffb3d9);
    color: #d63384;
}

.no-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 182, 193, 0.5);
}

.response-message {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    animation: fadeInUp 0.5s ease-out;
}

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

/* Surprise Section */
.surprise-section {
    padding: 40px 20px;
    text-align: center;
}

.surprise-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #d63384;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.surprise-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.5);
}

.surprise-content {
    margin-top: 30px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.2);
    animation: fadeInUp 0.5s ease-out;
}

.surprise-poem {
    color: #d63384;
    font-size: 20px;
    line-height: 1.8;
    font-style: italic;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    color: #d63384;
    font-size: 16px;
}

/* Confetti */
#confettiContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff69b4;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 36px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .message-card {
        padding: 30px 20px;
    }

    .message-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 28px;
    }

    .special-grid,
    .memory-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
        align-items: stretch;
    }

    .answer-button {
        width: 100%;
    }
}
