:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
    --bg-gradient: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --blur-amount: 20px;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success-green: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.success-container {
    position: relative;
    z-index: 2;
    padding: 2rem;
    width: 100%;
    max-width: 450px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
}

@keyframes slideUpFade {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Success Icon Animation */
.success-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.success-icon {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.circle-bg {
    fill: var(--primary-gradient);
    fill: #22c55e;
    transform-origin: center;
    animation: pulseLoop 2s infinite ease-in-out;
}

.checkmark {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawCheck 0.6s 0.3s ease forwards;
}

@keyframes pulseLoop {
    0% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Fallback if gradient fails */
    color: white;
}

p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.order-summary {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.summary-row .highlight {
    color: var(--text-primary);
    font-weight: 600;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s active, box-shadow 0.2s;
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.btn-primary:active {
    transform: scale(0.98);
}

.next-step-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s, transform 0.6s;
}

.next-step-pills.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.pill:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.pill .icon {
    font-size: 1.25rem;
}

/* Stagger Entry Animation Delay */
.stagger-entry:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-entry:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-entry:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-entry:nth-child(4) {
    animation-delay: 0.4s;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .glass-card {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }
}