/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    overflow-x: hidden;
}

/* Background Effects */
.floating-orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.floating-orbs::before,
.floating-orbs::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
}

.floating-orbs::before {
    top: 10%;
    left: 20%;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: float 20s infinite ease-in-out;
}

.floating-orbs::after {
    bottom: 10%;
    right: 20%;
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: float 25s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -50px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 30px) scale(0.95);
    }
    75% {
        transform: translate(40px, 20px) scale(1.02);
    }
}

/* Modern Card Styles */
.modern-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Modern Button Styles */
.modern-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.modern-button:hover::before {
    left: 100%;
}

.modern-button:hover {
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.6),
        0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Modern Input Styles */
.input-container {
    position: relative;
}

.modern-input {
    transition: all 0.3s ease;
}

.modern-input:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 0 0 2px rgba(102, 126, 234, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.modern-input:focus + .input-border {
    transform: scaleX(1);
}

/* Platform Option Styles */
.platform-option {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.platform-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.platform-option:hover::before {
    left: 100%;
}

.platform-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Currency Option Styles */
.currency-option {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.currency-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.currency-option:hover::before {
    left: 100%;
}

.currency-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.currency-option.selected {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Selected Amount Styles */
.selected-amount {
    transition: all 0.3s ease;
}

/* Icon Container Styles */
.icon-container {
    position: relative;
    display: inline-block;
}

.icon-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 0 5px rgba(255, 255, 255, 0.1),
        inset 0 0 5px rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

/* Logo Container Styles */
.logo-container {
    position: relative;
    display: inline-block;
}

.logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Modern Modal Styles */
.modern-modal {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Search Modal Specific Styles */
.search-modal {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.search-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    animation: search-shimmer 3s infinite;
}

@keyframes search-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Searching Text Animation */
.searching-text {
    position: relative;
    display: inline-block;
}

.searching-cursor {
    display: inline-block;
    animation: searching-cursor 1s infinite;
    color: #667eea;
    font-weight: bold;
    margin-left: 2px;
}

@keyframes searching-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Animated dots after username */
.searching-dots {
    display: inline-block;
}

.searching-dots::after {
    content: '';
    animation: searching-dots 1.5s infinite;
}

@keyframes searching-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* Enhanced Search Icon Animation */
.search-icon {
    position: relative;
    display: inline-block;
    animation: search-pulse 2s infinite ease-in-out;
}

@keyframes search-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Modern Sync Card Styles */
.modern-sync-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Success Animation Styles */
.success-animation-container {
    position: relative;
    display: inline-block;
}

.success-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.success-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid #667eea;
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(102, 126, 234, 0.5),
        0 0 40px rgba(102, 126, 234, 0.3),
        inset 0 0 20px rgba(102, 126, 234, 0.2);
    animation: success-ring-pulse 1.5s ease-out;
}

@keyframes success-ring-pulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.success-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
}

.success-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #667eea;
    border-radius: 50%;
    box-shadow: 0 0 6px #667eea;
    opacity: 0;
}

.success-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: success-glow-pulse 2s ease-out;
}

@keyframes success-glow-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Success Checkmark */
.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #667eea;
    stroke-miterlimit: 10;
    margin: 0 auto;
    box-shadow: 
        0 0 20px rgba(102, 126, 234, 0.5),
        inset 0 0 20px rgba(102, 126, 234, 0.2);
    animation: success-checkmark-appear 0.6s ease-out;
}

.success-checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: #667eea;
    fill: none;
    animation: success-circle-draw 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: success-check-draw 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

@keyframes success-checkmark-appear {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes success-circle-draw {
    0% {
        stroke-dashoffset: 166;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

@keyframes success-check-draw {
    0% {
        stroke-dashoffset: 48;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Success Text Animation */
.success-animation-container p {
    animation: success-text-appear 0.8s ease-out 0.6s both;
    transform: translateY(20px);
    opacity: 0;
}

@keyframes success-text-appear {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading Dots Animation */
.loading-dots {
    display: inline-block;
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Finalizing Phase Styles */
#finalizing-phase {
    animation: fadeIn 0.5s ease-in-out;
}

.finalizing-progress {
    margin-top: 20px;
    opacity: 0;
    animation: slideIn 0.5s ease-out 0.3s both;
}

/* Loading Last Step Phase Styles */
#loading-last-step-phase {
    animation: fadeIn 0.5s ease-in-out;
}

.last-step-progress {
    margin-top: 20px;
    opacity: 0;
    animation: slideIn 0.5s ease-out 0.3s both;
}

/* Enhanced Loading Animations */
@keyframes finalizingRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes starPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Enhanced dot animations for different phases */
.finalizing-dot {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: bounce 1.4s infinite ease-in-out both;
}

.finalizing-dot:nth-child(1) { animation-delay: -0.32s; }
.finalizing-dot:nth-child(2) { animation-delay: -0.16s; }

.last-step-dot {
    background: #fbbf24;
    box-shadow: 0 0 6px #fbbf24;
    animation: bounce 1.4s infinite ease-in-out both;
}

.last-step-dot:nth-child(1) { animation-delay: -0.32s; }
.last-step-dot:nth-child(2) { animation-delay: -0.16s; }

/* Phase transition animations */
.phase-transition {
    transition: all 0.5s ease-in-out;
}

.phase-hidden {
    opacity: 0;
    transform: translateY(20px);
}

.phase-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Progress Bar Animation */
.progress-bar-enhanced {
    position: relative;
    overflow: hidden;
}

.progress-bar-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Smooth progress bar animation */
.smooth-progress {
    transition: width 3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Animations */
@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8); }
}

@keyframes currencyFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-5deg); }
    75% { transform: translateY(-5px) rotate(5deg); }
}

@keyframes currencyPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes particle {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--x), var(--y)) scale(0); opacity: 0; }
}

@keyframes progressPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Animation Classes */
.animate-pulse-ring {
    animation: pulse-ring 2s infinite;
}

.animate-bounce-slow {
    animation: bounce 2s infinite;
}

.animate-spin {
    animation: spin 2s linear infinite;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

.animate-glow {
    animation: glow 2s infinite;
}

.animate-currency-float {
    animation: currencyFloat 3s ease-in-out infinite;
}

.animate-currency-pulse {
    animation: currencyPulse 1s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.animate-progress-pulse {
    animation: progressPulse 1.5s infinite;
}

/* Component Styles */
.step-transition {
    transition: all 0.5s ease-in-out;
}

.loading-dot {
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

.currency-sync-item {
    transition: all 0.3s ease;
    position: relative;
}

.currency-sync-item:hover {
    transform: scale(1.02);
}

.syncing-currency-image {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Enhanced Font Styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-xl {
    font-weight: 600;
}

.text-lg {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

/* Enhanced Button Styles */
button, a {
    font-weight: 600;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

/* Enhanced Input Styles */
input {
    font-weight: 500;
}

/* Enhanced Label Styles */
label {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Particle Effect for Syncing */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    animation: particle 1s ease-out forwards;
}