:root {
    --primary: #ff4757;
    --gold: #ffa502;
    --glass: rgba(255, 255, 255, 0.9);
    --dark-bg: #121212;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* يمنع الوميض الأزرق عند اللمس في الموبايل */
}

body {
    margin: 0;
    padding: 0;
    background: var(--dark-bg);
    background-image: radial-gradient(circle at center, #2f3542 0%, #121212 100%);
    font-family: 'Cairo', sans-serif;
    height: 100dvh; /* dvh لضمان التوافق مع متصفحات الموبايل */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #2f3542;
}

#app {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* تصميم الهدية */
#gift-wrapper {
    text-align: center;
    transition: all 0.6s ease;
}

.tap-hint {
    color: var(--gold);
    margin-bottom: 25px;
    font-size: 1.1rem;
    animation: bounce 2s infinite;
}

.gift-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    cursor: pointer;
}

.gift-box-main {
    width: 100%;
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    position: relative;
}

.gift-lid {
    position: absolute;
    width: 130px;
    height: 35px;
    background: #ff6b81;
    top: -32px;
    left: -5px;
    border-radius: 5px;
    z-index: 2;
    transition: 0.6s cubic-bezier(0.5, -0.5, 0.5, 1.5);
}

.ribbon-v {
    position: absolute;
    width: 25px;
    height: 100%;
    background: var(--gold);
    left: 50%;
    transform: translateX(-50%);
}

.ribbon-h {
    position: absolute;
    width: 100%;
    height: 25px;
    background: var(--gold);
    top: 50%;
    transform: translateY(-50%);
}

/* حالة الفتح */
.opened .gift-lid {
    transform: translateY(-160px) rotate(-15deg);
    opacity: 0;
}

.opened .gift-container {
    transform: scale(0);
    opacity: 0;
}

/* كارت الدعوة المتجاوب */
#birthday-card {
    width: 100%;
    max-width: 360px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

#birthday-card.show {
    opacity: 1;
    transform: translateY(0);
}

.glass-content {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px 20px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.3);
}

.main-title {
    font-family: 'Pacifico', cursive;
    color: var(--primary);
    margin: 0;
    font-size: 1.8rem;
}

.user-name {
    font-size: 2.3rem;
    font-weight: 700;
    margin: 10px 0;
    color: #1e272e;
}

.invite-msg {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1rem;
}

.info-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.badge {
    background: white;
    flex: 1;
    padding: 12px 5px;
    border-radius: 15px;
    font-weight: bold;
    color: var(--primary);
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.cta-button {
    display: block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 16px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.hidden { display: none !important; }