/**
 * Appointment Booked Success Page Styles
 * Template: appointment-booked.php
 * SafeSante - Telemedicine Platform
 * Modern celebratory design with dynamic animations
 */

/* ==========================================================================
   0. Success Overlay Animation
   ========================================================================== */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.success-overlay.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.success-overlay.hidden {
    display: none;
}

.overlay-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Checkmark and Ripple Wrapper */
.checkmark-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ripple Waves */
.ripple-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ripple {
    position: absolute;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    animation: rippleWave 2s ease-out forwards;
}

.ripple-1 {
    width: 120px;
    height: 120px;
    animation-delay: 0.3s;
}

.ripple-2 {
    width: 200px;
    height: 200px;
    animation-delay: 0.5s;
}

.ripple-3 {
    width: 300px;
    height: 300px;
    animation-delay: 0.7s;
}

.ripple-4 {
    width: 400px;
    height: 400px;
    animation-delay: 0.9s;
}

@keyframes rippleWave {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Checkmark Circle */
.checkmark-circle {
    width: 120px;
    height: 120px;
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: scale(0);
    animation: checkmarkBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.2s;
}

.checkmark-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

.checkmark-circle-bg {
    stroke: #ffffff;
    stroke-width: 3;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: circleStroke 0.6s ease forwards;
    animation-delay: 0.3s;
}

.checkmark-check {
    stroke: #ffffff;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkStroke 0.4s ease forwards;
    animation-delay: 0.8s;
}

@keyframes checkmarkBounceIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes circleStroke {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes checkStroke {
    to {
        stroke-dashoffset: 0;
    }
}

/* Overlay Success Text */
.overlay-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: overlayTextIn 0.6s ease forwards;
    animation-delay: 1s;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@keyframes overlayTextIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page content hidden initially */
.appointment-booked-page .cgu-page-header,
.appointment-booked-page .appointment-page,
.appointment-booked-page .confetti-canvas {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.appointment-booked-page.content-visible .cgu-page-header,
.appointment-booked-page.content-visible .appointment-page,
.appointment-booked-page.content-visible .confetti-canvas {
    opacity: 1;
}

/* Pause all page animations initially */
.appointment-booked-page .device-image,
.appointment-booked-page .device-glow,
.appointment-booked-page .success-title,
.appointment-booked-page .success-title::after,
.appointment-booked-page .success-subtitle,
.appointment-booked-page .action-buttons,
.appointment-booked-page .btn-primary-action,
.appointment-booked-page .btn-primary-action::before,
.appointment-booked-page .btn-primary-action::after,
.appointment-booked-page .confetti-float,
.appointment-booked-page .burst-ring,
.appointment-booked-page .particle,
.appointment-booked-page .squiggle,
.appointment-booked-page .sparkle {
    animation-play-state: paused;
}

/* Play animations when content is visible */
.appointment-booked-page.content-visible .device-image,
.appointment-booked-page.content-visible .device-glow,
.appointment-booked-page.content-visible .success-title,
.appointment-booked-page.content-visible .success-title::after,
.appointment-booked-page.content-visible .success-subtitle,
.appointment-booked-page.content-visible .action-buttons,
.appointment-booked-page.content-visible .btn-primary-action,
.appointment-booked-page.content-visible .btn-primary-action::before,
.appointment-booked-page.content-visible .btn-primary-action::after,
.appointment-booked-page.content-visible .confetti-float,
.appointment-booked-page.content-visible .burst-ring,
.appointment-booked-page.content-visible .particle,
.appointment-booked-page.content-visible .squiggle,
.appointment-booked-page.content-visible .sparkle {
    animation-play-state: running;
}

/* Overlay Sparkle Particles */
.overlay-content::before,
.overlay-content::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: overlaySparkle 1.5s ease-in-out infinite;
}

.overlay-content::before {
    top: -60px;
    left: 80px;
    animation-delay: 0.5s;
}

.overlay-content::after {
    top: 20px;
    right: -80px;
    animation-delay: 0.8s;
}

@keyframes overlaySparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Overlay Responsive */
@media (max-width: 768px) {
    .checkmark-wrapper {
        width: 100px;
        height: 100px;
    }

    .checkmark-circle {
        width: 100px;
        height: 100px;
    }

    .ripple-container {
        width: 300px;
        height: 300px;
    }

    .ripple-1 { width: 100px; height: 100px; }
    .ripple-2 { width: 160px; height: 160px; }
    .ripple-3 { width: 230px; height: 230px; }
    .ripple-4 { width: 300px; height: 300px; }

    .overlay-text {
        font-size: 1.6rem;
        margin-top: 24px;
    }

    .overlay-content::before {
        top: -50px;
        left: 60px;
    }

    .overlay-content::after {
        top: 15px;
        right: -60px;
    }
}

@media (max-width: 480px) {
    .checkmark-wrapper {
        width: 80px;
        height: 80px;
    }

    .checkmark-circle {
        width: 80px;
        height: 80px;
    }

    .ripple-container {
        width: 240px;
        height: 240px;
    }

    .ripple-1 { width: 80px; height: 80px; }
    .ripple-2 { width: 130px; height: 130px; }
    .ripple-3 { width: 185px; height: 185px; }
    .ripple-4 { width: 240px; height: 240px; }

    .overlay-text {
        font-size: 1.4rem;
        margin-top: 20px;
    }

    .overlay-content::before,
    .overlay-content::after {
        display: none;
    }
}

/* ==========================================================================
   1. Page Layout
   ========================================================================== */
.appointment-page {
    min-height: calc(100vh - 120px);
    background: linear-gradient(180deg, #202B6D 0%, #2F4ACD 50%, #3B5BDB 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.appointment-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   2. Full Page Floating Confetti Background
   ========================================================================== */
.page-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.confetti-float {
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    animation: floatConfetti 8s ease-in-out infinite;
}

/* Generate 40 confetti pieces with varied positions, sizes, colors */
.confetti-float-1 { width: 8px; height: 20px; background: #FEC400; top: 5%; left: 5%; animation-delay: 0s; }
.confetti-float-2 { width: 6px; height: 6px; background: #FF6B5B; top: 10%; left: 12%; border-radius: 50%; animation-delay: 0.3s; }
.confetti-float-3 { width: 10px; height: 4px; background: #A7DBEE; top: 8%; left: 25%; animation-delay: 0.6s; }
.confetti-float-4 { width: 7px; height: 18px; background: #10B981; top: 3%; left: 35%; animation-delay: 0.2s; }
.confetti-float-5 { width: 5px; height: 5px; background: #ffffff; top: 12%; left: 45%; border-radius: 50%; animation-delay: 0.8s; }
.confetti-float-6 { width: 9px; height: 22px; background: #FEC400; top: 6%; left: 55%; animation-delay: 0.1s; }
.confetti-float-7 { width: 6px; height: 6px; background: #FF6B5B; top: 15%; left: 65%; border-radius: 50%; animation-delay: 0.5s; }
.confetti-float-8 { width: 8px; height: 3px; background: #A7DBEE; top: 4%; left: 75%; animation-delay: 0.9s; }
.confetti-float-9 { width: 7px; height: 16px; background: #ffffff; top: 9%; left: 85%; animation-delay: 0.4s; }
.confetti-float-10 { width: 5px; height: 5px; background: #10B981; top: 2%; left: 92%; border-radius: 50%; animation-delay: 0.7s; }

.confetti-float-11 { width: 6px; height: 15px; background: #FF6B5B; top: 25%; left: 3%; animation-delay: 1.2s; }
.confetti-float-12 { width: 8px; height: 8px; background: #FEC400; top: 30%; left: 8%; border-radius: 50%; animation-delay: 1.5s; }
.confetti-float-13 { width: 10px; height: 24px; background: #A7DBEE; top: 22%; left: 92%; animation-delay: 1.1s; }
.confetti-float-14 { width: 5px; height: 5px; background: #ffffff; top: 28%; left: 95%; border-radius: 50%; animation-delay: 1.4s; }

.confetti-float-15 { width: 7px; height: 18px; background: #10B981; top: 45%; left: 2%; animation-delay: 1.8s; }
.confetti-float-16 { width: 6px; height: 6px; background: #FEC400; top: 50%; left: 6%; border-radius: 50%; animation-delay: 2.0s; }
.confetti-float-17 { width: 9px; height: 20px; background: #FF6B5B; top: 48%; left: 94%; animation-delay: 1.7s; }
.confetti-float-18 { width: 5px; height: 5px; background: #A7DBEE; top: 52%; left: 97%; border-radius: 50%; animation-delay: 2.1s; }

.confetti-float-19 { width: 8px; height: 16px; background: #ffffff; top: 65%; left: 4%; animation-delay: 2.3s; }
.confetti-float-20 { width: 7px; height: 7px; background: #10B981; top: 70%; left: 10%; border-radius: 50%; animation-delay: 2.5s; }
.confetti-float-21 { width: 6px; height: 14px; background: #FEC400; top: 68%; left: 90%; animation-delay: 2.2s; }
.confetti-float-22 { width: 8px; height: 8px; background: #FF6B5B; top: 72%; left: 96%; border-radius: 50%; animation-delay: 2.6s; }

.confetti-float-23 { width: 9px; height: 22px; background: #A7DBEE; top: 80%; left: 5%; animation-delay: 2.8s; }
.confetti-float-24 { width: 5px; height: 5px; background: #ffffff; top: 85%; left: 15%; border-radius: 50%; animation-delay: 3.0s; }
.confetti-float-25 { width: 7px; height: 18px; background: #10B981; top: 82%; left: 88%; animation-delay: 2.7s; }
.confetti-float-26 { width: 6px; height: 6px; background: #FEC400; top: 88%; left: 93%; border-radius: 50%; animation-delay: 3.1s; }

/* Extra scattered pieces */
.confetti-float-27 { width: 4px; height: 12px; background: #FF6B5B; top: 18%; left: 18%; animation-delay: 0.15s; }
.confetti-float-28 { width: 5px; height: 5px; background: #A7DBEE; top: 35%; left: 15%; border-radius: 50%; animation-delay: 1.0s; }
.confetti-float-29 { width: 6px; height: 14px; background: #FEC400; top: 55%; left: 12%; animation-delay: 1.6s; }
.confetti-float-30 { width: 4px; height: 4px; background: #ffffff; top: 75%; left: 20%; border-radius: 50%; animation-delay: 2.4s; }

.confetti-float-31 { width: 5px; height: 13px; background: #10B981; top: 20%; left: 82%; animation-delay: 0.45s; }
.confetti-float-32 { width: 6px; height: 6px; background: #FF6B5B; top: 38%; left: 88%; border-radius: 50%; animation-delay: 1.3s; }
.confetti-float-33 { width: 7px; height: 16px; background: #A7DBEE; top: 58%; left: 85%; animation-delay: 1.9s; }
.confetti-float-34 { width: 5px; height: 5px; background: #FEC400; top: 78%; left: 82%; border-radius: 50%; animation-delay: 2.9s; }

.confetti-float-35 { width: 8px; height: 20px; background: #ffffff; top: 92%; left: 25%; animation-delay: 3.2s; }
.confetti-float-36 { width: 6px; height: 6px; background: #10B981; top: 95%; left: 40%; border-radius: 50%; animation-delay: 3.4s; }
.confetti-float-37 { width: 7px; height: 17px; background: #FF6B5B; top: 90%; left: 55%; animation-delay: 3.3s; }
.confetti-float-38 { width: 5px; height: 5px; background: #A7DBEE; top: 93%; left: 70%; border-radius: 50%; animation-delay: 3.5s; }
.confetti-float-39 { width: 9px; height: 21px; background: #FEC400; top: 88%; left: 78%; animation-delay: 3.1s; }
.confetti-float-40 { width: 4px; height: 4px; background: #ffffff; top: 96%; left: 85%; border-radius: 50%; animation-delay: 3.6s; }

@keyframes floatConfetti {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(0deg);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(30px) rotate(360deg);
    }
}

/* ==========================================================================
   3. Celebration Wrapper
   ========================================================================== */
.celebration-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    height: 300px;
}

/* ==========================================================================
   4. Radial Burst Effect
   ========================================================================== */
.radial-burst {
    position: absolute;
    width: 600px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.burst-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: burstExpand 3s ease-out infinite;
}

.burst-ring-1 {
    width: 150px;
    height: 150px;
    animation-delay: 0s;
}

.burst-ring-2 {
    width: 150px;
    height: 150px;
    animation-delay: 1s;
}

.burst-ring-3 {
    width: 150px;
    height: 150px;
    animation-delay: 2s;
}

@keyframes burstExpand {
    0% {
        transform: scale(1);
        opacity: 0.6;
        border-color: rgba(167, 219, 238, 0.4);
    }
    100% {
        transform: scale(4);
        opacity: 0;
        border-color: rgba(167, 219, 238, 0);
    }
}

/* ==========================================================================
   5. Particle Burst
   ========================================================================== */
.particle-container {
    position: absolute;
    width: 400px;
    height: 400px;
}

.particle {
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    animation: particleBurst 4s ease-out infinite;
}

/* Position particles in a radial pattern */
.particle-1 { width: 6px; height: 16px; background: #FEC400; top: 50%; left: 50%; --angle: 0deg; --distance: 120px; animation-delay: 0.1s; }
.particle-2 { width: 5px; height: 5px; background: #FF6B5B; top: 50%; left: 50%; --angle: 15deg; --distance: 140px; border-radius: 50%; animation-delay: 0.15s; }
.particle-3 { width: 7px; height: 18px; background: #A7DBEE; top: 50%; left: 50%; --angle: 30deg; --distance: 130px; animation-delay: 0.2s; }
.particle-4 { width: 4px; height: 4px; background: #10B981; top: 50%; left: 50%; --angle: 45deg; --distance: 150px; border-radius: 50%; animation-delay: 0.25s; }
.particle-5 { width: 8px; height: 20px; background: #ffffff; top: 50%; left: 50%; --angle: 60deg; --distance: 125px; animation-delay: 0.3s; }
.particle-6 { width: 5px; height: 5px; background: #FEC400; top: 50%; left: 50%; --angle: 75deg; --distance: 145px; border-radius: 50%; animation-delay: 0.35s; }
.particle-7 { width: 6px; height: 15px; background: #FF6B5B; top: 50%; left: 50%; --angle: 90deg; --distance: 135px; animation-delay: 0.4s; }
.particle-8 { width: 4px; height: 4px; background: #A7DBEE; top: 50%; left: 50%; --angle: 105deg; --distance: 155px; border-radius: 50%; animation-delay: 0.45s; }
.particle-9 { width: 7px; height: 17px; background: #10B981; top: 50%; left: 50%; --angle: 120deg; --distance: 128px; animation-delay: 0.5s; }
.particle-10 { width: 5px; height: 5px; background: #ffffff; top: 50%; left: 50%; --angle: 135deg; --distance: 148px; border-radius: 50%; animation-delay: 0.55s; }
.particle-11 { width: 8px; height: 19px; background: #FEC400; top: 50%; left: 50%; --angle: 150deg; --distance: 132px; animation-delay: 0.6s; }
.particle-12 { width: 4px; height: 4px; background: #FF6B5B; top: 50%; left: 50%; --angle: 165deg; --distance: 152px; border-radius: 50%; animation-delay: 0.65s; }
.particle-13 { width: 6px; height: 16px; background: #A7DBEE; top: 50%; left: 50%; --angle: 180deg; --distance: 122px; animation-delay: 0.7s; }
.particle-14 { width: 5px; height: 5px; background: #10B981; top: 50%; left: 50%; --angle: 195deg; --distance: 142px; border-radius: 50%; animation-delay: 0.75s; }
.particle-15 { width: 7px; height: 18px; background: #ffffff; top: 50%; left: 50%; --angle: 210deg; --distance: 138px; animation-delay: 0.8s; }
.particle-16 { width: 4px; height: 4px; background: #FEC400; top: 50%; left: 50%; --angle: 225deg; --distance: 158px; border-radius: 50%; animation-delay: 0.85s; }
.particle-17 { width: 8px; height: 20px; background: #FF6B5B; top: 50%; left: 50%; --angle: 240deg; --distance: 126px; animation-delay: 0.9s; }
.particle-18 { width: 5px; height: 5px; background: #A7DBEE; top: 50%; left: 50%; --angle: 255deg; --distance: 146px; border-radius: 50%; animation-delay: 0.95s; }
.particle-19 { width: 6px; height: 15px; background: #10B981; top: 50%; left: 50%; --angle: 270deg; --distance: 136px; animation-delay: 1.0s; }
.particle-20 { width: 4px; height: 4px; background: #ffffff; top: 50%; left: 50%; --angle: 285deg; --distance: 156px; border-radius: 50%; animation-delay: 1.05s; }
.particle-21 { width: 7px; height: 17px; background: #FEC400; top: 50%; left: 50%; --angle: 300deg; --distance: 124px; animation-delay: 1.1s; }
.particle-22 { width: 5px; height: 5px; background: #FF6B5B; top: 50%; left: 50%; --angle: 315deg; --distance: 144px; border-radius: 50%; animation-delay: 1.15s; }
.particle-23 { width: 8px; height: 19px; background: #A7DBEE; top: 50%; left: 50%; --angle: 330deg; --distance: 134px; animation-delay: 1.2s; }
.particle-24 { width: 4px; height: 4px; background: #10B981; top: 50%; left: 50%; --angle: 345deg; --distance: 154px; border-radius: 50%; animation-delay: 1.25s; }

@keyframes particleBurst {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) rotate(0deg);
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance) * -1)) rotate(360deg);
    }
}

/* ==========================================================================
   6. Squiggly Lines
   ========================================================================== */
.squiggle-container {
    position: absolute;
    width: 500px;
    height: 500px;
}

.squiggle {
    position: absolute;
    width: 30px;
    height: 10px;
    opacity: 0;
    animation: squiggleFloat 5s ease-in-out infinite;
}

.squiggle-1 { color: #FEC400; top: 10%; left: 10%; animation-delay: 0s; transform: rotate(45deg); }
.squiggle-2 { color: #FF6B5B; top: 5%; left: 50%; animation-delay: 0.4s; transform: rotate(-30deg); }
.squiggle-3 { color: #A7DBEE; top: 15%; left: 85%; animation-delay: 0.8s; transform: rotate(60deg); }
.squiggle-4 { color: #10B981; top: 40%; left: 5%; animation-delay: 1.2s; transform: rotate(-45deg); }
.squiggle-5 { color: #ffffff; top: 45%; left: 92%; animation-delay: 1.6s; transform: rotate(30deg); }
.squiggle-6 { color: #FEC400; top: 70%; left: 8%; animation-delay: 2.0s; transform: rotate(-60deg); }
.squiggle-7 { color: #FF6B5B; top: 75%; left: 88%; animation-delay: 2.4s; transform: rotate(45deg); }
.squiggle-8 { color: #A7DBEE; top: 90%; left: 15%; animation-delay: 2.8s; transform: rotate(-30deg); }
.squiggle-9 { color: #10B981; top: 85%; left: 80%; animation-delay: 3.2s; transform: rotate(60deg); }
.squiggle-10 { color: #ffffff; top: 25%; left: 3%; animation-delay: 0.6s; transform: rotate(-45deg); }
.squiggle-11 { color: #FEC400; top: 60%; left: 95%; animation-delay: 1.8s; transform: rotate(30deg); }
.squiggle-12 { color: #FF6B5B; top: 95%; left: 50%; animation-delay: 3.6s; transform: rotate(-60deg); }

@keyframes squiggleFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) rotate(var(--rotation, 0deg)) scale(0.8);
    }
    20% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) rotate(var(--rotation, 0deg)) scale(1);
    }
    80% {
        opacity: 0.8;
    }
}

/* ==========================================================================
   6b. Sparkle Effects
   ========================================================================== */
.sparkle-container {
    position: absolute;
    width: 450px;
    height: 450px;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    opacity: 0;
    animation: sparkleAnimation 2s ease-in-out infinite;
}

.sparkle svg {
    width: 100%;
    height: 100%;
}

.sparkle-1 { width: 16px; height: 16px; color: #FEC400; top: 8%; left: 20%; animation-delay: 0s; }
.sparkle-2 { width: 12px; height: 12px; color: #ffffff; top: 15%; left: 75%; animation-delay: 0.3s; }
.sparkle-3 { width: 18px; height: 18px; color: #A7DBEE; top: 35%; left: 5%; animation-delay: 0.6s; }
.sparkle-4 { width: 14px; height: 14px; color: #FEC400; top: 40%; left: 90%; animation-delay: 0.9s; }
.sparkle-5 { width: 10px; height: 10px; color: #ffffff; top: 65%; left: 10%; animation-delay: 0.2s; }
.sparkle-6 { width: 16px; height: 16px; color: #A7DBEE; top: 70%; left: 85%; animation-delay: 0.5s; }
.sparkle-7 { width: 12px; height: 12px; color: #FEC400; top: 85%; left: 25%; animation-delay: 0.8s; }
.sparkle-8 { width: 14px; height: 14px; color: #ffffff; top: 80%; left: 70%; animation-delay: 1.1s; }

@keyframes sparkleAnimation {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

/* ==========================================================================
   7. Device Image
   ========================================================================== */
.device-wrapper {
    position: relative;
    z-index: 5;
}

.device-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(167, 219, 238, 0.3) 0%, rgba(47, 74, 205, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
}

.device-image {
    position: relative;
    z-index: 2;
    width: 320px;
    height: auto;
    opacity: 0;
    transform: scale(0.5) translateY(30px);
    animation: deviceBounceIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

.device-image img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.4));
}

@keyframes deviceBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(30px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-10px);
    }
    80% {
        transform: scale(0.98) translateY(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ==========================================================================
   8. Typography
   ========================================================================== */
.success-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    opacity: 0;
    animation: titleBounceIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.8s;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Shimmer effect on title */
.success-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: titleShimmer 3s ease-in-out infinite;
    animation-delay: 2s;
}

.success-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 45px;
    opacity: 0;
    animation: subtitleSlideUp 0.8s ease forwards, subtitlePulse 2s ease-in-out infinite;
    animation-delay: 1s, 2.5s;
}

@keyframes titleBounceIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) scale(1.05);
    }
    70% {
        transform: translateY(5px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes titleShimmer {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

@keyframes subtitleSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtitlePulse {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
}

/* ==========================================================================
   9. Action Button
   ========================================================================== */
.action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    animation: buttonBounceIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 1.2s;
}

.btn-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 56px;
    background: #FEC400;
    color: #202B6D;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(254, 196, 0, 0.4);
    position: relative;
    overflow: hidden;
    animation: buttonPulseGlow 2s ease-in-out infinite;
    animation-delay: 2.5s;
}

/* Shimmer effect */
.btn-primary-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

/* Glow ring effect */
.btn-primary-action::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #FEC400, #FFD23F, #FEC400);
    border-radius: 54px;
    z-index: -1;
    opacity: 0;
    animation: buttonRingPulse 2s ease-in-out infinite;
    animation-delay: 2.5s;
}

.btn-primary-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(254, 196, 0, 0.5);
    color: #202B6D;
    background: #FFD23F;
}

.btn-primary-action:hover::before {
    left: 100%;
}

.btn-primary-action:hover::after {
    animation: none;
    opacity: 0;
}

.btn-primary-action:active {
    transform: translateY(-1px);
}

@keyframes buttonBounceIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.7);
    }
    50% {
        opacity: 1;
        transform: translateY(-15px) scale(1.1);
    }
    70% {
        transform: translateY(8px) scale(0.95);
    }
    85% {
        transform: translateY(-4px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes buttonPulseGlow {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(254, 196, 0, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 15px 50px rgba(254, 196, 0, 0.6), 0 0 30px rgba(254, 196, 0, 0.3);
        transform: scale(1.02);
    }
}

@keyframes buttonShimmer {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

@keyframes buttonRingPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* ==========================================================================
   10. Confetti Canvas (JS animation)
   ========================================================================== */
.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* ==========================================================================
   11. Responsive Styles
   ========================================================================== */
@media (max-width: 992px) {
    .celebration-wrapper {
        height: 260px;
        margin-bottom: 10px;
    }

    .radial-burst {
        width: 450px;
        height: 450px;
    }

    .particle-container {
        width: 350px;
        height: 350px;
    }

    .squiggle-container {
        width: 400px;
        height: 400px;
    }

    .device-glow {
        width: 240px;
        height: 240px;
    }

    .device-image {
        width: 240px;
    }

    .success-title {
        font-size: 2.6rem;
    }

    .success-subtitle {
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    .appointment-page {
        padding: 40px 16px;
        min-height: calc(100vh - 100px);
    }

    .celebration-wrapper {
        height: 220px;
        margin-bottom: 8px;
    }

    .radial-burst {
        width: 350px;
        height: 350px;
    }

    .particle-container {
        width: 300px;
        height: 300px;
    }

    .squiggle-container {
        width: 320px;
        height: 320px;
    }

    .device-glow {
        width: 200px;
        height: 200px;
    }

    .device-image {
        width: 200px;
    }

    .success-title {
        font-size: 2.2rem;
    }

    .success-subtitle {
        font-size: 1.05rem;
        margin-bottom: 35px;
        padding: 0 10px;
    }

    .btn-primary-action {
        padding: 18px 44px;
        font-size: 1.05rem;
    }

    /* Reduce particles on mobile */
    .particle:nth-child(n+13) {
        display: none;
    }

    .squiggle:nth-child(n+7) {
        display: none;
    }

    .confetti-float:nth-child(n+25) {
        display: none;
    }

    .sparkle-container {
        width: 320px;
        height: 320px;
    }

    .sparkle:nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 480px) {
    .appointment-page {
        padding: 30px 12px;
    }

    .celebration-wrapper {
        height: 180px;
        margin-bottom: 5px;
    }

    .radial-burst {
        width: 280px;
        height: 280px;
    }

    .particle-container {
        width: 250px;
        height: 250px;
    }

    .squiggle-container {
        width: 260px;
        height: 260px;
    }

    .device-glow {
        width: 160px;
        height: 160px;
    }

    .device-image {
        width: 160px;
    }

    .success-title {
        font-size: 1.8rem;
    }

    .success-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .btn-primary-action {
        padding: 16px 36px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }

    /* Further reduce particles on small screens */
    .particle:nth-child(n+9) {
        display: none;
    }

    .squiggle:nth-child(n+5) {
        display: none;
    }

    .confetti-float:nth-child(n+15) {
        display: none;
    }

    .sparkle-container {
        width: 260px;
        height: 260px;
    }

    .sparkle:nth-child(n+4) {
        display: none;
    }

    /* Simpler button animation on mobile */
    .btn-primary-action::after {
        display: none;
    }
}
