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

html {
    background: #1a1a1a;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #3d0000 50%, #1a1a1a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Header Styles */
.header {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
    animation: fadeInDown 1s ease-out;
}

.main-title {
    font-family: 'Great Vibes';
    font-size: 4rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.heart-animation {
    font-size: 3rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
}

/* Valentine Card */
.valentine-card {
    perspective: 1000px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 500px;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-inner.flipped {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-front {
    background: linear-gradient(135deg, #2d0000, #660000);
    border: 2px solid white;
    color: white;
}

.card-back {
    background: linear-gradient(135deg, #cc0000, #ff0000);
    color: white;
    transform: rotateY(180deg);
}

.card-front h2 {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    margin-bottom: 30px;
}

.card-back h2 {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
}

.card-front p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.open-btn,
.yes-btn,
.no-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.open-btn {
    background: white;
    color: #cc0000;
    font-weight: 600;
    border: 2px solid white;
}

.open-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.yes-btn {
    background: white;
    color: #cc0000;
    min-width: 120px;
    border: 2px solid white;
}

.no-btn {
    background: #cc0000;
    color: white;
    position: relative;
    min-width: 80px;
    border: 2px solid white;
    padding: 10px 25px;
    font-size: 0.9rem;
}

.yes-btn:hover {
    background: white;
    color: #cc0000;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.love-message {
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 30px 0;
    font-weight: 300;
    max-width: 600px;
}

.response-buttons {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 60px;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

/* Love Meter */
.love-meter {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    color: white;
}

.love-meter h3 {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    margin-bottom: 20px;
}

.meter-container {
    max-width: 400px;
    margin: 0 auto;
}

.love-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #660000, #cc0000, #ff0000, #ff6666);
    outline: none;
    -webkit-appearance: none;
    margin: 20px 0;
}

.love-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.love-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.meter-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
}

#loveValue {
    font-weight: 600;
}

#loveEmoji {
    font-size: 2rem;
}

/* Polaroid Gallery Section */
.polaroid-gallery {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 20px;
    padding: 40px 20px;
    color: white;
    text-align: center;
    overflow: hidden;
}

.polaroid-gallery h3 {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    margin-bottom: 40px;
}

.polaroid-container {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    padding: 50px 30px;
    min-height: 500px;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -20px;
}

.polaroid-container::-webkit-scrollbar {
    display: none;
}

.polaroid {
    background: white;
    padding: 15px 15px 50px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 300px;
    max-width: 300px;
    flex-shrink: 0;
}

.polaroid:nth-child(1) {
    transform: rotate(-5deg);
}

.polaroid:nth-child(2) {
    transform: rotate(3deg);
}

.polaroid:nth-child(3) {
    transform: rotate(-3deg);
}

.polaroid:nth-child(4) {
    transform: rotate(5deg);
}

.polaroid:nth-child(5) {
    transform: rotate(-4deg);
}

.polaroid:nth-child(6) {
    transform: rotate(2deg);
}

.polaroid:nth-child(7) {
    transform: rotate(-2deg);
}

.polaroid:nth-child(8) {
    transform: rotate(4deg);
}

.polaroid:nth-child(9) {
    transform: rotate(-5deg);
}

.polaroid:nth-child(10) {
    transform: rotate(3deg);
}

.polaroid:nth-child(11) {
    transform: rotate(-3deg);
}

.polaroid:nth-child(12) {
    transform: rotate(5deg);
}

.polaroid:nth-child(13) {
    transform: rotate(-4deg);
}

.polaroid:nth-child(14) {
    transform: rotate(2deg);
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.08) translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 0, 0, 0.4);
    z-index: 10;
}

.polaroid img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    display: block;
    background: white;
}

.polaroid-caption {
    color: #333;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
}

.slideshow-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.nav-btn {
    background: white;
    color: #cc0000;
    border: 2px solid white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: #cc0000;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Love Letter Section */
.love-letter {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 20px;
    padding: 30px;
    color: white;
    text-align: center;
}

.love-letter h3 {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    margin-bottom: 20px;
}

#loveNote {
    width: 100%;
    max-width: 500px;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    resize: vertical;
    margin: 10px 0 20px 0;
}

.note-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.save-btn,
.send-btn {
    background: linear-gradient(135deg, #cc0000, #ff0000);
    color: white;
    border: 2px solid #ff0000;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn {
    background: linear-gradient(135deg, #ff0000, #ff6666);
    border: 2px solid #ff6666;
}

.save-btn:hover,
.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.saved-notes {
    margin-top: 20px;
    text-align: left;
}

.note-item {
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    position: relative;
}

.note-item .delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Music Toggle */
.music-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #cc0000, #ff0000);
    border: 2px solid white;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.music-toggle:active {
    transform: scale(0.95);
}

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

@keyframes pulse-music {

    0%,
    100% {
        box-shadow: 0 5px 20px rgba(255, 107, 107, 0.5);
    }

    50% {
        box-shadow: 0 5px 30px rgba(255, 107, 107, 0.8);
    }
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
    font-size: 1rem;
}

/* Floating Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-item {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
}

.bear {
    font-size: 2.5rem;
    opacity: 0.6;
}

.rose {
    font-size: 2.2rem;
    opacity: 0.7;
}

.bubble {
    font-size: 1.8rem;
    opacity: 0.5;
}

.floating-item:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.floating-item:nth-child(2) {
    left: 25%;
    animation-delay: 1s;
    animation-duration: 7s;
}

.floating-item:nth-child(3) {
    left: 45%;
    animation-delay: 2s;
    animation-duration: 9s;
}

.floating-item:nth-child(4) {
    left: 60%;
    animation-delay: 1.5s;
    animation-duration: 10s;
}

.floating-item:nth-child(5) {
    left: 75%;
    animation-delay: 3s;
    animation-duration: 8.5s;
}

.floating-item:nth-child(6) {
    left: 15%;
    animation-delay: 4s;
    animation-duration: 7.5s;
}

.floating-item:nth-child(7) {
    left: 85%;
    animation-delay: 2.5s;
    animation-duration: 9.5s;
}

.floating-item:nth-child(8) {
    left: 35%;
    animation-delay: 3.5s;
    animation-duration: 8s;
}

/* Celebration */
.celebration {
    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: 1000;
}

.celebration.hidden {
    display: none;
}

.celebration-content {
    background: linear-gradient(135deg, #2d0000, #660000);
    border: 1px solid white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: white;
    animation: celebrationPop 0.5s ease-out;
}

.celebration-content h2 {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    margin-bottom: 20px;
}

.fireworks {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) rotate(0deg);
    }

    50% {
        transform: translateY(-100px) rotate(180deg);
    }
}

@keyframes celebrationPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Toast Notifications */
.toast-container {
    text-align: center;
}

.toast {
    display: inline-block;
    background: linear-gradient(135deg, #cc0000, #ff0000);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid white;
    animation: toastPop 0.3s ease-out;
}

.toast.fade-out {
    opacity: 0;
    transition: opacity 0.4s ease;
}

@keyframes toastPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

    .card-inner {
        height: 450px;
    }

    .card-front h2,
    .card-back h2 {
        font-size: 2.2rem;
    }

    .card-front,
    .card-back {
        padding: 30px 25px;
    }

    .love-message {
        font-size: 1rem;
        line-height: 1.6;
        margin: 20px 0;
    }

    .open-btn,
    .yes-btn,
    .no-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .polaroid-container {
        gap: 20px;
        min-height: 350px;
    }

    .polaroid {
        max-width: 260px;
        min-width: 260px;
    }

    .polaroid img {
        height: 200px;
    }

    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.5rem;
    }

    .card-inner {
        height: 400px;
    }

    .card-front,
    .card-back {
        padding: 25px 20px;
        overflow-y: auto;
    }

    .card-front h2,
    .card-back h2 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .card-front p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .love-message {
        font-size: 0.95rem;
        line-height: 1.5;
        margin: 15px 0;
    }

    .open-btn,
    .yes-btn,
    .no-btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }

    .response-buttons {
        margin-top: 15px;
        gap: 15px;
    }

    .polaroid-container {
        gap: 15px;
        min-height: 320px;
    }

    .polaroid {
        max-width: 240px;
        min-width: 240px;
    }

    .polaroid img {
        height: 300px;
    }

    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}