/* ============================================
   Maaf Particle Animation - Style Sheet
   Aesthetic: Romantic, Calm, Modern
   ============================================ */

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #1a1a2e;
    --accent-pink: #e94560;
    --accent-purple: #7c3aed;
    --accent-glow: #ff6b9d;
    --text-light: #eeeeff;
    --text-muted: #a0a0c0;
    --star-color: rgba(255, 255, 255, 0.8);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, #16213e 100%);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* ============================================
   Starfield Background
   ============================================ */

.stars,
.stars2,
.stars3 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.8"/></svg>') repeat;
    background-size: 100px 100px;
    animation: twinkle 4s ease-in-out infinite;
}

.stars2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="30" cy="70" r="0.8" fill="white" opacity="0.6"/></svg>') repeat;
    background-size: 150px 150px;
    animation: twinkle 6s ease-in-out infinite;
    animation-delay: 1s;
}

.stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="0.5" fill="white" opacity="0.4"/></svg>') repeat;
    background-size: 200px 200px;
    animation: twinkle 8s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* ============================================
   Canvas
   ============================================ */

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* ============================================
   Hidden Text (for particle targeting)
   ============================================ */

.hidden-text {
    position: absolute;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 700;
    color: transparent;
    pointer-events: none;
    white-space: nowrap;
    text-align: center;
    opacity: 0;
}

/* ============================================
   Content Container
   ============================================ */

.content-container {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    pointer-events: none;
}

/* ============================================
   Instruction Text
   ============================================ */

.instruction {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    animation: pulse-glow 2s ease-in-out infinite;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s var(--transition-smooth);
}

.instruction:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.instruction-icon {
    font-size: 1.3rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(233, 69, 96, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(233, 69, 96, 0.4);
    }
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.2) rotate(15deg);
    }
}

/* ============================================
   Text Overlays (Crisp HTML Text)
   ============================================ */

.text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.text-overlay.visible {
    opacity: 1;
}

.text-main {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 600;
    color: var(--accent-pink);
    text-shadow: 0 0 30px rgba(233, 69, 96, 0.5);
    margin: 0;
    line-height: 1.3;
}

.text-name {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 6vw, 3rem);
    font-weight: 500;
    color: var(--text-light);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    margin: 0.5rem 0 0 0;
    line-height: 1.3;
}

/* ============================================
   Photo Container
   ============================================ */

.photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: all 1s var(--transition-smooth);
}

.photo-container.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.photo-frame {
    position: relative;
    padding: 8px;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.3) 0%, rgba(124, 58, 237, 0.3) 100%);
    border-radius: 20px;
    box-shadow:
        0 0 40px rgba(233, 69, 96, 0.3),
        0 0 80px rgba(124, 58, 237, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    animation: photo-glow 3s ease-in-out infinite;
}

@keyframes photo-glow {

    0%,
    100% {
        box-shadow:
            0 0 40px rgba(233, 69, 96, 0.3),
            0 0 80px rgba(124, 58, 237, 0.2),
            inset 0 0 20px rgba(255, 255, 255, 0.05);
    }

    50% {
        box-shadow:
            0 0 60px rgba(233, 69, 96, 0.5),
            0 0 100px rgba(124, 58, 237, 0.3),
            inset 0 0 30px rgba(255, 255, 255, 0.1);
    }
}

.photo-frame img {
    display: block;
    max-width: 280px;
    max-height: 280px;
    width: auto;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
}

.photo-caption {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    text-shadow: 0 0 30px rgba(233, 69, 96, 0.5);
    animation: caption-shimmer 2s ease-in-out infinite;
}

@keyframes caption-shimmer {

    0%,
    100% {
        opacity: 0.9;
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 40px rgba(233, 69, 96, 0.7);
    }
}

/* ============================================
   Letter
   ============================================ */

.letter {
    max-width: 500px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--transition-smooth);
}

.letter.visible {
    opacity: 1;
    transform: translateY(0);
}

.letter-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-light);
    letter-spacing: 0.02em;
}

/* ============================================
   CTA Button
   ============================================ */

.cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--transition-smooth);
    pointer-events: auto;
}

.cta-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.mystery-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, rgba(233, 69, 96, 0.3) 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 60px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mystery-btn:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow:
        0 10px 40px rgba(124, 58, 237, 0.4),
        0 0 60px rgba(233, 69, 96, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.05);
}

.mystery-btn:active {
    transform: translateY(0) scale(0.98);
}

.mystery-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.4) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    animation: mystery-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes mystery-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.mystery-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mystery-icon {
    font-size: 1.5rem;
    animation: mystery-float 2s ease-in-out infinite;
}

@keyframes mystery-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-3px) rotate(-5deg);
    }

    75% {
        transform: translateY(3px) rotate(5deg);
    }
}

.mystery-text {
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.mystery-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.mystery-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: mystery-particle 3s ease-in-out infinite;
}

.mystery-particles span:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.mystery-particles span:nth-child(2) {
    left: 30%;
    animation-delay: 0.5s;
}

.mystery-particles span:nth-child(3) {
    left: 50%;
    animation-delay: 1s;
}

.mystery-particles span:nth-child(4) {
    left: 70%;
    animation-delay: 1.5s;
}

.mystery-particles span:nth-child(5) {
    left: 90%;
    animation-delay: 2s;
}

@keyframes mystery-particle {
    0% {
        bottom: -10px;
        opacity: 0;
        transform: scale(0);
    }

    20% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        bottom: 100%;
        opacity: 0;
        transform: scale(0.5);
    }
}

.whatsapp-icon {
    width: 24px;
    height: 24px;
}

.cta-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ============================================
   Utility Classes
   ============================================ */

.hidden {
    display: none !important;
}

/* ============================================
   Responsive - Mobile First
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .content-container {
        padding: 1.5rem;
    }

    .photo-frame img {
        max-width: 240px;
        max-height: 240px;
    }

    .photo-caption {
        font-size: 1.5rem;
    }

    .letter {
        padding: 2rem;
        margin: 0 0.5rem;
        max-width: 90%;
    }

    .letter-text {
        font-size: 1.3rem;
        line-height: 1.7;
    }
}

/* Mobile */
@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    .content-container {
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 15vh;
    }

    .instruction {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        gap: 0.5rem;
    }

    .instruction-icon {
        font-size: 1.1rem;
    }

    .photo-container {
        gap: 1rem;
    }

    .photo-frame {
        padding: 6px;
        border-radius: 16px;
    }

    .photo-frame img {
        max-width: 200px;
        max-height: 200px;
        border-radius: 12px;
    }

    .photo-caption {
        font-size: 1.3rem;
    }

    .letter {
        padding: 1.25rem;
        margin: 0 0.75rem;
        border-radius: 18px;
        max-width: 95%;
    }

    .letter-text {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .cta-container {
        margin-top: 1.5rem;
        gap: 0.75rem;
    }

    .mystery-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        border-radius: 50px;
    }

    .mystery-icon {
        font-size: 1.2rem;
    }

    .mystery-inner {
        gap: 0.5rem;
    }

    .cta-hint {
        font-size: 0.8rem;
    }

    .notification {
        bottom: 20px;
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        max-width: 90%;
    }
}

/* Small Mobile */
@media (max-width: 380px) {
    .content-container {
        padding-top: 10vh;
    }

    .instruction {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .photo-frame img {
        max-width: 160px;
        max-height: 160px;
    }

    .photo-caption {
        font-size: 1.1rem;
    }

    .letter {
        padding: 1rem;
    }

    .letter-text {
        font-size: 1rem;
    }

    .mystery-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .content-container {
        padding-top: 5vh;
        justify-content: flex-start;
    }

    .photo-frame img {
        max-width: 120px;
        max-height: 120px;
    }

    .photo-caption {
        font-size: 1rem;
    }

    .letter {
        padding: 1rem;
    }

    .letter-text {
        font-size: 0.95rem;
    }
}

/* ============================================
   Loading State
   ============================================ */

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Notification Popup
   ============================================ */

.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(34, 197, 94, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: white;
    z-index: 100;
    opacity: 0;
    transition: all 0.5s var(--transition-smooth);
}

.notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notification-icon {
    font-size: 1.3rem;
    animation: notification-bounce 0.5s ease-out;
}

@keyframes notification-bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}