/* Custom CSS for Aether Rust Website */

/* Custom Properties */
:root {
    --space-purple-glow: rgba(147, 51, 234, 0.3);
    --space-blue-glow: rgba(59, 130, 246, 0.3);
    --particle-size: 2px;
}

/* Global Styles */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    padding-top: 100px; /* Space for floating navbar */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Floating Navbar Styles */
.floating-navbar {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.floating-navbar:hover {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.floating-navbar.nav-shrink {
    transform: translateY(-2px) scale(.97);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.45);
}

/* Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.nav-link:hover {
    color: #c394f4;
    background-color: rgba(168, 85, 247, 0.1);
}

.nav-link.active {
    color: #a855f7;
    background-color: rgba(168, 85, 247, 0.15);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    border-radius: 50%;
}

/* Button Styles */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::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;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Card Styles */
.card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(59, 130, 246, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 16px;
    transition: all 0.3s ease;
    will-change: transform, box-shadow;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
}

/* Icon Utilities */
.icon-wrapper {
    width: 4rem; /* 64px */
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(168,85,247,0.25), rgba(59,130,246,0.25));
    border: 1px solid rgba(168,85,247,0.35);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.4), 0 8px 16px -8px rgba(168,85,247,0.35);
    backdrop-filter: blur(8px);
}

.icon-wrapper-sm {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(59,130,246,0.2));
    border: 1px solid rgba(168,85,247,0.25);
}

.icon-wrapper i.lucide {
    width: 1.75rem;
    height: 1.75rem;
}

.icon-accent-green { color: #10b981; }
.icon-accent-yellow { color: #facc15; }
.icon-accent-blue { color: #3b82f6; }
.icon-accent-purple { color: #a855f7; }

/* Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, 
        rgba(15, 15, 35, 0.95) 0%,
        rgba(79, 70, 229, 0.1) 25%,
        rgba(168, 85, 247, 0.1) 50%,
        rgba(59, 130, 246, 0.1) 75%,
        rgba(15, 15, 35, 0.95) 100%
    );
}

/* Animated Background Elements */
.floating-element {
    position: absolute;
    opacity: 0.1;
    animation: float 8s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: -2s;
}

.floating-element:nth-child(3) {
    animation-delay: -4s;
}

.floating-element:nth-child(4) {
    animation-delay: -6s;
}

/* Particle System */
#particles-bg {
    background: 
        radial-gradient(circle at 20% 80%, rgba(147, 51, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    animation: particles-move 20s ease-in-out infinite;
}

@keyframes particles-move {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-10px, -20px) scale(1.05); }
    50% { transform: translate(10px, -10px) scale(0.95); }
    75% { transform: translate(-5px, 15px) scale(1.02); }
}

/* Animation classes refactor */
.will-animate {opacity:0;transform:translateY(12px);transition:opacity .7s ease,transform .7s ease;}
.fade-in.animated-in,.card.animated-in {opacity:1;transform:translateY(0);} 
.slide-in-left {transform:translateX(-40px);} 
.slide-in-right {transform:translateX(40px);} 
.slide-in-left.animated-in,.slide-in-right.animated-in {opacity:1;transform:translateX(0);} 
.card {will-change: transform, box-shadow;}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(168, 85, 247, 0.1);
    border-top: 3px solid #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #a855f7, #3b82f6);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 15, 35, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a855f7, #3b82f6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9333ea, #2563eb);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .hero-gradient {
        padding: 2rem 0;
    }
    
    .floating-element {
        display: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
        border-color: #a855f7;
    }
    
    .nav-link:hover {
        background-color: rgba(168, 85, 247, 0.3);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element,
    #particles-bg {
        animation: none;
    }
}

/* Text Selection */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: white;
}

/* Focus States */
button:focus,
a:focus,
input:focus {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

/* Status Indicators */
.status-online {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-offline {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.status-maintenance {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Custom Animations for Page Elements */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Animation utility base */
.fade-in, .slide-in-left, .slide-in-right, .card {
    opacity: 0;
}

.animated-in {
    opacity: 1 !important;
}

/* Mobile Menu Transition */
#mobile-menu {
    transition: opacity .25s ease, transform .25s ease;
    transform-origin: top center;
}

#mobile-menu.opacity-0 {
    transform: translateY(-4px);
} 

#mobile-menu.opacity-100 {
    transform: translateY(0);
}