/* Modern CSS for Huiron Studios Website - Clean & Professional Design */

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #111827;
    color: #f3f4f6;
    line-height: 1.6;
}

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

/* Navigation */
nav {
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu {
    transition: max-height 0.3s ease-out;
}

/* Page Transitions */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page.active {
    display: block;
    opacity: 1;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Hover Effects */
.bg-white {
    transition: all 0.3s ease;
}

.bg-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.bg-blue-600 {
    transition: all 0.3s ease;
}

.bg-blue-600:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Gradient backgrounds */
.bg-gradient-to-br {
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
}

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

/* Enhanced hero section animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeIn 1.2s ease-out;
}

/* Subtle background shine effect */
@keyframes shine {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shine-effect {
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 60%
    );
    background-size: 200% 100%;
    animation: shine 3s infinite;
}

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

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Advanced CSS Effects */
.glow-effect {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: box-shadow 0.3s ease;
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gradient-text {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s linear infinite;
}

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

.hover-3d {
    transform: perspective(1000px) rotateX(0) rotateY(0);
    transition: transform 0.3s ease;
}

.hover-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

.pulse-glow {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    }
}

.neon-border {
    border: 2px solid #3B82F6;
    box-shadow: 0 0 10px #3B82F6, inset 0 0 10px #3B82F6;
    animation: neonPulse 2s infinite;
}

@keyframes neonPulse {
    0%, 100% {
        box-shadow: 0 0 10px #3B82F6, inset 0 0 10px #3B82F6;
    }
    50% {
        box-shadow: 0 0 20px #3B82F6, inset 0 0 20px #3B82F6;
    }
}

.float-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.float-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:hover::after {
    width: 300px;
    height: 300px;
}

.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerFadeIn 0.6s forwards;
}

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }

/* Loading animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.loading {
    animation: pulse 2s infinite;
}

/* Focus states for accessibility */
button:focus,
a:focus {
    outline: none; /* remove default focus ring */
    box-shadow: 0 2px 0 0 #2563eb; /* subtle underline focus indicator */
}

/* Responsive design improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
    
    .text-7xl {
        font-size: 3.5rem;
    }
}

/* Print styles */
@media print {
    .bg-gradient-to-br,
    .bg-gray-50,
    .bg-white {
        background: white !important;
    }
    
    .text-gray-900 {
        color: black !important;
    }
    
    .text-gray-600 {
        color: #666 !important;
    }
    
    nav,
    button {
        display: none !important;
    }
}

/* Utility classes for micro-interactions */
.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Custom animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Enhanced focus for form elements */
input:focus,
textarea:focus,
select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-50 {
        background: #000 !important;
    }
    
    .text-gray-600 {
        color: #fff !important;
    }
    
    .border-gray-200 {
        border-color: #fff !important;
    }
}

/* Remove space between header and content on non-home pages */
#games-page section,
#groups-page section,
#about-page section {
    padding-top: 0 !important;
}

/* Scroll fade-in animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-animate.animate-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for better visual flow */
.scroll-animate:nth-child(1) { transition-delay: 0.1s; }
.scroll-animate:nth-child(2) { transition-delay: 0.2s; }
.scroll-animate:nth-child(3) { transition-delay: 0.3s; }
.scroll-animate:nth-child(4) { transition-delay: 0.4s; }
.scroll-animate:nth-child(5) { transition-delay: 0.5s; }
.scroll-animate:nth-child(6) { transition-delay: 0.6s; }

/* Inter-style smooth transitions */
* {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced page transitions */
.page {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page.active {
    animation: interFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes interFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced card hover effects */
.group-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.group-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* Smooth button interactions */
button, .nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover, .nav-link:hover {
    transform: translateY(-2px);
}

/* Enhanced loading screen */
#loading-screen {
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Blur fade-in transitions for content after loading screen */
.main-content {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.fade-in {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Staggered blur fade-in for different elements */
.hero-title {
    opacity: 0;
    filter: blur(15px);
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.hero-subtitle {
    opacity: 0;
    filter: blur(15px);
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

.hero-buttons {
    opacity: 0;
    filter: blur(15px);
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

.hero-logo {
    opacity: 0;
    filter: blur(15px);
    transform: scale(0.8);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

/* Apply fade-in when loading is complete */
.loading-complete .hero-title,
.loading-complete .hero-subtitle,
.loading-complete .hero-buttons,
.loading-complete .hero-logo {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

/* Additional blur fade-in for other sections */
.section-fade-in {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-fade-in.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced text animations */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

/* Improved particle animations */
.animate-float {
    animation: float 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Enhanced backdrop blur transitions */
.backdrop-blur-md {
    transition: backdrop-filter 0.3s ease;
}

/* Smooth image scaling */
img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

img:hover {
    transform: scale(1.05);
}

/* Enhanced border glow effects */
.border-glow {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.border-glow:hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    border-color: rgba(168, 85, 247, 0.6);
}

/* Smooth filter transitions */
.game-filter-btn, .group-filter-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-filter-btn:hover, .group-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced mobile menu transitions */
.mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* Smooth counter animations */
.counter {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced parallax effect */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: transform 0.1s ease;
}

/* Smooth gradient transitions */
.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradientMove 8s ease infinite;
}

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