/* ================================
   EID MUBARAK - GLOW EDITION
   ================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #050505;
    --gold: #ffd700;
    --gold-light: #ffed4e;
    --gold-dark: #daa520;
    --emerald: #10b981;
    --purple: #8b5cf6;
    --text: #ffffff;
    --text-muted: #71717a;
}

html, body {
    height: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    overflow: hidden;
}

/* ================================
   BACKGROUND GLOW
   ================================ */

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.6;
    pointer-events: none;
    animation: float-orb 10s ease-in-out infinite;
}

.glow-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.25), transparent 60%);
    top: -250px;
    right: -250px;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent 60%);
    bottom: -200px;
    left: -200px;
    animation-delay: -5s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
}

/* ================================
   CONTAINER
   ================================ */

.container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ================================
   CARD WRAPPER WITH GLOW
   ================================ */

.card-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 620px;
}

/* Outer glow ring */
.card-wrapper::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.3), 
        transparent 40%,
        transparent 60%,
        rgba(16, 185, 129, 0.3));
    border-radius: 40px;
    filter: blur(30px);
    opacity: 0.5;
    animation: glow-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* ================================
   MESSAGE CARD (Behind) - WITH GLOW
   ================================ */

.message-card {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #0f172a 0%, #1a1a2e 50%, #0f172a 100%);
    border-radius: 28px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    z-index: 1;
    box-shadow: 
        0 0 60px rgba(255, 215, 0, 0.15),
        0 25px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

/* Inner glow */
.message-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.message-card::-webkit-scrollbar {
    display: none;
}

/* Close button with glow */
.btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 14px;
    color: var(--gold);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.btn-close:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--gold-light);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

/* Content */
.msg-header {
    text-align: center;
    margin-bottom: 28px;
    padding-top: 20px;
    position: relative;
    z-index: 2;
}

.bismillah {
    font-family: 'Noto Naskh Arabic', serif;
    font-size: 20px;
    color: var(--emerald);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 24px;
}

.divider::before,
.divider::after {
    content: '';
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    box-shadow: 0 0 10px var(--gold);
}

.divider-icon {
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px var(--gold));
}

.icon-small {
    width: 16px;
    height: 16px;
    fill: var(--gold);
}

.arabic-text {
    font-family: 'Noto Naskh Arabic', serif;
    font-size: 32px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    line-height: 1.4;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.2));
}

.latin-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 14px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    letter-spacing: 1px;
}

.meaning {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
}

/* Message box with glow */
.msg-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

.msg-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 14px;
}

.msg-text:last-child {
    margin-bottom: 0;
}

.sender {
    font-size: 16px;
    font-weight: 600;
    color: var(--emerald);
    text-align: center;
    margin-top: 18px;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* Personal Note - Italic with glow */
.personal-note {
    font-size: 13px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: 16px 0 20px;
    padding: 0 10px;
    line-height: 1.6;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Footer */
.msg-footer {
    margin-top: auto;
    text-align: center;
    padding-top: 10px;
    position: relative;
    z-index: 2;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.icon-svg {
    width: 28px;
    height: 28px;
    fill: var(--gold);
    filter: drop-shadow(0 0 10px var(--gold));
    animation: icon-glow 2s ease-in-out infinite;
}

.icon-svg:nth-child(2) {
    animation-delay: 0.5s;
}

.icon-svg:nth-child(3) {
    animation-delay: 1s;
}

@keyframes icon-glow {
    0%, 100% { filter: drop-shadow(0 0 5px var(--gold)); }
    50% { filter: drop-shadow(0 0 15px var(--gold)); }
}

.footer-text {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ================================
   COVER CARD (Front) - WITH GLOW
   ================================ */

.cover-card {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f172a 50%, #1a1a2e 100%);
    border-radius: 28px;
    border: 1px solid rgba(255, 215, 0, 0.25);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    cursor: pointer;
    box-shadow: 
        0 0 60px rgba(255, 215, 0, 0.2),
        0 30px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    
    transform: translateY(0);
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Animated border glow */
.cover-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    background: linear-gradient(135deg, 
        var(--gold) 0%, 
        transparent 30%,
        transparent 70%,
        var(--emerald) 100%);
    z-index: -1;
    opacity: 0.5;
    animation: border-rotate 6s linear infinite;
}

.cover-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 215, 0, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

@keyframes border-rotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.cover-card.open {
    transform: translateY(110%);
    box-shadow: none;
}

/* Moon with glow */
.moon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 35px;
}

.moon-glow {
    position: absolute;
    inset: -25px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: moon-pulse 3s ease-in-out infinite;
}

@keyframes moon-pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.moon-svg {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
}

/* Text with glow */
.cover-title {
    font-size: 34px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--gold-light) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
}

.cover-subtitle {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.cover-date {
    font-size: 13px;
    color: var(--gold);
    letter-spacing: 4px;
    margin-bottom: 45px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Tap hint with glow */
.tap-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tap-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tap-float 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.tap-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--gold);
    filter: drop-shadow(0 0 10px var(--gold));
}

@keyframes tap-float {
    0%, 100% { 
        transform: translateY(0); 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    }
    50% { 
        transform: translateY(-10px); 
        box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
    }
}

.tap-text {
    font-size: 12px;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 480px) {
    .card-wrapper {
        height: 580px;
    }
    
    .cover-title {
        font-size: 28px;
    }
    
    .cover-subtitle {
        font-size: 22px;
    }
    
    .arabic-text {
        font-size: 26px;
    }
    
    .latin-text {
        font-size: 18px;
    }
    
    .moon-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .message-card,
    .cover-card {
        padding: 35px 28px;
    }
    
    .card-wrapper::before {
        inset: -10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cover-card,
    .card-wrapper::before {
        animation: none;
    }
    
    .tap-icon,
    .moon-glow,
    .icon-svg {
        animation: none;
    }
}
