/* ===================================
   SUCCESS PAGE STYLES
   ================================== */

/* Success Container */
.success-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
    position: relative;
    overflow: hidden;
    padding: var(--spacing-xl);
}

.success-content {
    text-align: center;
    max-width: 600px;
    position: relative;
    z-index: 2;
}

/* Magic Animation */
.magic-animation {
    position: relative;
    margin-bottom: var(--spacing-2xl);
    display: inline-block;
}

.success-potion {
    width: 200px;
    height: 200px;
    animation: successFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(107, 70, 193, 0.3));
}

.sparkles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    font-size: var(--font-size-xl);
    animation: sparkleSuccess 2s ease-in-out infinite;
}

.sparkle-1 {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.sparkle-2 {
    top: 20%;
    right: 15%;
    animation-delay: 0.5s;
}

.sparkle-3 {
    bottom: 30%;
    left: 10%;
    animation-delay: 1s;
}

.sparkle-4 {
    bottom: 20%;
    right: 20%;
    animation-delay: 1.5s;
}

.sparkle-5 {
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0.8s;
}

/* Success Message */
.success-message {
    margin-bottom: var(--spacing-2xl);
}

.success-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
}

.success-subtitle {
    font-size: var(--font-size-lg);
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.countdown-text {
    font-size: var(--font-size-sm);
    color: var(--primary-purple);
    font-weight: 500;
    margin-top: var(--spacing-md);
    animation: pulse 2s ease-in-out infinite;
}

/* Action Buttons */
.success-actions {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.action-button {
    padding: var(--spacing-lg) var(--spacing-2xl);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

.action-button.primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.action-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: var(--white);
}

.action-button.secondary {
    background: var(--white);
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
    box-shadow: var(--shadow-md);
}

.action-button.secondary:hover {
    background: var(--primary-purple);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Background Decorations */
.bg-circle-success-1 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--gradient-primary);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    opacity: 0.1;
    animation: rotateSuccess 20s linear infinite;
}

.bg-circle-success-2 {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    opacity: 0.1;
    animation: rotateSuccess 15s linear infinite reverse;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    font-size: var(--font-size-2xl);
    animation: floatSuccess 6s ease-in-out infinite;
}

.element-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.element-3 {
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.element-4 {
    top: 40%;
    right: 30%;
    animation-delay: 1s;
}

/* Success Animations */
@keyframes successFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
    }
    50% { 
        transform: translateY(-20px) rotate(5deg);
    }
}

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

@keyframes rotateSuccess {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

@keyframes floatSuccess {
    0%, 100% { 
        transform: translateY(0px) translateX(0px);
        opacity: 0.5;
    }
    25% { 
        transform: translateY(-30px) translateX(10px);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-20px) translateX(-10px);
        opacity: 1;
    }
    75% { 
        transform: translateY(-40px) translateX(5px);
        opacity: 0.6;
    }
}

/* Responsive Success Page */
@media (max-width: 767.98px) {
    .success-container {
        padding: var(--spacing-lg);
    }
    
    .success-title {
        font-size: var(--font-size-3xl);
    }
    
    .success-subtitle {
        font-size: var(--font-size-base);
    }
    
    .success-potion {
        width: 150px;
        height: 150px;
    }
    
    .success-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-button {
        width: 100%;
        max-width: 280px;
    }
    
    .sparkle {
        font-size: var(--font-size-lg);
    }
    
    .floating-element {
        font-size: var(--font-size-lg);
    }
    
    .bg-circle-success-1 {
        width: 300px;
        height: 300px;
        top: -150px;
        right: -150px;
    }
    
    .bg-circle-success-2 {
        width: 200px;
        height: 200px;
        bottom: -100px;
        left: -100px;
    }
}

@media (max-width: 575.98px) {
    .success-title {
        font-size: var(--font-size-2xl);
    }
    
    .success-potion {
        width: 120px;
        height: 120px;
    }
    
    .action-button {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
        min-width: 140px;
    }
}

/* High contrast mode for success page */
@media (prefers-contrast: high) {
    .success-container {
        background: var(--white);
    }
    
    .success-title {
        background: var(--dark-purple);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .action-button.primary {
        background: var(--dark-purple);
    }
    
    .action-button.secondary {
        border-color: var(--dark-purple);
        color: var(--dark-purple);
    }
    
    .action-button.secondary:hover {
        background: var(--dark-purple);
    }
}

/* Reduced motion for success page */
@media (prefers-reduced-motion: reduce) {
    .success-potion,
    .sparkle,
    .floating-element,
    .bg-circle-success-1,
    .bg-circle-success-2,
    .countdown-text {
        animation: none !important;
    }
    
    .action-button:hover {
        transform: none;
    }
}

/* Print styles for success page */
@media print {
    .success-container {
        background: white !important;
        min-height: auto !important;
        padding: var(--spacing-lg) !important;
    }
    
    .floating-elements,
    .bg-circle-success-1,
    .bg-circle-success-2,
    .sparkles {
        display: none !important;
    }
    
    .success-title {
        color: var(--dark-purple) !important;
        background: none !important;
        -webkit-text-fill-color: var(--dark-purple) !important;
    }
    
    .action-button {
        display: none !important;
    }
    
    .countdown-text {
        display: none !important;
    }
}
