/* Advanced Custom Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling and enhanced body */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Animations and Advanced Effects */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0% { box-shadow: 0 0 20px rgba(255, 107, 53, 0.5); }
    100% { box-shadow: 0 0 30px rgba(255, 107, 53, 0.8), 0 0 40px rgba(255, 107, 53, 0.3); }
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateX(-30px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-slow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

/* Glass Morphism Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Enhanced Gradient Backgrounds */
.gradient-bg {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* Advanced Button Hover Effects */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.btn-hover-effect::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;
}

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

/* Step Management */
.step {
    display: none;
}

.step.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out;
}

.loading-step.active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

/* Enhanced Robux Selection */
.robux-option.selected .bg-gradient-to-br {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3)) !important;
    border-color: rgb(59, 130, 246) !important;
    box-shadow: 0 0 0 2px rgb(59, 130, 246), 0 0 20px rgba(59, 130, 246, 0.3) !important;
}

.robux-option.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgb(59, 130, 246);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: fadeInUp 0.3s ease-out;
}

/* Loading Animation Enhancements */
.step-indicator,
.gen-indicator {
    transition: opacity 0.5s ease-in-out;
}

.step-indicator.active,
.gen-indicator.active {
    opacity: 1 !important;
    animation: pulse 1s ease-in-out;
}

.gen-check.active {
    opacity: 1 !important;
    animation: fadeInUp 0.5s ease-out;
}

/* Advanced Progress Bar */
#progress1,
#progress2 {
    background-size: 200% 100%;
    animation: gradient 2s linear infinite;
}

/* Particle System */
.particle {
    position: fixed;
    pointer-events: none;
    width: 4px;
    height: 4px;
    background: rgba(59, 130, 246, 0.6);
    border-radius: 50%;
    animation: particleFloat 4s ease-out forwards;
    z-index: 1;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2, #667eea);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-center {
        display: none;
    }
}

/* Selection State Enhancement */
.robux-option {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    .robux-option:active {
        transform: scale(0.95);
    }
    
    button:active {
        transform: scale(0.98);
    }
}

/* Focus states for accessibility */
input:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .glass-effect {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-white\/10 {
        background: rgba(255, 255, 255, 0.2) !important;
    }
    
    .border-white\/20 {
        border-color: rgba(255, 255, 255, 0.4) !important;
    }
}