/* ============================================
   ROMANTIC DEDICATION PAGE - NOUR
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pink: #ff2d75;
    --hot-pink: #ff1493;
    --magenta: #ff00ff;
    --soft-pink: #ff69b4;
    --gold: #ffd700;
    --red: #ff0044;
    --dark-bg: #0a0008;
    --glow-pink: 0 0 20px rgba(255,45,117,0.6), 0 0 40px rgba(255,45,117,0.3);
    --glow-gold: 0 0 20px rgba(255,215,0,0.6), 0 0 40px rgba(255,215,0,0.3);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--dark-bg);
    font-family: 'Tajawal', 'Amiri', sans-serif;
    color: #fff;
    position: relative;
}

body {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* === LOADING SCREEN === */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a0015 0%, #0a0008 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 1s ease, visibility 1s ease;
}

#loading-screen.hide {
    opacity: 0;
    visibility: hidden;
}

.loading-heart {
    font-size: 80px;
    animation: heartBeat 1s infinite;
}

.loading-text {
    font-size: 1.2rem;
    color: var(--soft-pink);
    margin-top: 20px;
    font-family: 'Tajawal', sans-serif;
    animation: fadeInOut 1.5s infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* === CONTROL BUTTONS === */
.control-btn {
    position: fixed;
    z-index: 1000;
    background: rgba(255, 45, 117, 0.15);
    border: 1px solid rgba(255, 45, 117, 0.4);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 45, 117, 0.35);
    box-shadow: var(--glow-pink);
    transform: scale(1.1);
}

.btn-audio {
    top: 20px;
    right: 20px;
}

.btn-fullscreen {
    top: 20px;
    right: 75px;
}

/* === MAIN CONTAINER === */
#main-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(ellipse at center top, #1a0020 0%, #0d0010 30%, #050005 70%, #000 100%);
}

/* === BACKGROUND PARTICLES CANVAS === */
#bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* === ROMANTIC TITLE === */
#romantic-title {
    position: absolute;
    top: 3%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

.title-glow {
    display: block;
    font-family: 'Great Vibes', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    background: linear-gradient(135deg, var(--hot-pink), var(--gold), var(--hot-pink));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255,20,147,0.5)) drop-shadow(0 0 40px rgba(255,215,0,0.3));
    text-shadow: none;
}

.title-sub {
    display: block;
    font-family: 'Tajawal', sans-serif;
    font-size: clamp(1rem, 3vw, 1.6rem);
    color: var(--soft-pink);
    margin-top: 5px;
    opacity: 0.9;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(255,105,180,0.5);
    animation: fadeGlow 2s ease-in-out infinite alternate;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes fadeGlow {
    0% { opacity: 0.6; text-shadow: 0 0 10px rgba(255,105,180,0.3); }
    100% { opacity: 1; text-shadow: 0 0 25px rgba(255,105,180,0.7); }
}

/* === HEART CANVAS === */
#heart-canvas {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 50%;
    z-index: 5;
    pointer-events: none;
}

/* === 3D RING SECTION === */
#ring-section {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    z-index: 8;
    perspective: 1000px;
}

/* === 3D PHOTO RING === */
#photo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    animation: rotateRing 15s linear infinite;
}

.ring-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: rotateY(calc(var(--i) * 45deg)) translateZ(120px) translateY(-50%);
}

.ring-card {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, rgba(255,45,117,0.2), rgba(255,0,255,0.15));
    border: 1px solid rgba(255,45,117,0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(255,45,117,0.3), inset 0 0 10px rgba(255,45,117,0.1);
    transition: all 0.3s ease;
    animation: cardPulse 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.3s);
}

@keyframes rotateRing {
    0% { transform: rotateX(-15deg) rotateY(0deg); }
    100% { transform: rotateX(-15deg) rotateY(360deg); }
}

@keyframes cardPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255,45,117,0.3); }
    50% { box-shadow: 0 0 25px rgba(255,45,117,0.6), 0 0 40px rgba(255,0,255,0.2); }
}

/* === 3D TEXT RING === */
#text-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    animation: rotateTextRing 25s linear infinite;
}

.text-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: rotateY(calc(var(--j) * 30deg)) translateZ(180px) translateX(-50%);
    white-space: nowrap;
    font-family: 'Tajawal', sans-serif;
    font-size: clamp(0.7rem, 2vw, 0.95rem);
    font-weight: 500;
    color: var(--soft-pink);
    text-shadow: 0 0 10px rgba(255,45,117,0.6), 0 0 20px rgba(255,45,117,0.3);
    opacity: 0.85;
    animation: textGlow 4s ease-in-out infinite;
    animation-delay: calc(var(--j) * 0.5s);
}

@keyframes rotateTextRing {
    0% { transform: rotateX(-10deg) rotateY(0deg); }
    100% { transform: rotateX(-10deg) rotateY(-360deg); }
}

@keyframes textGlow {
    0%, 100% { opacity: 0.5; text-shadow: 0 0 5px rgba(255,45,117,0.3); }
    50% { opacity: 1; text-shadow: 0 0 15px rgba(255,45,117,0.8), 0 0 30px rgba(255,0,255,0.4); }
}

/* === Ring Reflection === */
#ring-section::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 60px;
    background: radial-gradient(ellipse, rgba(255,45,117,0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
    animation: reflectionPulse 3s ease-in-out infinite;
}

@keyframes reflectionPulse {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) scaleX(1); }
    50% { opacity: 0.6; transform: translateX(-50%) scaleX(1.1); }
}

/* === DEDICATIONS === */
#dedications {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    width: 90%;
    max-width: 500px;
}

.dedication-msg {
    margin-bottom: 15px;
    opacity: 0;
    animation: dedicationAppear 1s ease forwards;
}

.dedication-msg:nth-child(1) {
    animation-delay: 3s;
}

.dedication-msg:nth-child(2) {
    animation-delay: 5s;
}

.ded-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
    animation: heartBeat 2s infinite;
}

.dedication-msg p {
    font-family: 'Tajawal', sans-serif;
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    color: #fff;
    line-height: 1.8;
    text-shadow: 0 0 15px rgba(255,45,117,0.4);
    background: linear-gradient(135deg, rgba(255,45,117,0.08), rgba(255,0,255,0.05));
    border: 1px solid rgba(255,45,117,0.15);
    border-radius: 15px;
    padding: 12px 20px;
    backdrop-filter: blur(5px);
}

@keyframes dedicationAppear {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* === FLOATING HEARTS === */
.floating-heart {
    position: absolute;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    animation: floatUp var(--duration) ease-in forwards;
    animation-delay: var(--delay);
    font-size: var(--size);
    left: var(--left);
    bottom: -50px;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(0deg) scale(0.5);
    }
    10% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(calc(-100vh - 100px)) rotate(360deg) scale(1);
    }
}

/* === SPARKLE CURSOR TRAIL === */
.sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 6px;
    height: 6px;
    background: var(--hot-pink);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--hot-pink), 0 0 20px var(--magenta);
    animation: sparkleFade 0.8s ease forwards;
}

@keyframes sparkleFade {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    #ring-section {
        top: 40%;
        width: 260px;
        height: 260px;
    }

    .ring-item {
        transform: rotateY(calc(var(--i) * 45deg)) translateZ(90px) translateY(-50%);
    }

    .ring-card {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .text-item {
        transform: rotateY(calc(var(--j) * 30deg)) translateZ(140px) translateX(-50%);
        font-size: 0.7rem;
    }

    #dedications {
        bottom: 3%;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .btn-audio {
        top: 15px;
        right: 15px;
    }

    .btn-fullscreen {
        top: 15px;
        right: 65px;
    }
}

@media (max-width: 400px) {
    .ring-item {
        transform: rotateY(calc(var(--i) * 45deg)) translateZ(75px) translateY(-50%);
    }

    .text-item {
        transform: rotateY(calc(var(--j) * 30deg)) translateZ(115px) translateX(-50%);
        font-size: 0.65rem;
    }

    .ring-card {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    #ring-section {
        top: 38%;
    }
}

/* === MADE WITH LOVE BADGE === */
#made-with-love {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
    font-family: 'Tajawal', sans-serif;
    font-size: clamp(0.7rem, 2vw, 0.85rem);
    color: rgba(255, 182, 193, 0.7);
    letter-spacing: 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    animation: madeWithLoveAppear 1.5s ease forwards;
    animation-delay: 7s;
    opacity: 0;
}

#made-with-love .mohsen-name {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    background: linear-gradient(135deg, var(--gold), var(--soft-pink), var(--gold));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.4)) drop-shadow(0 0 15px rgba(255,105,180,0.3));
    line-height: 1.3;
}

@keyframes madeWithLoveAppear {
    0% { opacity: 0; transform: translateX(-50%) translateY(15px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === QUEENA NINA SUBTITLE STYLE === */
.title-sub {
    display: block;
    font-family: 'Great Vibes', cursive !important;
    font-size: clamp(1.1rem, 3.5vw, 1.8rem) !important;
    color: var(--gold) !important;
    margin-top: 2px;
    opacity: 0.95 !important;
    letter-spacing: 3px;
    text-shadow: 0 0 15px rgba(255,215,0,0.5), 0 0 30px rgba(255,215,0,0.2) !important;
    animation: fadeGlow 2s ease-in-out infinite alternate;
}

/* === AMBIENT LIGHT EFFECTS === */
#main-container::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,20,147,0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
    animation: ambientPulse 5s ease-in-out infinite;
}

#main-container::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(255,0,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
    animation: ambientPulse 7s ease-in-out infinite reverse;
}

@keyframes ambientPulse {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.2); }
}
