/* Main Card Styles */
.main-card {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe0f0 50%, #ffd4e8 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    overflow-y: auto;
    overflow-x: hidden;
}

.main-card.hidden {
    display: none;
}

.main-card.fade-in {
    animation: fadeInScale 1s ease-out;
}

/* Particle Canvas */
.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Floating Hearts Container */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

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

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

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

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

.heart:nth-child(1) {
    left: 10%;
    bottom: -30px;
    animation-delay: 0s;
    animation-duration: 8s;
}

.heart:nth-child(2) {
    left: 25%;
    bottom: -30px;
    animation-delay: 2s;
    animation-duration: 10s;
}

.heart:nth-child(3) {
    left: 45%;
    bottom: -30px;
    animation-delay: 4s;
    animation-duration: 9s;
}

.heart:nth-child(4) {
    left: 65%;
    bottom: -30px;
    animation-delay: 1s;
    animation-duration: 11s;
}

.heart:nth-child(5) {
    left: 80%;
    bottom: -30px;
    animation-delay: 3s;
    animation-duration: 7s;
}

.heart:nth-child(6) {
    left: 90%;
    bottom: -30px;
    animation-delay: 5s;
    animation-duration: 10s;
}

/* Card Container */
.card-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 0;
}

.card-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 3rem;
    max-width: 700px;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.3);
    text-align: center;
}

.card-title {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #c94b7d;
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px rgba(201, 75, 125, 0.2);
}

.message-content {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #5a3349;
    line-height: 2;
}

.message-text {
    margin-bottom: 2rem;
    opacity: 0;
}

.message-text.visible {
    animation: fadeInText 1s ease-out forwards;
}

.signature {
    font-style: italic;
    margin-top: 3rem;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
}

/* Music Controls */
.music-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(255, 105, 180, 0.2);
    margin-top: 2rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.music-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d, #c94b7d);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(201, 75, 125, 0.4);
}

.music-btn svg {
    width: 20px;
    height: 20px;
}

.progress-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    max-width: 300px;
}

.time-display {
    font-size: 0.875rem;
    color: #c94b7d;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.progress-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(201, 75, 125, 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.progress-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
}

.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border: 3px solid #c94b7d;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(201, 75, 125, 0.3);
    transition: transform 0.2s ease;
    margin-top: -5px;
}

.progress-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.progress-slider::-moz-range-track {
    height: 6px;
    background: rgba(201, 75, 125, 0.2);
    border-radius: 3px;
}

.progress-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border: 3px solid #c94b7d;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(201, 75, 125, 0.3);
    transition: transform 0.2s ease;
    border: none;
}

.progress-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.hidden {
    display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .card-container {
        padding: 1.5rem;
    }

    .card-content {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .message-text {
        margin-bottom: 1.5rem;
    }

    .music-controls {
        padding: 0.875rem 1.5rem;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .progress-control {
        max-width: 250px;
    }

    .time-display {
        font-size: 0.8rem;
        min-width: 35px;
    }

    .floating-hearts .heart {
        width: 16px;
        height: 14px;
    }

    .floating-hearts .heart::before,
    .floating-hearts .heart::after {
        width: 16px;
        height: 14px;
    }

    .floating-hearts .heart::before {
        top: -7px;
    }

    .floating-hearts .heart::after {
        left: 7px;
    }
}

@media (max-width: 400px) {
    .card-content {
        padding: 1.5rem 1rem;
    }

    .music-controls {
        gap: 1rem;
        padding: 0.75rem 1rem;
        max-width: 95%;
    }

    .music-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .progress-control {
        flex: 1;
        min-width: 0;
        max-width: none;
        gap: 0.5rem;
    }

    .time-display {
        font-size: 0.75rem;
        min-width: 32px;
    }

    .progress-slider {
        min-width: 60px;
    }
}

/* Fade in scale animation */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Text fade in animation */
@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
