/* ط·آ£ط¸â€‍ط¸ث†ط·آ§ط¸â€  ط·آ§ط¸â€‍ط¸ئ’ط·آ§ط¸ث†ط·آ§ط¸ظ¹ط¸ظ¹ ط¸ث†ط·آ§ط¸â€‍ط·آ¨ط·آ§ط·آ³ط·ع¾ط¸ظ¹ط¸â€‍ */
:root {
    --bg-color: #fff0f5; /* ط¸ث†ط·آ±ط·آ¯ط¸ظ¹ ط¸â€ ط·آ§ط·آ¹ط¸â€¦ ط·آ¬ط·آ¯ط·آ§ط¸â€¹ (Lavender Blush) */
    --primary: #ffb6c1; /* ط¸ث†ط·آ±ط·آ¯ط¸ظ¹ ط¸ظ¾ط·آ§ط·ع¾ط·آ­ */
    --primary-dark: #ff9fb0;
    --secondary: #add8e6; /* ط·آ³ط¸â€¦ط·آ§ط¸ث†ط¸ظ¹ ط¸ظ¾ط·آ§ط·ع¾ط·آ­ */
    --accent: #ffdf00; /* ط·آ£ط·آµط¸ظ¾ط·آ± ط·آ¨ط·آ§ط·آ³ط·ع¾ط¸ظ¹ط¸â€‍ */
    --text-color: #555;
    --font-family: 'Baloo Bhaijaan 2', cursive;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    background-image: url('assets/bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--text-color);
    overflow: hidden;
    touch-action: manipulation;
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease, background-color 2.5s ease-in-out;
    padding: 20px;
    text-align: center;
    transform: scale(0.95);
    background-color: transparent;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hidden {
    display: none !important;
}

.cute-btn {
    background-color: var(--primary);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-family: var(--font-family);
    font-weight: 800;
    color: #fff;
    box-shadow: 0 6px 0 var(--primary-dark), 0 10px 15px rgba(255, 182, 193, 0.4);
    cursor: pointer;
    transition: all 0.1s ease;
    margin: 10px;
}

.cute-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 var(--primary-dark), 0 2px 5px rgba(255, 182, 193, 0.4);
}

.cute-btn.close-btn {
    background-color: #ddd;
    box-shadow: 0 6px 0 #bbb;
    color: #555;
}

.cute-btn.close-btn:active {
    box-shadow: 0 0 0 #bbb;
}

/* ط·آ§ط¸â€‍ط·ع¾ط·آ±ط·آ­ط¸ظ¹ط·آ¨ - ط·آ§ط¸â€‍ط·آ´ط¸â€¦ط·آ¹ط·آ© ط¸ث†ط·آ§ط¸â€‍ط·آ¸ط¸â€‍ط·آ§ط¸â€¦ */
.screen.dark-mode {
    background-color: #111;
    transition: background-color 1.5s ease-in-out;
}

.candle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1s;
    margin-top: -30px;
}

.custom-candle {
    position: relative;
    width: 70px;
    height: 180px;
    cursor: pointer;
    margin-top: 40px;
}

.wax, .candle-top, .wick {
    transition: filter 2.5s ease-in-out, box-shadow 2.5s ease-in-out;
}

.screen.dark-mode .wax,
.screen.dark-mode .candle-top {
    filter: brightness(0.15) sepia(0.6) contrast(1.2);
    box-shadow: 0 15px 30px rgba(0,0,0,0.8);
}

.wax {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #e6d8b8 0%, #fff7e6 30%, #fff7e6 70%, #d4c4a1 100%);
    border-radius: 3px 3px 15px 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    position: absolute;
    top: 0;
    left: 0;
}

.candle-top {
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 24px;
    background: radial-gradient(circle at 50% 50%, #fff9eb 0%, #e6d8b8 100%);
    border-radius: 50%;
    z-index: 2;
}

.wick {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 18px;
    background: linear-gradient(to bottom, #111, #444);
    border-radius: 2px 2px 0 0;
    z-index: 3;
}

.flame {
    position: absolute;
    top: -70px;
    left: 50%;
    margin-left: -14px;
    width: 28px;
    height: 50px;
    background: #ff9d00;
    border-radius: 50% 50% 20% 20%;
    box-shadow: 
        0 0 20px rgba(255, 223, 0, 0.8), 
        0 0 60px rgba(255, 140, 0, 0.8), 
        inset 0 0 10px rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: scale(0);
    transition: opacity 1.5s ease-in, transform 1.5s ease-out;
    transform-origin: bottom center;
    z-index: 4;
}

.flame.lit {
    opacity: 1;
    transform: scale(1);
    animation: flicker 0.15s infinite alternate;
}

.flame::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 20px;
    background: #fff;
    border-radius: 50% 50% 20% 20%;
    box-shadow: 0 0 10px #fff;
}

/* ط¸â€ڑط·آ·ط·آ±ط·آ§ط·ع¾ ط·آ§ط¸â€‍ط·آ´ط¸â€¦ط·آ¹ ط·آ§ط¸â€‍ط·آ°ط·آ§ط·آ¦ط·آ¨ */
.wax::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 15px;
    width: 8px;
    height: 45px;
    background: #fff7e6;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wax::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 18px;
    width: 6px;
    height: 60px;
    background: #fff7e6;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

@keyframes flicker {
    from { transform: scale(1) rotate(-1deg); box-shadow: 0 0 20px rgba(255,223,0,0.8), 0 0 40px rgba(255,140,0,0.6); }
    to { transform: scale(1.05) rotate(1deg); box-shadow: 0 0 30px rgba(255,223,0,1), 0 0 70px rgba(255,140,0,1); }
}

.instruction {
    font-size: 1.2rem;
    color: #888;
    margin-top: 20px;
    transition: opacity 0.5s;
}

.instruction.dark-text {
    color: #555;
}

.age-text {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-dark);
    background: linear-gradient(135deg, #fff0f5, #ffe4e1);
    margin: 5px auto 15px auto;
    padding: 5px 30px;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.8);
    border: 3px solid #ffb6c1;
    position: relative;
    animation: bounce-age 3s infinite ease-in-out;
}

@keyframes bounce-age {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

.hbd-text {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #fff;
}

.photo-placeholder {
    width: 180px;
    height: 180px;
    background-color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    border: 8px solid #fff;
    box-shadow: 0 8px 20px rgba(173, 216, 230, 0.6);
    color: #fff;
    font-weight: bold;
    font-size: 1.5rem;
}

.bounce-in {
    animation: bounce-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes bounce-in {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ط·آµط¸ظ¾ط·آ­ط·آ© ط·آ§ط¸â€‍ط¸ظ¾ط¸ث†ط¸ظ¹ط·آ³ط·آ§ط·ع¾ */
.title-top {
    position: absolute;
    top: 40px;
    color: var(--primary-dark);
    z-index: 5;
}

.floating-avatars {
    width: 100%;
    height: 100%;
    position: relative;
    margin-top: 80px;
    z-index: 2;
}

/* ط·آ®ط¸â€‍ط¸ظ¾ط¸ظ¹ط·آ© ط¸â€¦ط·ع¾ط¸ث†ط¸â€،ط·آ¬ط·آ© ط·آ¯ط¸ظ¹ط¸â€ ط·آ§ط¸â€¦ط¸ظ¹ط¸ئ’ط¸ظ¹ط·آ© */
.page-2-bg-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 100%);
    transition: background 1s ease-in-out;
    z-index: 1;
    pointer-events: none;
}

.avatar-bubble {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.5);
    /* Glassmorphism Lantern Effect */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1), inset 0 0 15px rgba(255,255,255,0.4);
    animation: floatLantern 4s ease-in-out infinite alternate;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}

.avatar-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2), inset 0 0 20px rgba(255,255,255,0.6);
}

.avatar-bubble:active {
    transform: scale(0.95);
}

@keyframes floatLantern {
    0% { transform: translateY(0px) rotate(-3deg); }
    100% { transform: translateY(-25px) rotate(3deg); }
}

/* ط¸â€¦ط·آ´ط·ط›ط¸â€‍ ط·آ§ط¸â€‍ط·آµط¸ث†ط·ع¾ ط·آ§ط¸â€‍ط¸â€¦ط·آ·ط¸ث†ط·آ± (Glassmorphism) */
.voice-player-modal {
    position: absolute;
    bottom: -120%;
    left: 0;
    width: 100%;
    padding: 0 15px 30px;
    transition: bottom 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 10;
}

.voice-player-modal.active {
    bottom: 0;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 35px;
    padding: 30px 20px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.08), 0 15px 35px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.player-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin-bottom: 15px;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.player-name {
    font-size: 1.6rem;
    color: #444;
    margin: 0;
    font-weight: 800;
}

/* ط·آ§ط¸â€‍ط¸â€¦ط·آ¤ط·آ«ط·آ±ط·آ§ط·ع¾ ط·آ§ط¸â€‍ط·آ¨ط·آµط·آ±ط¸ظ¹ط·آ© (Visualizer) */
.visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 50px;
    margin: 15px 0;
}

.visualizer .bar {
    width: 6px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: height 0.1s ease;
}

.visualizer.playing .bar {
    animation: visualize 0.6s ease-in-out infinite alternate;
}

.visualizer.playing .bar:nth-child(2) { animation-delay: 0.1s; }
.visualizer.playing .bar:nth-child(3) { animation-delay: 0.2s; }
.visualizer.playing .bar:nth-child(4) { animation-delay: 0.3s; }
.visualizer.playing .bar:nth-child(5) { animation-delay: 0.4s; }
.visualizer.playing .bar:nth-child(6) { animation-delay: 0.3s; }
.visualizer.playing .bar:nth-child(7) { animation-delay: 0.2s; }
.visualizer.playing .bar:nth-child(8) { animation-delay: 0.1s; }
.visualizer.playing .bar:nth-child(9) { animation-delay: 0.0s; }

@keyframes visualize {
    0% { height: 8px; }
    100% { height: 45px; }
}

/* ط·آ´ط·آ±ط¸ظ¹ط·آ· ط·آ§ط¸â€‍ط·ع¾ط¸â€ڑط·آ¯ط¸â€¦ */
.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding: 0 10px;
}

.time {
    font-size: 0.85rem;
    color: #888;
    font-family: monospace;
    font-weight: bold;
}

.progress-bar-bg {
    flex-grow: 1;
    height: 6px;
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
    margin: 0 15px;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* ط·آ§ط¸â€‍ط·آ£ط·آ²ط·آ±ط·آ§ط·آ± ط·آ§ط¸â€‍ط·آ¹ط·آµط·آ±ط¸ظ¹ط·آ© */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
    padding: 15px;
    border-radius: 50%;
}

.icon-btn:hover {
    color: var(--primary-dark);
    background: rgba(255,255,255,0.5);
}

.icon-btn:active {
    transform: scale(0.9);
}

.play-btn {
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    box-shadow: 0 8px 20px rgba(255, 182, 193, 0.6);
}

.play-btn:hover {
    background: var(--primary-dark);
    color: white;
}

.close-player-btn {
    background: #f0f0f0;
    width: 50px;
    height: 50px;
}


/* ط·آµط¸ظ¾ط·آ­ط·آ© 3 */
.flirt-text {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.welcome-message {
    animation: fadeInUp 1s ease-out forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}


.page-2-bg-glow.active {
    pointer-events: auto;
    z-index: 9;
    cursor: pointer;
}


/* ط§ظ„طµظپط­ط© ط§ظ„ط£ظˆظ„ظ‰ */
#page-1 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.page-1-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
    animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.magical-card {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 400px;
    padding: 40px 30px;
}

.magical-title {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #fff;
}

.magical-text {
    font-size: 1.3rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 600;
}

.glow-btn {
    box-shadow: 0 0 20px rgba(255, 182, 193, 0.8);
    transition: all 0.3s;
}

.glow-btn:hover {
    box-shadow: 0 0 30px rgba(255, 182, 193, 1);
    transform: scale(1.05);
}





.painting-frame {
    background: #fff;
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(0,0,0,0.05);
    border: 6px solid #e2c08d;
    outline: 2px solid #8b5a2b;
    outline-offset: -6px;
    margin: 5px auto;
    position: relative;
}
.painting-img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border-radius: 4px;
}
