:root {
    --royal-black: #0A0A0A;
    --royal-gold: #D4AF37;
    --royal-maroon: #4A0404;
    --paper: #FDFBF7;
    --text-light: #E5E5E5;
    --gold-gradient: linear-gradient(45deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; background-color: #000; overflow-x: hidden; }

body {
    font-family: 'Lora', serif;
    color: var(--text-light);
    background-color: var(--royal-black);
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 100px rgba(0,0,0,1);
}

.velvet-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
    opacity: 0.3; pointer-events: none; z-index: 0;
}

/* Typography */
h1, h2, h3 { font-family: 'Cinzel', serif; color: var(--royal-gold); text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.cursive { font-family: 'Sacramento', cursive; color: var(--royal-gold); font-size: 3rem; }
.arabic { font-family: 'Amiri', serif; font-size: 1.8rem; color: var(--royal-gold); direction: rtl; padding: 20px 0; }

section { padding: 80px 20px; text-align: center; position: relative; z-index: 1; }

/* Animations */
.reveal { opacity: 0; transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1); }
.reveal-bottom { transform: translateY(30px); }
.reveal.active { opacity: 1; transform: translate(0,0); }

/* Cover Layer */
#cover {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 500px; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.9)),
                url('https://images.unsplash.com/photo-1605335133604-5f50f7574577?auto=format&fit=crop&w=800');
    background-size: cover; background-position: center;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 10000; transition: 1.5s cubic-bezier(0.85, 0, 0.15, 1); color: var(--royal-gold);
    text-align: center; border: 15px solid var(--royal-black);
    outline: 1px solid var(--royal-gold); outline-offset: -8px;
}
#cover.hide { transform: translateX(-50%) translateY(-110%); }

.btn-open {
    padding: 12px 35px; background: transparent; color: var(--royal-gold);
    border: 1px solid var(--royal-gold); font-family: 'Cinzel', serif;
    font-weight: 700; cursor: pointer; letter-spacing: 3px;
    margin-top: 30px; border-radius: 2px;
}

/* Profiles */
.frame-signature {
    width: 240px; height: 340px; margin: 0 auto 20px;
    border: 3px solid var(--royal-gold); padding: 8px;
    background: #000; position: relative;
    clip-path: polygon(10% 0, 90% 0, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0 90%, 0 10%);
}
.frame-signature img { width: 100%; height: 100%; object-fit: cover; }

/* Timer */
.timer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 25px; }
.timer-item { border: 1px solid rgba(212, 175, 55, 0.2); padding: 12px 5px; border-radius: 4px; }
.timer-item span { display: block; font-size: 1.3rem; font-weight: 700; color: var(--royal-gold); }
.timer-item small { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1px; }

/* Event Cards */
.card-royal {
    background: rgba(255,255,255,0.05); padding: 35px 20px; border: 1px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 25px; border-radius: 4px;
}

.btn-maps {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border: 1px solid var(--royal-gold);
    color: var(--royal-gold); text-decoration: none; font-size: 0.7rem;
    font-family: 'Cinzel', serif; margin-top: 15px;
}

/* Gallery */
.masonry-grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; gap: 10px; margin-top: 25px; }
.masonry-item { border: 1px solid var(--royal-gold); overflow: hidden; }
.masonry-item img { width: 100%; height: 100%; object-fit: cover; }
.item-large { grid-column: span 2; grid-row: span 2; height: 320px; }

/* Form */
.rsvp-form { text-align: left; padding: 25px; border: 1px solid var(--royal-gold); }
.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
    width: 100%; padding: 12px; margin-bottom: 15px; background: transparent;
    border: none; border-bottom: 1px solid rgba(212, 175, 55, 0.5); color: white; outline: none; font-family: inherit;
}
.btn-submit { width: 100%; padding: 14px; background: var(--royal-gold); color: black; border: none; font-weight: 700; cursor: pointer; }

/* Fixed Controls */
.music-control { position: fixed; bottom: 25px; right: 25px; z-index: 1000; }
.music-btn {
    width: 45px; height: 45px; border-radius: 50%; background: var(--royal-black);
    color: var(--royal-gold); border: 2px solid var(--royal-gold); display: flex; justify-content: center; align-items: center; cursor: pointer;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}
.playing i { animation: spin 4s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.no-scroll { overflow: hidden; height: 100vh; }