/* ============================================
   GAMEHUB - PROFESSIONAL GAMING WEBSITE STYLES
   ============================================ */

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --primary-color: #6f42c1;
    --secondary-color: #fd7e14;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --muted-color: #6c757d;
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-dark: linear-gradient(135deg, #434343 0%, #000000 100%);
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    
    --transition: all 0.3s ease;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
#navbarNav{
    background-color: #2c3034;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Remove padding for pages with hero sections */
body.has-hero {
    padding-top: 0px !important;
}

/* Page headers for non-hero pages */
.page-header {
    background: var(--gradient-primary);
    padding: 4rem 0 2rem 0;
    
    padding-top: calc(4rem + 76px); /* Add navbar height back to padding */
    color: white;
}

.page-header.small {
    padding: 2rem 0 1rem 0;
    padding-top: calc(2rem + 76px);
}

/* Ensure content sections have proper spacing */
.content-section {
    padding: 3rem 0;
}

.content-section:first-of-type:not(.page-header) {
    padding-top: 1rem; /* Reduced top padding for first content sections */
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a359a;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(33, 37, 41, 0.95) !important;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 76px; /* Fixed height for consistency */
    z-index: 1030; /* Ensure it stays on top */
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    margin-top: 76px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-search .form-control {
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
}

.hero-search .btn {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.hero-stats h3 {
    font-size: 2rem;
    margin-bottom: 0;
}

.game-card-large {
    animation: float-gentle 6s ease-in-out infinite;
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   SECTION STYLES
   ============================================ */
.categories-section,
.featured-games,
.recent-games {
    padding: 5rem 0;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* ============================================
   GAME CARD STYLES
   ============================================ */
.game-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.game-card:hover::before {
    opacity: 0.1;
}

.game-card-header {
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    transition: var(--transition);
}

.game-card:hover .game-icon {
    transform: scale(1.1);
}

.game-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.game-card-description {
    color: var(--muted-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.game-card-footer {
    padding: 1rem 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.02);
    position: relative;
    z-index: 2;
}

.play-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    width: 100%;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: white;
}

/* ============================================
   CATEGORY CARD STYLES
   ============================================ */
.category-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: inherit;
}

.category-header {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--gradient-primary);
    color: white;
    position: relative;
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-count {
    opacity: 0.9;
    font-size: 0.9rem;
}

.category-footer {
    padding: 1.5rem 2rem;
    text-align: center;
}

.category-description {
    color: var(--muted-color);
    margin-bottom: 1rem;
}

.category-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0.5rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.category-btn:hover {
    background: #5a359a;
    transform: translateY(-2px);
}

/* ============================================
   BADGES AND LABELS
   ============================================ */
.game-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--danger-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 3;
}

.game-badge.new {
    background: var(--success-color);
}

.game-badge.hot {
    background: var(--danger-color);
}

.game-badge.featured {
    background: var(--warning-color);
    color: var(--dark-color);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .hero-stats h3 {
        font-size: 1.5rem;
    }
    
    .game-card-header {
        padding: 1.5rem;
    }
    
    .category-header {
        padding: 2rem 1.5rem;
    }
    
    .category-icon {
        font-size: 3rem;
    }
    
    .category-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .hero-section .display-4 {
        font-size: 1.75rem;
    }
    
    .game-card-header {
        padding: 1rem;
    }
    
    .game-icon {
        font-size: 2.5rem;
    }
    
    .category-header {
        padding: 1.5rem 1rem;
    }
    
    .category-icon {
        font-size: 2.5rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.border-radius-custom {
    border-radius: var(--border-radius-lg);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   FOOTER STYLES
   ============================================ */
footer {
    margin-top: auto;
}

.social-links a {
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .game-card {
        background: #2d3748;
        color: white;
    }
    
    .category-card {
        background: #2d3748;
        color: white;
    }
}
