/* ====================================================================
   NEW MODERN UI CLASSES - BOX CARDS & BUTTONS 
   ==================================================================== */

/* --- Cyberpunk / Sci-fi Animated Grid Background --- */
body {
    background-color: #050505 !important; /* Deep black space */
    overflow-x: hidden;
    margin: 0;
    /* Standard Scrollbar for Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) rgba(0, 0, 0, 0.1);
}

/* Chrome, Edge, and Safari Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* 3D Moving Perspective Grid Container */
.cyber-grid-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: #000000; /* Deep black */
    pointer-events: none;
}

.cyber-grid {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100vw;
    height: calc(100vh + 100px);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px; /* Size of grid squares */
    animation: gridMove 2s linear infinite; /* Speed of travel */
}

/* No horizon needed for flat 2D grid */
.cyber-glow-horizon {
    display: none;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; } /* Moves exactly one square length down */
}

/* --- Card Effects --- */
.box-card {
    position: relative;
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid transparent;
    border-radius: 0.75rem;
    overflow: hidden;
    padding: 5px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
    background-clip: padding-box;
}

/* Animated gradient border */
.box-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(59,130,246,0.5), rgba(139,92,246,0.3), rgba(6,182,212,0.5), rgba(59,130,246,0.5));
    background-size: 300% 300%;
    animation: borderGlow 6s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
    pointer-events: none;
}

/* Subtle inner ambient glow */
.box-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.4s;
}

.box-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.5), 0 0 25px rgba(59, 130, 246, 0.25), 0 0 50px rgba(139, 92, 246, 0.1);
}
.box-card:hover::before {
    background: linear-gradient(135deg, rgba(59,130,246,0.8), rgba(236,72,153,0.6), rgba(6,182,212,0.8), rgba(139,92,246,0.8));
    animation-duration: 3s;
}
.box-card:hover::after {
    background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.15) 0%, transparent 60%);
}

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

/* Add a glowing neon effect on hover for specific emphasis cards */
.box-card-glow:hover {
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4),
        0 0 40px rgba(139, 92, 246, 0.4);
    border-color: rgba(236, 72, 153, 0.5);
}

.box-card-blue-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4),
        0 0 40px rgba(16, 185, 129, 0.4);
    border-color: rgba(59, 130, 246, 0.5);
}

/* --- Button Effects --- */

/* Modern Neon Gradient Button (Single Color Range - Not Rainbow) */
.btn-neon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6, #60a5fa); /* Dark blue to light blue */
    background-size: 200% auto;
    border-radius: 9999px; /* full rounded */
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); /* Pure blue glow */
    z-index: 1;
}

.btn-neon::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: inherit;
    border-radius: inherit;
    z-index: -1;
    transition: opacity 0.4s ease-in-out;
    opacity: 0;
}

.btn-neon:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6); /* Intensify blue glow */
    color: #fff;
}

.btn-neon:hover::before {
    opacity: 1;
    filter: blur(15px);
}

.btn-neon:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

/* Glassmorphism Outline Button */
.btn-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

/* 3D Push Button Effect */
.btn-3d {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    color: white;
    background-color: #3b82f6;
    /* Tailwind blue-500 */
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 6px 0 #1d4ed8;
    /* Tailwind blue-700 */
    transition: all 0.1s ease-in-out;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-3d:hover {
    background-color: #2563eb;
    /* Tailwind blue-600 */
    transform: translateY(2px);
    box-shadow: 0 4px 0 #1d4ed8;
}

.btn-3d:active {
    transform: translateY(6px);
    box-shadow: none;
}

/* Golden/Premium Button */
.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 800;
    color: #111827;
    /* Dark text */
    text-transform: uppercase;
    background: linear-gradient(to right, #f5ce62, #e43603, #fa7199, #e85a19);
    background-size: 300% 100%;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease-in-out;
    box-shadow: 0 4px 15px rgba(228, 54, 3, 0.4);
}

.btn-gold:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(250, 113, 153, 0.6);
    color: #fff;
}

/* ==================================================================== */
/* OVERRIDING EXISTING CLASSES WITH NEW STYLES                          */
/* ==================================================================== */

/* Apply the new glassmorphism and glow to the existing btn-hover class if it's used elsewhere */
.btn-hover {
    height: 2.5rem !important;
    border-radius: 9999px !important;
    font-weight: bold !important;
    transition: all 0.4s ease-in-out !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.btn-hover:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Overriding theme boxes to use the new glass effect */
.v-dark-theme .vth-style-box,
.v-light-theme .vth-style-box,
.v-noel-theme .vth-style-box,
.v-wildrift-theme .vth-style-box,
.v-wildrift2-theme .vth-style-box {
    background: rgba(17, 24, 39, 0.7) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    border-radius: 0.5rem !important;
}

/* Upgrade existing card container hover effect from index.php */
.hover-card-glow {
    transition: all 0.3s ease !important;
}

.hover-card-glow:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(139, 92, 246, 0.3) !important;
    /* Soft violet glow behind */
    border-color: rgba(139, 92, 246, 0.3) !important;
}