/* Additional custom styles for Big Game Hunter */

/* Line clamp utility for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth animations */
* {
    transition: all 0.2s ease-in-out;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2a2a2e;
}

::-webkit-scrollbar-thumb {
    background: #3a3a40;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ffff;
}

/* Focus states for accessibility */
input:focus, button:focus, a:focus {
    outline: 2px solid #00ffff;
    outline-offset: 2px;
}

/* Loading animation for future use */
@keyframes pulse-glow {
    0%, 100% {
        text-shadow: 0 0 6px currentColor;
    }
    50% {
        text-shadow: 0 0 12px currentColor, 0 0 18px currentColor;
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Table hover effects */
tbody tr:hover {
    background-color: rgba(58, 58, 64, 0.3);
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .font-pixel {
        font-size: 0.75rem;
    }

    .console-icon {
        width: 120px;
        height: 120px;
    }

    /* Make Browse by System section 1 column on mobile with larger gap */
    #top-systems-grid {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 1rem !important;
    }
}

/* Print styles (if needed) */
@media print {
    .font-pixel {
        font-family: monospace;
    }
    
    .text-cyan-glow,
    .text-pink-glow,
    .text-gold-glow {
        color: #000 !important;
        text-shadow: none !important;
    }
}

/* Console Logo Styling */
.console-icon {
    width: 210px;
    height: 140px;
    object-fit: contain;
    background-color: white !important;
    border-radius: 12px;
    padding: 10px;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.console-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.console-logo-large {
    width: 175px;
    height: 175px;
    object-fit: contain;
    background-color: white;
    padding: 15px;
    border-radius: 12px;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.console-logo-large:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

/* Ensure logos maintain aspect ratio and add white backgrounds */
.console-icon img,
.console-logo-large img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Optional: Add glow effect matching site theme */
.console-icon:hover {
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.4), 0 0 4px rgba(0, 255, 255, 0.2);
}

/* Console icon enhancements for better visibility */
.console-icon,
.console-logo-large {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.console-icon:hover,
.console-logo-large:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

/* Search suggestions dropdown - FIXED POSITIONING FOR MAXIMUM COMPATIBILITY */
.search-suggestions,
.search-suggestions-container,
#search-suggestions {
    position: fixed !important; /* FIXED instead of absolute to escape stacking contexts */
    z-index: 2147483647 !important; /* Maximum z-index value */
    background: rgba(42, 42, 42, 0.98) !important;
    backdrop-filter: blur(10px);
    border: 1px solid #00ff41 !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 8px 24px rgba(0, 255, 65, 0.4), 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    max-height: 400px;
    overflow-y: auto;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    isolation: auto !important;
}

/* Ensure no parent creates stacking context issues */
body {
    isolation: auto !important;
}

/* Force all other content to lower z-index */
.hero-section {
    position: relative;
    z-index: 2 !important;
}

/* Browse by System and all panels must be below */
.browse-systems,
.bg-panel,
section:not(.hero-section),
main,
.grid {
    position: relative !important;
    z-index: 1 !important;
}

/* Override any competing z-index values with extreme priority */
#search-suggestions[style] {
    z-index: 2147483647 !important;
    position: fixed !important;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #ffffff;
    border-bottom: 1px solid #333;
    transition: all 0.2s ease;
    position: relative;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: rgba(0, 255, 65, 0.15) !important;
    border-left: 3px solid #00ff41;
}

/* Footer Styling */
footer {
    position: relative;
    z-index: 1;
    background-color: transparent;
}

.footer-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(2px);
    transform: scale(1.1);
}

footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

/* All Systems List Styling */
#all-systems-list img {
    background-color: white;
    padding: 8px;
    object-fit: contain;
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
    footer {
        min-height: 200px !important;
    }

    footer .font-pixel {
        font-size: 1.25rem;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00ffff, #00bfff);
    color: #1a1a1a;
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    cursor: pointer;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.4);
    transition: all 0.2s ease-in-out;
    opacity: 0;
    transform: translateY(20px);
}

.scroll-to-top.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(0) scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 255, 255, 0.6);
    filter: brightness(1.1);
}

.scroll-to-top:active {
    transform: translateY(0) scale(0.95);
}

.scroll-to-top:focus {
    outline: 2px solid #00ffff;
    outline-offset: 2px;
}

/* Mobile responsive sizing */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}
