/* Custom Scrollbar */
:root {
    --void-black: #0a0810;
    --void-dark: #120a1a;
    --deep-purple: #6D28D9;
    --royal-purple: #8B5CF6;
    --neon-purple: #A855F7;
    --soft-violet: #C4B5FD;
    --magenta-glow: #D946EF;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--void-black);
}

::-webkit-scrollbar-thumb {
    background: var(--deep-purple);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--royal-purple);
}

/* Selection Color */
::selection {
    background: #8B5CF64D;
    color: #fff;
}

/* Custom Animations */
@keyframes gradient-shift {

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

    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Glass Morphism Effects */
.glass {
    background: #120a1ab3;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #C4B5FD1A;
}

/* Minecraft-style Block Shadow */
.block-shadow {
    box-shadow:
        inset -2px -4px 0 rgba(0, 0, 0, 0.2),
        inset 2px 2px 0 rgba(196, 181, 253, 0.1);
}

/* Floating Particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #A855F74D;
    border-radius: 50%;
    pointer-events: none;
    animation: float-up 20s linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Button Hover Effects */
.btn-purple {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-purple:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            #D946EF40,
            transparent);
    transition: 0.5s;
}

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

/* Text Glow */
.text-glow {
    text-shadow: 0 0 20px #A855F780, 0 0 32px #D946EF4D;
}

/* Card Hover Glow */
.card-glow:hover {
    box-shadow: 0 0 20px #8B5CF640, 0 0 30px #D946EF33;
}

/* Noise Texture */
.noise {
    position: relative;
}

.noise:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* Smooth transitions for all interactive elements */
a,
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading animation for server status */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.pulse-ring:before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--neon-purple);
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Typography */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--royal-purple);
    outline-offset: 2px;
}

/* Prevent text selection on UI elements */
.no-select {
    user-select: none;
    -webkit-user-select: none;
}

/* Fade in up animation for scroll effects */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
    opacity: 0;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

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

/* Hide scrollbar for cleaner look in hero */
.sticky::-webkit-scrollbar {
    display: none;
}

/* Form Elements */
.auth-input {
    background: #120a1a80;
    border: 1px solid #C4B5FD1A;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
}

.auth-input:focus {
    background: #120a1ab3;
    border-color: var(--neon-purple);
    box-shadow: 0 0 20px #D946EF4D;
    outline: none;
}

.auth-input::placeholder {
    color: #C4B5FD80;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #C4B5FDE6;
    font-weight: 500;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #C4B5FD99;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--soft-violet);
    border-bottom-color: var(--royal-purple);
}

/* Dashboard Customizations */
.dashboard-card {
    background: #120a1a99;
    border: 1px solid #C4B5FD1A;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    border-color: var(--deep-purple);
    box-shadow: 0 0 18px #A855F740, 0 0 30px #D946EF26;
}

/* Admin Customizations */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #120a1acc;
    border: 1px solid #C4B5FD1A;
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th {
    background: #6D28D926;
    color: var(--soft-violet);
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #8B5CF64D;
    font-weight: 600;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #C4B5FD0D;
    color: rgba(255, 255, 255, 0.9);
}

.admin-table tr:hover {
    background: #D946EF14;
}

/* Navigation Styles */
.main-nav {
    background: #120a1af2;
    border-bottom: 2px solid #6D28D933;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo-text {
    color: var(--neon-purple);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: #C4B5FDCC;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 8px 12px;
}

.nav-link:hover {
    color: var(--soft-violet);
}

.nav-link.active {
    color: var(--soft-violet);
    border-bottom: 2px solid var(--deep-purple);
}

/* Dropdown menu styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown>.nav-link::after {
    content: '▼';
    margin-left: 6px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nav-dropdown.active>.nav-link::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--void-dark);
    border: 1px solid #6D28D94D;
    border-radius: 8px;
    min-width: 200px;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 8px 0;
    z-index: 200;
}

.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #C4B5FDCC;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: #A855F726;
    color: var(--soft-violet);
    padding-left: 28px;
}

.dropdown-menu a.active {
    background: #D946EF33;
    color: var(--soft-violet);
    border-left: 3px solid var(--magenta-glow);
    padding-left: 17px;
}