@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Dancing+Script:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #c85a78;
    --primary-light: #f5d5e0;
    --primary-dark: #8b2d47;
    --background: #f9e7ed;
    --foreground: #4a1f2f;
    --card-bg: #fdeef5;
    --border: #e8c5d5;
    --muted: #daa8bd;
    --cream: #faf6f1;
    --gold: #d4a574;
    --rose: #c85a78;
    --blush: #f5d5e0;
    --wine: #3d1528;
    --petal: #f0d0dd;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background: linear-gradient(135deg, 
        var(--primary-light) 0%, 
        var(--cream) 50%, 
        var(--blush) 100%);
    color: var(--foreground);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Floating Hearts Background */
.floating-hearts {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    color: var(--primary);
    opacity: 0.2;
    font-size: 1.5rem;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

.floating-heart {
    animation: float-up linear infinite;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 4rem;
}

.decorative-hearts {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.heart-icon, .sparkle-icon {
    display: inline-block;
    font-size: 1.5rem;
    animation: scale-pulse 2s ease-in-out infinite;
}

@keyframes scale-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.main-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.title-normal {
    color: var(--foreground);
}

.title-gradient {
    background: linear-gradient(to right, 
        var(--primary), 
        var(--primary-dark), 
        var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--primary);
    margin-bottom: 1rem;
}

.love-note {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted);
    max-width: 40rem;
    margin: 1.5rem auto;
    font-style: italic;
    line-height: 1.6;
}

.decorative-line {
    width: 8rem;
    height: 2px;
    margin: 2rem auto;
    background: linear-gradient(to right, 
        transparent, 
        var(--primary), 
        transparent);
}

@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scale-line {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.animate-header {
    animation: fade-in-down 0.8s ease-out;
}

.animate-title {
    animation: fade-in-scale 0.6s ease-out 0.2s both;
}

.animate-subtitle {
    animation: fade-in-scale 0.6s ease-out 0.4s both;
}

.animate-love-note {
    animation: fade-in-scale 0.6s ease-out 0.6s both;
}

.animate-line {
    animation: scale-line 0.5s ease-out 0.8s both;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Day Card */
.day-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(200, 90, 120, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1.5rem;
    text-align: center;
    animation: fade-in-up 0.5s ease-out backwards;
}

.day-card:nth-child(1) { animation-delay: 0s; }
.day-card:nth-child(2) { animation-delay: 0.1s; }
.day-card:nth-child(3) { animation-delay: 0.2s; }
.day-card:nth-child(4) { animation-delay: 0.3s; }
.day-card:nth-child(5) { animation-delay: 0.4s; }
.day-card:nth-child(6) { animation-delay: 0.5s; }
.day-card:nth-child(7) { animation-delay: 0.6s; }
.day-card:nth-child(8) { animation-delay: 0.7s; }

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.day-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.day-card:hover::before {
    opacity: 0.2;
}

.day-card-content {
    position: relative;
    z-index: 1;
}

.day-emoji {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    animation: emoji-bounce 0.3s ease-out;
}

.day-card:hover .day-emoji {
    animation: emoji-bounce-hover 0.6s ease-in-out;
}

@keyframes emoji-bounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(-10deg); }
}

@keyframes emoji-bounce-hover {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.3) rotate(-10deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    75% { transform: scale(1.3) rotate(-5deg); }
}

.day-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.day-date {
    font-size: 0.875rem;
    color: var(--muted);
    font-style: italic;
}

.day-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 35px rgba(200, 90, 120, 0.2);
}

.day-card:active {
    transform: scale(0.98);
}

.hover-indicator {
    margin-top: 1rem;
    font-family: 'Dancing Script', cursive;
    font-size: 1rem;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.day-card:hover .hover-indicator {
    opacity: 1;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 4rem;
    animation: fade-in-up 0.8s ease-out 1.2s both;
}

.footer-main {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.footer-sub {
    font-family: 'Cormorant Garamond', serif;
    color: var(--muted);
    font-style: italic;
}

.footer-hearts {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.footer-heart {
    display: inline-block;
    font-size: 1rem;
    animation: heart-bounce 1s ease-in-out infinite;
}

@keyframes heart-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(61, 21, 40, 0.8);
    backdrop-filter: blur(4px);
    z-index: 50;
    animation: fade-in-modal 0.3s ease-out;
}

@keyframes fade-in-modal {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Day Modal */
.day-modal {
    position: fixed;
    inset: 1rem;
    z-index: 50;
    animation: modal-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 768px) {
    .day-modal {
        inset: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .day-modal {
        inset: 5rem;
    }
}

@keyframes modal-pop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content {
    height: 100%;
    background-color: var(--background);
    border-radius: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    position: relative;
    padding: 1.5rem;
    color: white;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .modal-header {
        padding: 2rem;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.modal-header-content {
    text-align: center;
    animation: slide-down 0.4s ease-out 0.2s both;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-emoji {
    font-size: 3.75rem;
    margin-bottom: 0.5rem;
    display: block;
    animation: emoji-scale 0.4s ease-out 0.2s both;
}

@keyframes emoji-scale {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.modal-date {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.125rem;
    opacity: 0.9;
    font-style: italic;
}

.modal-floating-heart {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.5;
    animation: float-in-place 2s ease-in-out infinite;
}

.modal-floating-heart:nth-child(1) {
    top: 1rem;
    left: 1rem;
    animation-delay: 0s;
}

.modal-floating-heart:nth-child(2) {
    bottom: 1rem;
    right: 5rem;
    animation-delay: 0.5s;
}

@keyframes float-in-place {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .modal-body {
        padding: 2rem;
    }
}

.modal-body-content {
    max-width: 40rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.shayari-section,
.note-section {
    animation: fade-in-up 0.6s ease-out backwards;
}

.shayari-section {
    animation-delay: 0.4s;
}

.note-section {
    animation-delay: 0.6s;
}

.section-title {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.shayari-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.125rem;
    color: var(--foreground);
    font-style: italic;
    line-height: 1.8;
    white-space: pre-wrap;
    text-align: center;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-left: 4px solid var(--primary);
    border-radius: 0.5rem;
}

.note-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: var(--foreground);
    line-height: 1.8;
    text-align: justify;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    gap: 1rem;
}

@media (min-width: 768px) {
    .modal-footer {
        padding: 2rem;
    }
}

.modal-button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Cormorant Garamond', serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.modal-button:disabled {
    background-color: var(--muted);
    cursor: not-allowed;
    transform: none;
}

.modal-button-icon {
    font-size: 1.25rem;
}

.navigation-buttons {
    display: flex;
    gap: 1rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 640px) {
    .main-content {
        padding: 1.5rem 1rem;
    }

    .header {
        margin-bottom: 2rem;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .decorative-hearts {
        gap: 0.5rem;
    }

    .heart-icon, .sparkle-icon {
        font-size: 1rem;
    }

    .day-card {
        padding: 1rem;
    }

    .day-emoji {
        font-size: 2rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .floating-hearts,
    .modal-overlay {
        display: none !important;
    }

    body {
        background: white;
    }

    .day-card,
    .modal-content {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
