/* Custom CSS for Supreme Roleplay Website */

/* Font Configuration */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;600;700&display=swap');

:root {
    --primary-yellow: #fbbf24;
    --primary-blue: #3b82f6;
    --primary-green: #10b981;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(15, 15, 15, 0.8);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Oswald', sans-serif !important;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: white;
    overflow-x: hidden;
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100vw;
}

/* Ensure all text uses Oswald */
h1, h2, h3, h4, h5, h6, p, span, div, button, a, li, td, th, input, textarea, select {
    font-family: 'Oswald', sans-serif !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

/* Navigation Bar Fixes */
nav {
    overflow: visible !important;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
}

nav .container {
    overflow: visible !important;
    max-width: 100%;
    box-sizing: border-box;
}

/* Prevent horizontal overflow in navigation */
.nav-link, .language-option, .mobile-language-option {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Language dropdown positioning fix */
#language-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 9999;
    overflow: visible;
    white-space: nowrap;
}

/* Mobile menu fixes */
#mobile-menu {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-yellow), var(--primary-blue));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-yellow));
}

/* Loading Screen */
#loading-screen {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    transition: opacity 0.5s ease-out;
}

.loading-bar {
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    animation: loading 3s ease-out forwards;
}

@keyframes loading {
    to {
        width: 100%;
    }
}

/* Three.js Background */
#three-bg {
    z-index: -1;
}

/* Navigation */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.nav-link {
    position: relative;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-yellow), var(--primary-blue));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Language Selector */
.language-selector {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.language-selector:hover {
    transform: scale(1.1);
}

/* Hero Section */
#home {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('bg.png') center/cover no-repeat;
    background-attachment: fixed;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

#home > * {
    position: relative;
    z-index: 2;
}

/* Buttons */
.register-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.register-btn::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 ease;
}

.register-btn:hover::before {
    left: 100%;
}

/* Cards */
.server-card,
.step-card,
.community-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    width: 100%;
    box-sizing: border-box;
}

.server-card:hover,
.step-card:hover,
.community-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.server-card::before,
.step-card::before,
.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.server-card:hover::before,
.step-card:hover::before,
.community-card:hover::before {
    opacity: 1;
}

/* Enhanced Server Cards */
.server-card {
    min-height: 200px;
}

.server-card .w-16 {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

/* Enhanced Step Cards */
.step-card {
    min-height: 450px;
    display: flex;
    flex-direction: column;
}

.step-card .relative {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Floating Animation */
.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Prevent horizontal overflow */
.container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
}

/* Section containers */
section {
    width: 100%;
    overflow-x: hidden;
}

/* Grid improvements */
.grid {
    width: 100%;
    box-sizing: border-box;
}

/* Enhanced Animations and 3D Effects */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(251, 191, 36, 0.3),
            0 0 40px rgba(251, 191, 36, 0.2),
            0 0 60px rgba(251, 191, 36, 0.1);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(251, 191, 36, 0.6),
            0 0 60px rgba(251, 191, 36, 0.4),
            0 0 90px rgba(251, 191, 36, 0.2);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes slide-in-3d {
    0% {
        transform: translateX(-100px) rotateY(-30deg);
        opacity: 0;
    }
    100% {
        transform: translateX(0) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes card-hover-3d {
    0% {
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateZ(0px);
    }
    100% {
        transform: perspective(1000px) rotateX(-5deg) rotateY(5deg) translateZ(20px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Modern Card Effects */
.modern-card {
    position: relative;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.modern-card:hover {
    transform: perspective(1000px) rotateX(-2deg) rotateY(2deg) translateZ(10px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modern-card::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.6s;
}

.modern-card:hover::before {
    left: 100%;
}

/* Enhanced Button Effects */
.enhanced-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 16px;
    padding: 16px 32px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.enhanced-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 20px 40px -8px rgba(59, 130, 246, 0.4),
        0 0 0 1px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.enhanced-btn::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;
}

.enhanced-btn:hover::before {
    left: 100%;
}

.enhanced-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 3D Text Effects */
.text-3d {
    text-shadow: 
        1px 1px 0 rgba(0, 0, 0, 0.3),
        2px 2px 0 rgba(0, 0, 0, 0.2),
        3px 3px 0 rgba(0, 0, 0, 0.1),
        4px 4px 10px rgba(0, 0, 0, 0.5);
    transform: perspective(300px) rotateX(15deg);
}

/* Particle System for CSS */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.css-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: particle-float-enhanced 15s linear infinite;
}

@keyframes particle-float-enhanced {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Glass Morphism Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* Neon Glow Effects */
.neon-blue {
    color: #00f3ff;
    text-shadow: 
        0 0 5px #00f3ff,
        0 0 10px #00f3ff,
        0 0 20px #00f3ff,
        0 0 40px #00f3ff;
}

.neon-purple {
    color: #bc13fe;
    text-shadow: 
        0 0 5px #bc13fe,
        0 0 10px #bc13fe,
        0 0 20px #bc13fe,
        0 0 40px #bc13fe;
}

.neon-green {
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 20px #39ff14,
        0 0 40px #39ff14;
}

/* Loading Animation */
@keyframes loading-enhanced {
    0% {
        transform: translateX(-100%) skewX(-45deg);
    }
    100% {
        transform: translateX(100%) skewX(-45deg);
    }
}

/* Hover State Improvements */
.interactive-element {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.interactive-element:hover {
    transform: translateY(-4px) scale(1.02);
    filter: brightness(1.1) saturate(1.2);
}

/* Animation Delays */
.animation-delay-1000 {
    animation-delay: 1s;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Text Effects */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-yellow), var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Design */
@media (max-width: 768px) {
    #home h1 {
        font-size: 3rem;
    }
    
    #home p {
        font-size: 1rem;
    }
    
    .server-card,
    .step-card,
    .community-card {
        margin-bottom: 2rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    #home h1 {
        font-size: 2.5rem;
    }
    
    .register-btn {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .server-card,
    .step-card,
    .community-card {
        padding: 1.5rem;
    }
}

/* Particle Effects */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(251, 191, 36, 0.6);
    border-radius: 50%;
    animation: particle-float 10s linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Custom Utilities */
.backdrop-blur-strong {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(59, 130, 246, 0.2));
    background-clip: padding-box;
}

/* Mobile Navigation */
#mobile-menu {
    background: rgba(0, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 0 0 1rem 1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(26,26,46,0.9) 100%);
}

/* Performance Optimizations */
.server-card,
.step-card,
.community-card {
    will-change: transform;
}

.register-btn {
    will-change: transform, box-shadow;
}

/* Horizontal Scroll Prevention */
html {
    overflow-x: hidden !important;
}

body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

section {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

.container {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for Three.js canvas */
#three-bg canvas {
    max-width: 100vw !important;
    overflow: hidden !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #000000 0%, #1a1a2e 50%, #16213e 100%);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-link,
    .register-btn,
    .server-card,
    .step-card,
    .community-card {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Social Handles Section Enhancements */
.social-handle-card {
    position: relative;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-handle-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.social-handle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.02) 100%);
    border-radius: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-handle-card:hover::before {
    opacity: 1;
}

/* Enhanced Statistics Animation */
.social-handle-card .text-4xl {
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.social-handle-card:hover .text-4xl {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* Platform-specific Glow Effects */
.social-handle-card:nth-child(1):hover {
    box-shadow: 
        0 30px 60px rgba(239, 68, 68, 0.4),
        0 10px 30px rgba(220, 38, 38, 0.3),
        0 0 20px rgba(239, 68, 68, 0.2);
}

.social-handle-card:nth-child(2):hover {
    box-shadow: 
        0 30px 60px rgba(236, 72, 153, 0.4),
        0 10px 30px rgba(168, 85, 247, 0.3),
        0 0 20px rgba(236, 72, 153, 0.2);
}

.social-handle-card:nth-child(3):hover {
    box-shadow: 
        0 30px 60px rgba(59, 130, 246, 0.4),
        0 10px 30px rgba(79, 70, 229, 0.3),
        0 0 20px rgba(59, 130, 246, 0.2);
}

/* Floating Animation for Character Images */
@keyframes float-character {
    0%, 100% { transform: translateY(0px) scale(1); }
    25% { transform: translateY(-5px) scale(1.02); }
    50% { transform: translateY(-10px) scale(1.05); }
    75% { transform: translateY(-5px) scale(1.02); }
}

.social-handle-card img[alt*="Character"] {
    animation: float-character 4s ease-in-out infinite;
}

.social-handle-card:hover img[alt*="Character"] {
    animation-play-state: paused;
}

/* Enhanced Social Links */
#community .flex.justify-center a {
    position: relative;
    overflow: hidden;
}

#community .flex.justify-center a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transition: all 0.4s ease;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

#community .flex.justify-center a:hover::before {
    width: 100px;
    height: 100px;
}

/* Social Handle Cards Enhanced Styles */
.social-handle-card-enhanced {
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.2),
        0 0 80px rgba(255,255,255,0.1),
        inset 0 1px 1px rgba(255,255,255,0.3);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: cardFloat 6s ease-in-out infinite;
    overflow: hidden;
}

.social-handle-card-enhanced::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;
}

.social-handle-card-enhanced:hover::before {
    left: 100%;
}

.social-handle-card-enhanced:hover {
    transform: translateY(-20px) rotateX(5deg) rotateY(5deg);
    box-shadow: 
        0 40px 80px rgba(0,0,0,0.3),
        0 0 120px rgba(255,255,255,0.2),
        inset 0 1px 1px rgba(255,255,255,0.4);
}

/* Individual card animations */
.social-handle-card-enhanced:nth-child(1) {
    animation-delay: 0s;
}

.social-handle-card-enhanced:nth-child(2) {
    animation-delay: 2s;
}

.social-handle-card-enhanced:nth-child(3) {
    animation-delay: 4s;
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-5px) rotate(-0.5deg);
    }
    75% {
        transform: translateY(-15px) rotate(0.5deg);
    }
}

/* Advanced Glow Effects */
.social-handle-card-enhanced:hover {
    animation: none;
}

/* Particle effects on hover */
.social-handle-card-enhanced:hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Enhanced text gradients */
.social-handle-card-enhanced h3 {
    background: linear-gradient(45deg, #ffffff, #f0f0f0, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 3s ease-in-out infinite;
}

@keyframes textShine {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Enhanced statistics number effect */
.social-handle-card-enhanced span {
    text-shadow: 
        0 0 10px rgba(255,255,255,0.8),
        0 0 20px rgba(255,255,255,0.6),
        0 0 30px rgba(255,255,255,0.4);
    animation: numberGlow 2s ease-in-out infinite alternate;
}

@keyframes numberGlow {
    from {
        text-shadow: 
            0 0 10px rgba(255,255,255,0.8),
            0 0 20px rgba(255,255,255,0.6),
            0 0 30px rgba(255,255,255,0.4);
    }
    to {
        text-shadow: 
            0 0 15px rgba(255,255,255,1),
            0 0 25px rgba(255,255,255,0.8),
            0 0 35px rgba(255,255,255,0.6);
    }
}

/* Background animated particles */
#community::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px, 100px 100px;
    animation: particleMove 20s linear infinite;
    pointer-events: none;
}

@keyframes particleMove {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-50px) translateY(-50px);
    }
}

/* Enhanced social links */
#community a {
    position: relative;
}

#community a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.4), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

#community a:hover::before {
    width: 120px;
    height: 120px;
}

/* Title decoration enhancement */
#community h2 {
    position: relative;
    text-shadow: 
        0 0 30px rgba(255,255,255,0.5),
        0 0 50px rgba(255,255,255,0.3);
}

#community h2::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    z-index: -1;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#community h2:hover::after {
    opacity: 1;
}

/* Character image enhanced effects */
.social-handle-card-enhanced img[alt$="Character"] {
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.social-handle-card-enhanced:hover img[alt$="Character"] {
    filter: 
        drop-shadow(0 20px 40px rgba(0,0,0,0.5))
        drop-shadow(0 0 20px rgba(255,255,255,0.3));
}

/* Floating animation for decorative elements */
@keyframes animate-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(120deg);
    }
    66% {
        transform: translateY(-5px) rotate(240deg);
    }
}

.animate-float {
    animation: animate-float 4s ease-in-out infinite;
}

/* Modern social media card enhancements */
.fab {
    transition: all 0.3s ease;
}

.group:hover .fab {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

/* Growth indicator animations */
.fas.fa-arrow-up {
    color: #10b981;
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.6));
}

/* Enhanced button hover effects */
button:hover .fab {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.8));
}

/* Corner Characters in Servers Section */
#servers .absolute img[alt$="Character"] {
    transition: all 0.8s ease-in-out;
    animation: characterFloat 6s ease-in-out infinite;
}

#servers .absolute img[alt="Left Character"]:hover {
    transform: scale(1.05) -scale-x-100;
    opacity: 1;
}

#servers .absolute img[alt="Right Character"]:hover {
    transform: scale(1.05);
    opacity: 1;
}

@keyframes characterFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive corner characters */
@media (max-width: 1024px) {
    #servers .absolute img[alt$="Character"] {
        height: 20rem;
        opacity: 0.6;
    }
}

@media (max-width: 768px) {
    #servers .absolute img[alt$="Character"] {
        height: 16rem;
        opacity: 0.4;
    }
}

@media (max-width: 640px) {
    #servers .absolute img[alt$="Character"] {
        display: none;
    }
}

/* Responsive Design for Social Handles */
@media (max-width: 768px) {
    .social-handle-card, .social-handle-card-enhanced {
        padding: 1.5rem;
        margin: 0 auto 30px;
        max-width: 350px;
    }
    
    .social-handle-card img[alt*="Character"], .social-handle-card-enhanced img[alt*="Character"] {
        width: 6rem !important;
        height: 6rem !important;
    }
    
    .social-handle-card .text-4xl, .social-handle-card-enhanced .text-5xl {
        font-size: 2rem;
    }
    
    .social-handle-card .text-2xl, .social-handle-card-enhanced .text-3xl {
        font-size: 1.5rem;
    }
    
    .social-handle-card .text-lg, .social-handle-card-enhanced .text-xl {
        font-size: 1rem;
    }
    
    #community .grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    #community h2 {
        font-size: 3rem;
        margin-bottom: 3rem;
    }
}

/* Language Dropdown Styles */
.language-selector {
    position: relative;
    overflow: visible;
}

#language-dropdown {
    z-index: 1000;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 200px;
    max-width: 250px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.language-option {
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.language-option:hover {
    background-color: rgba(251, 191, 36, 0.1) !important;
    transform: translateX(4px);
}

.language-option img {
    transition: all 0.2s ease;
    border: 1px solid rgba(251, 191, 36, 0.2);
    flex-shrink: 0;
}

.language-option:hover img {
    border-color: rgba(251, 191, 36, 0.5);
    transform: scale(1.05);
}

/* Mobile Language Selector */
.mobile-language-option {
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-language-option:hover {
    background-color: rgba(251, 191, 36, 0.1) !important;
    transform: translateX(2px);
}

.mobile-language-option img {
    transition: all 0.2s ease;
    border: 1px solid rgba(251, 191, 36, 0.2);
    flex-shrink: 0;
}

.mobile-language-option:hover img {
    border-color: rgba(251, 191, 36, 0.5);
    transform: scale(1.05);
}

/* Current flag styling */
#current-flag, #mobile-current-flag {
    transition: all 0.3s ease;
    border: 2px solid rgba(251, 191, 36, 0.3);
    flex-shrink: 0;
}

#current-flag:hover, #mobile-current-flag:hover {
    border-color: rgba(251, 191, 36, 0.6);
    transform: scale(1.05);
}

/* Language dropdown animation */
@keyframes languageDropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.group:hover #language-dropdown {
    animation: languageDropdownSlide 0.3s ease forwards;
}

/* Mobile language grid responsive */
@media (max-width: 480px) {
    #mobile-language-options {
        grid-template-columns: 1fr;
        overflow: hidden;
    }
    
    .mobile-language-option {
        min-width: 0;
    }
}

/* Language change notification styling */
.notification {
    border-left: 4px solid var(--primary-yellow);
    max-width: 90vw;
    word-wrap: break-word;
}

.notification.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border-left-color: #10b981;
}
