:root {
    --primary-color: #ff4d6d;
    --secondary-color: #ff8fa3;
    --bg-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-color: #4a4a4a;
    --shadow: 0 10px 30px rgba(255, 77, 109, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.background-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

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

.heart {
    position: absolute;
    bottom: -50px;
    background-color: rgba(255, 255, 255, 0.4);
    display: inline-block;
    border-radius: 50%;
    animation: floatUp 15s linear infinite;
    z-index: 0;
}

.heart::before,
.heart::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: inherit;
}

.heart::before {
    left: -50%;
}

.heart::after {
    left: 0;
    top: -50%;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-120vh) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

.container {
    padding: 20px;
    width: 100%;
    max-width: 500px;
    z-index: 10;
    position: relative;
    text-align: center;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.5s ease-out;
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
}

.highlight {
    color: #d63384;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(45deg, #ff4d6d, #ff8fa3);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 77, 109, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 77, 109, 0.5);
}

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

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 2px solid #fff0f3;
}

.btn-secondary:hover {
    background: #fff0f3;
    color: var(--primary-color);
    transform: translateY(-3px);
}

.hidden {
    display: none;
    opacity: 0;
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.5s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.footer-msg {
    margin-top: 2rem;
    font-size: 1rem;
    color: #d63384;
    font-weight: 600;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .title {
        font-size: 2.8rem;
    }

    .card {
        padding: 2.5rem 1.5rem;
    }

    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* Share Buttons */
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 0.9rem;
    z-index: 101;
    /* Ensure clickable */
}

.share-btn:hover {
    transform: scale(1.05);
}

.whatsapp {
    background-color: #25D366;
    color: white;
}

.copylink {
    background-color: #f0f0f0;
    color: #333;
}

/* Paper View Styles */
.btn-more {
    background: white;
    color: #d63384;
    border: 1px solid #d63384;
    margin-top: 1rem;
    font-size: 1rem;
    position: relative;
    z-index: 2000 !important;
    cursor: pointer;
}

.btn-more:hover {
    background: #d63384;
    color: white;
    transform: translateY(-2px);
}

.paper-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.paper {
    width: 90%;
    max-width: 450px;
    background-color: #fdfbf7;
    background-image: linear-gradient(#e6e6e6 1px, transparent 1px);
    background-size: 100% 1.8em;
    padding: 30px 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: rotate(-1deg);
    position: relative;
    font-family: 'Dancing Script', cursive;
    color: #555;
    font-size: 1.5rem;
    line-height: 1.8em;
    border-radius: 2px;
}

.paper::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateX(-50%) rotate(2deg);
    /* Tape effect */
}

.paper-title {
    text-align: center;
    color: #d63384;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.days-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.days-list li {
    margin-bottom: 0;
    border-bottom: 1px solid transparent;
}

.days-list li strong {
    color: #d63384;
}

/* Slideshow Styles */
.slideshow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background: black;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Text at bottom */
    padding-bottom: 80px;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide-overlay {
    background: rgba(255, 255, 255, 0.85);
    /* Light aesthetic card */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 90%;
    max-width: 600px;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out 0.3s;
    /* Delay text appearance */
}

.slide.active .slide-overlay {
    opacity: 1;
    transform: translateY(0);
}

.slide-title {
    font-family: 'Dancing Script', cursive;
    color: #ff4d6d;
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.slide-subtitle {
    font-family: 'Outfit', sans-serif;
    color: #d63384;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slide-content {
    font-family: 'Outfit', sans-serif;
    color: #4a4a4a;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.slide-shayari {
    font-family: 'Dancing Script', cursive;
    color: #ff4d6d;
    font-size: 1.4rem;
    line-height: 1.5;
    border-top: 1px solid #ffccd5;
    padding-top: 15px;
    margin-top: 15px;
    font-style: italic;
}

/* Controls */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 20;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #ff4d6d;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 30;
}

.indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .slide-overlay {
        padding: 15px;
        margin-bottom: 60px;
        width: 95%;
        max-height: 80vh;
        /* Prevent overflow */
        overflow-y: auto;
        /* Allow scrolling if text is too long */
    }

    .slide-title {
        font-size: 1.5rem;
    }

    .slide-subtitle {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .slide-content {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    .slide-shayari {
        font-size: 1.1rem;
        margin-top: 10px;
        padding-top: 10px;
    }

    .nav-btn {
        padding: 15px;
        /* Larger touch target */
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.2);
        /* More visible backing */
    }

    .prev-btn {
        left: 5px;
    }

    .next-btn {
        right: 5px;
    }
}