@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Dancing+Script:wght@600;700&display=swap');

:root {
    --bg-dark: #070913;
    --bg-card: rgba(18, 24, 43, 0.75);
    --primary-gold: #f59e0b;
    --accent-pink: #ec4899;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.12);
    --gold-glow: 0 0 25px rgba(245, 158, 11, 0.45);
    --pink-glow: 0 0 25px rgba(236, 72, 153, 0.45);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at 50% 15%, #1e1b4b 0%, #0d1127 50%, #06070c 100%);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background canvas for star dust */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* ==============================================================
   FLOATING CORNER MUSIC BUTTON (Küncdə yerləşən animasiyalı ikon)
   ============================================================== */
.corner-music-btn {
    position: fixed;
    top: max(18px, env(safe-area-inset-top, 18px));
    right: max(18px, env(safe-area-inset-right, 18px));
    z-index: 1000;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(18, 24, 43, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.corner-music-btn:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.5);
}

.corner-music-btn.active {
    border-color: rgba(236, 72, 153, 0.7);
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.5);
    background: rgba(24, 18, 43, 0.9);
}

/* Animated Sound Wave Equalizer Bars */
.music-wave-bars {
    display: flex;
    align-items: center;
    gap: 3.5px;
    height: 22px;
}

.music-wave-bars .bar {
    width: 3.5px;
    background: #94a3b8;
    border-radius: 999px;
    height: 6px;
    transition: all 0.25s ease;
}

.corner-music-btn.active .music-wave-bars .bar {
    background: linear-gradient(180deg, #ec4899, #f59e0b);
    animation: soundWave 1.1s ease-in-out infinite alternate;
}

.corner-music-btn.active .music-wave-bars .bar-1 { animation-delay: 0.1s; }
.corner-music-btn.active .music-wave-bars .bar-2 { animation-delay: 0.35s; }
.corner-music-btn.active .music-wave-bars .bar-3 { animation-delay: 0.2s; }
.corner-music-btn.active .music-wave-bars .bar-4 { animation-delay: 0.45s; }

@keyframes soundWave {
    0% { height: 5px; opacity: 0.7; }
    50% { height: 21px; opacity: 1; }
    100% { height: 8px; opacity: 0.8; }
}

/* ==============================================================
   ULTRA-REALISTIC 3D METALLIC BALLOONS (Mükəmməl 3D Şarlar)
   ============================================================== */
.balloons-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.balloon {
    position: absolute;
    bottom: -180px;
    width: 58px;
    height: 72px;
    border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
    animation: floatRealistic linear infinite;
    transform-origin: center bottom;
    box-shadow: 
        inset -7px -12px 22px rgba(0, 0, 0, 0.5),
        inset 5px 6px 14px rgba(255, 255, 255, 0.55),
        0 18px 38px rgba(0, 0, 0, 0.45);
}

/* Layering: Depth of field */
.balloon.layer-back {
    z-index: 1;
    opacity: 0.7;
    filter: blur(0.8px) drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.balloon.layer-front {
    z-index: 2;
    opacity: 0.95;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.45));
}

/* Specular Light Reflection (Soft curved highlight spot) */
.balloon-highlight {
    position: absolute;
    top: 12%;
    left: 18%;
    width: 30%;
    height: 40%;
    border-radius: 50%;
    background: radial-gradient(ellipse at 35% 35%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.35) 45%, rgba(255, 255, 255, 0) 80%);
    transform: rotate(-30deg);
    pointer-events: none;
}

/* Secondary tiny bright pin-point sparkle on the balloon */
.balloon-highlight::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

/* Realistic Tied Balloon Knot at Bottom */
.balloon-knot {
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 8px;
    border-radius: 2px 2px 50% 50%;
    filter: brightness(0.75);
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Floating & Curling Festive Ribbon String */
.balloon-ribbon {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 1.8px;
    height: 75px;
    background: linear-gradient(180deg, var(--ribbon-color, rgba(255,255,255,0.7)) 0%, rgba(255,255,255,0.2) 100%);
    transform-origin: top center;
    animation: ribbonSway 3.2s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.25));
}

@keyframes floatRealistic {
    0% {
        transform: translateY(0) scale(var(--scale-factor, 1)) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
        transform: translateY(-15vh) scale(var(--scale-factor, 1)) rotate(-4deg);
    }
    35% {
        transform: translateY(-45vh) scale(var(--scale-factor, 1)) rotate(6deg);
    }
    65% {
        transform: translateY(-75vh) scale(var(--scale-factor, 1)) rotate(-5deg);
    }
    90% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(-125vh) scale(var(--scale-factor, 1)) rotate(8deg);
        opacity: 0;
    }
}

@keyframes ribbonSway {
    0% { transform: rotate(-9deg) skewX(-4deg); }
    100% { transform: rotate(10deg) skewX(5deg); }
}

/* Main App Wrapper */
.app-wrapper {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 80px 20px;
    max-width: 1320px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

/* Tofiq's 3D Avatar Hero Display */
.avatar-hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.avatar-glow-ring {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #8b5cf6 100%);
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.45), 0 12px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    cursor: pointer;
}

.avatar-glow-ring:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 0 45px rgba(236, 72, 153, 0.6), 0 16px 36px rgba(0, 0, 0, 0.7);
}

.tofiq-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid #0b0f19;
    display: block;
    background: #e2e8f0;
}

.avatar-crown {
    position: absolute;
    top: -12px;
    right: -4px;
    font-size: 1.8rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    animation: crownFloat 2.4s ease-in-out infinite alternate;
}

@keyframes crownFloat {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-7px) rotate(8deg); }
}

.avatar-tag-pill {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.45);
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #fef08a;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.avatar-tag-pill strong {
    color: #ffffff;
    font-weight: 700;
}

.sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #fbbf24;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 14px;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
    animation: pulseBadge 2.5s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); }
    50% { transform: scale(1.03); box-shadow: 0 0 25px rgba(245, 158, 11, 0.4); }
}

.main-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #fde68a 40%, #f472b6 75%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 8px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.sub-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    color: #fbcfe8;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(244, 114, 182, 0.6);
}

/* Control Bar */
.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 25px;
}

.btn-pill {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-pill:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-pill.gold {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
    border-color: rgba(245, 158, 11, 0.6);
    color: #fef3c7;
}

.btn-pill.gold:hover {
    box-shadow: var(--gold-glow);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
}

/* ==============================================================
   3D CHOCOLATE CAKE STAGE SECTION
   ============================================================== */
.cake-stage-container {
    width: 100%;
    max-width: 820px;
    height: 480px;
    position: relative;
    margin: 10px auto 35px auto;
    border-radius: 28px;
    background: radial-gradient(circle at 50% 60%, rgba(245, 158, 11, 0.08) 0%, rgba(15, 23, 42, 0) 70%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7);
    overflow: visible;
}

#cake-canvas {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    cursor: grab;
    touch-action: pan-y;
}

#cake-canvas:active {
    cursor: grabbing;
}

/* ==============================================================
   VIDEO PLAY BUTTON (Directly Above 3D Cake)
   ============================================================== */
.floating-video-trigger {
    position: absolute;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-video-trigger:hover {
    transform: translateX(-50%) translateY(-5px) scale(1.06);
}

.play-button-pulsar {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f43f5e 0%, #ec4899 50%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.6), 0 10px 25px rgba(0,0,0,0.5);
    border: 3px solid rgba(255, 255, 255, 0.9);
}

.play-button-pulsar::before,
.play-button-pulsar::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid rgba(244, 63, 94, 0.5);
    animation: ripplePulse 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.play-button-pulsar::after {
    animation-delay: 1.1s;
}

@keyframes ripplePulse {
    0% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.play-icon-svg {
    width: 28px;
    height: 28px;
    fill: #ffffff;
    margin-left: 4px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.video-label-tag {
    margin-top: 10px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.02em;
}

/* ==============================================================
   3 XÜSUSİ TƏBRİK AÇIQCASI (GREETING CARDS)
   ============================================================== */
.cards-section {
    width: 100%;
    margin-top: 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Card 3D Flip & Envelope Styles */
.card-item {
    perspective: 1400px;
    height: 440px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.card-item.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-glass);
    overflow: hidden;
}

/* Theme 1: Gold Luxury */
.card-theme-gold .card-front {
    background: linear-gradient(145deg, #1e1b2e 0%, #2b1f1d 50%, #15141e 100%);
    border-color: rgba(245, 158, 11, 0.35);
}
.card-theme-gold .card-back {
    background: linear-gradient(145deg, #2a2318 0%, #181928 100%);
    border-color: rgba(245, 158, 11, 0.5);
}

/* Theme 2: Rose Ruby */
.card-theme-rose .card-front {
    background: linear-gradient(145deg, #2b1220 0%, #1f142b 50%, #120e1f 100%);
    border-color: rgba(244, 63, 94, 0.35);
}
.card-theme-rose .card-back {
    background: linear-gradient(145deg, #321626 0%, #171529 100%);
    border-color: rgba(244, 63, 94, 0.5);
}

/* Theme 3: Emerald Cosmic */
.card-theme-emerald .card-front {
    background: linear-gradient(145deg, #0d2822 0%, #111d2e 50%, #0d121f 100%);
    border-color: rgba(16, 185, 129, 0.35);
}
.card-theme-emerald .card-back {
    background: linear-gradient(145deg, #102d25 0%, #0d1a29 100%);
    border-color: rgba(16, 185, 129, 0.5);
}

/* Card Front Elements */
.card-cover-badge {
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.card-center-seal {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: auto 0;
}

.wax-seal {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    position: relative;
    border: 2px dashed rgba(255,255,255,0.3);
    animation: rotateSlow 20s linear infinite;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wax-seal span {
    animation: counterRotate 20s linear infinite;
}

@keyframes counterRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.card-cover-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.card-cover-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-tap-indicator {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Card Back Elements (Inside the card) */
.card-back {
    transform: rotateY(180deg);
}

.card-header-inside {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 12px;
}

.card-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-gold);
    text-transform: uppercase;
}

.btn-close-card {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-card:hover {
    color: #fff;
}

.card-body-text {
    margin: 20px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-message-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #f1f5f9;
    font-style: italic;
    margin-bottom: 16px;
    white-space: pre-line;
}

.card-signature {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    color: #fbcfe8;
    text-align: right;
}

.card-actions-inside {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-glass);
    padding-top: 14px;
}

.btn-edit-wish {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #cbd5e1;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit-wish:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.stamp-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==============================================================
   VIDEO MODAL
   ============================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.video-modal-card {
    width: 100%;
    max-width: 760px;
    background: #111827;
    border: 1px solid var(--border-glass);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(244, 63, 94, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .video-modal-card {
    transform: scale(1) translateY(0);
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 26px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-glass);
}

.video-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-mini-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 2px solid var(--primary-gold);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    background: #ef4444;
    transform: rotate(90deg);
}

.video-player-frame {
    width: 100%;
    height: 380px;
    background: #030712;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.simulated-video-content {
    text-align: center;
    padding: 30px;
}

.video-cake-icon {
    font-size: 3.5rem;
    animation: bounceSlow 2s infinite ease-in-out;
    margin-bottom: 15px;
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.simulated-video-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.simulated-video-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 460px;
    line-height: 1.6;
}

.custom-video-embed {
    width: 100%;
    height: 100%;
    border: none;
}

.video-modal-footer {
    padding: 18px 26px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-glass);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
}

.video-url-input-wrap {
    display: flex;
    gap: 8px;
    flex-grow: 1;
    max-width: 480px;
}

.input-video-url {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    padding: 8px 14px;
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
}

.input-video-url:focus {
    border-color: var(--primary-gold);
}

.btn-apply-video {
    background: var(--primary-gold);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-apply-video:hover {
    opacity: 0.9;
}

/* ==============================================================
   FOOTER
   ============================================================== */
.app-footer {
    margin-top: 60px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 25px;
    width: 100%;
}

/* ==============================================================
   RESPONSIVE DESIGN (Telefon, Planşet və Kompüter Uyğunluğu)
   ============================================================== */

/* 1. Böyük Planşet və Kiçik Notbuklar (max-width: 1024px) */
@media (max-width: 1024px) {
    .app-wrapper {
        padding: 25px 20px 70px 20px;
    }
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 22px;
    }
    .cake-stage-container {
        max-width: 720px;
        height: 440px;
    }
}

/* 2. Standart Planşet və Smartfonlar (max-width: 768px) */
@media (max-width: 768px) {
    .corner-music-btn {
        top: max(14px, env(safe-area-inset-top, 14px));
        right: max(14px, env(safe-area-inset-right, 14px));
        width: 46px;
        height: 46px;
    }
    .music-wave-bars {
        height: 18px;
        gap: 3px;
    }
    .music-wave-bars .bar {
        width: 3px;
    }

    .app-wrapper {
        padding: 20px 16px 60px 16px;
    }

    .avatar-glow-ring {
        width: 102px;
        height: 102px;
    }

    .avatar-crown {
        font-size: 1.5rem;
        top: -10px;
        right: -3px;
    }

    .main-title {
        font-size: clamp(2rem, 6.5vw, 2.8rem);
        margin-bottom: 6px;
    }

    .sub-title {
        font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    }

    .action-bar {
        gap: 10px;
        margin-top: 16px;
        margin-bottom: 20px;
    }

    .btn-pill {
        padding: 9px 18px;
        font-size: 0.88rem;
    }

    .cake-stage-container {
        height: 350px;
        border-radius: 22px;
        margin: 5px auto 30px auto;
    }

    #cake-canvas {
        border-radius: 22px;
    }

    .floating-video-trigger {
        top: 22px;
    }

    .play-button-pulsar {
        width: 62px;
        height: 62px;
    }

    .play-icon-svg {
        width: 24px;
        height: 24px;
    }

    .video-label-tag {
        font-size: 0.78rem;
        padding: 4px 12px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 22px;
        max-width: 480px;
        margin: 0 auto;
    }

    .card-item {
        height: 430px;
    }

    .card-front,
    .card-back {
        padding: 26px 20px;
        border-radius: 22px;
    }

    .card-message-text {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .card-signature {
        font-size: 1.45rem;
    }

    /* Video Modal */
    .video-modal-card {
        border-radius: 22px;
        width: 95%;
    }

    .video-modal-header {
        padding: 16px 20px;
    }

    .video-modal-title {
        font-size: 1.05rem;
    }

    .video-player-frame {
        height: 260px;
    }

    .video-modal-footer {
        padding: 14px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .video-url-input-wrap {
        max-width: 100%;
    }
}

/* 3. Kompakt Telefonlar (max-width: 480px) */
@media (max-width: 480px) {
    .corner-music-btn {
        top: max(12px, env(safe-area-inset-top, 12px));
        right: max(12px, env(safe-area-inset-right, 12px));
        width: 42px;
        height: 42px;
    }

    .app-wrapper {
        padding: 16px 12px 50px 12px;
    }

    .avatar-glow-ring {
        width: 90px;
        height: 90px;
        box-shadow: 0 0 25px rgba(245, 158, 11, 0.4), 0 8px 20px rgba(0, 0, 0, 0.5);
    }

    .avatar-crown {
        font-size: 1.35rem;
        top: -8px;
        right: -2px;
    }

    .avatar-tag-pill {
        font-size: 0.8rem;
        padding: 4px 12px;
        margin-top: 10px;
    }

    .main-title {
        font-size: 2.1rem;
    }

    .sub-title {
        font-size: 1.25rem;
    }

    .cake-stage-container {
        height: 310px;
        border-radius: 18px;
    }

    #cake-canvas {
        border-radius: 18px;
    }

    .card-item {
        height: 420px;
    }

    .card-front,
    .card-back {
        padding: 22px 16px;
        border-radius: 18px;
    }

    .wax-seal {
        width: 66px;
        height: 66px;
        font-size: 1.8rem;
        margin-bottom: 14px;
    }

    .card-cover-title {
        font-size: 1.3rem;
    }

    .card-message-text {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 12px;
    }

    .card-signature {
        font-size: 1.35rem;
    }

    .video-player-frame {
        height: 220px;
    }
}

/* 4. Çox Kiçik Ekranlar (max-width: 360px) */
@media (max-width: 360px) {
    .cake-stage-container {
        height: 280px;
    }
    .card-item {
        height: 440px;
    }
    .card-message-text {
        font-size: 0.84rem;
        line-height: 1.55;
    }
    .main-title {
        font-size: 1.85rem;
    }
}
