/* === CUSTOM STYLES === */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: white;
}

.nav-logo {
    width: 65px;   /* adjust size here */
    height: 65px;  /* keep square */
    object-fit: contain; /* keeps logo ratio */
}
/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: #2a2a3a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* Navbar Glass Effect */
#navbar.scrolled {
    background: rgba(12, 12, 18, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Loading Screen Fade */
#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Player Cards */
.player-card {
    opacity: 0;
    animation: cardFadeIn 0.6s ease-out forwards;
}

.player-card:nth-child(2) {
    animation-delay: 0.1s;
}

.player-card:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure equal height player cards */
.player-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.player-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Clamp bio text to 2 lines for consistent card heights */
.player-bio {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.75rem; /* ~2 lines at text-sm */
}

/* Ensure action buttons section sticks to bottom */
.player-actions {
    margin-top: auto;
}

/* Smooth fade-in animation on scroll */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Neon Glow Effects */
.neon-glow-purple {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3), 0 0 30px rgba(168, 85, 247, 0.1);
}

.neon-glow-blue {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3), 0 0 30px rgba(59, 130, 246, 0.1);
}

/* Hover Scale Effect */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Gradient Text Animation */
.gradient-text-animate {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Mobile Menu Animation */
#mobile-menu.open {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger Animation */
#mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Filter Button Active State */
.filter-btn.active {
    background: linear-gradient(135deg, #a855f7, #3b82f6) !important;
    color: white !important;
}

/* Scroll Top Button Visible */
#scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Card Glow Hover */
.glow-hover {
    transition: all 0.3s ease;
}

.glow-hover:hover {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.15), 0 0 40px rgba(168, 85, 247, 0.05);
}

/* Responsive Font Sizes */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
}

/* Loading Dots */
.loading-dot {
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

/* Ensure smooth transitions for all interactive elements */
a, button, input, .transition-all {
    -webkit-tap-highlight-color: transparent;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}
