/* Meeral Gaming Premium Constants */
:root {
    --primary: #4F46E5; /* Indigo */
    --primary-glow: rgba(79, 70, 229, 0.4);
    --secondary: #10B981; /* Emerald */
    --dark-bg: #0F172A;
    --card-bg: #ffffff;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --sidebar-width: 250px;
    --sidebar-collapsed: 80px;
}

body {
    background-color: #f8fafc !important; /* light sleek grey */
    color: var(--text-main);
    overflow-x: hidden;
}

/* Glassmorphism Navbar */
.glass-nav {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    z-index: 1040;
}

.navbar-brand {
    letter-spacing: -0.5px;
}

.search-box .form-control {
    border-radius: 0 20px 20px 0;
    box-shadow: none !important;
}

.search-box .input-group-text {
    border-radius: 20px 0 0 20px;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 56px; /* below navbar */
    left: 0;
    z-index: 1030;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 10px rgba(0,0,0,0.03);
    overflow-y: auto;
}

.sidebar .nav-link {
    color: var(--text-muted);
    border-radius: 8px;
    padding: 10px 15px;
    margin: 2px 10px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1rem;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .nav-text, 
.sidebar.collapsed .category-title {
    display: none; /* Hide text when collapsed */
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
    font-size: 1.3rem;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
}

/* Main Content Wrapper */
.main-wrapper {
    padding-top: 56px; /* offset navbar */
}

.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: calc(100vh - 56px);
}

/* When sidebar collapsed, expand main content */
.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Hero Banner */
.hero-banner {
    min-height: 400px;
    background-color: var(--dark-bg);
}

.hero-bg {
    width: 100%;
}

.hero-bg-overlay {
    background: linear-gradient(to right, #0F172A 20%, transparent 100%);
}

.hero-content {
    max-width: 100%;
}

.hero-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.3) 100%);
}

.hero-glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
    .hero-bg {
        width: 50%;
    }
    .hero-content {
        max-width: 60%;
    }
    .hero-glass-card {
        padding: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    #hero-title {
        font-size: 2.5rem;
    }
}

.hero-banner .btn {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-banner .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 193, 7, 0.4) !important;
}

/* Game Cards */
.game-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.game-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #e2e8f0;
    overflow: hidden;
}

.game-card-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-card-img-wrap img {
    transform: scale(1.05);
}

.game-card-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.game-card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
}

.game-category {
    font-size: 0.8rem;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
    display: inline-block;
    align-self: flex-start;
}

/* Play Button on Card */
.btn-play-rounded {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 4px 10px var(--primary-glow);
    transition: transform 0.2s;
}

.btn-play-rounded:hover {
    transform: scale(1.1);
}

/* Responsive adjust */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
    }
}

/* Floating animation for Play Button */
@keyframes floatBtn {
    0% { transform: translateY(0px); box-shadow: 0 4px 10px rgba(25, 135, 84, 0.3); }
    50% { transform: translateY(-10px); box-shadow: 0 15px 25px rgba(25, 135, 84, 0.5); }
    100% { transform: translateY(0px); box-shadow: 0 4px 10px rgba(25, 135, 84, 0.3); }
}

.btn-floating {
    animation: floatBtn 2.5s ease-in-out infinite;
    transition: all 0.3s ease;
}

.btn-floating:hover {
    animation: none;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 20px rgba(25, 135, 84, 0.6) !important;
}
