* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00A7FF;
    --primary-hover: #005D8E;
    --secondary: #1CE882;
    --accent: #F5D41E;
    --accent-orange: #F59914;
    --bg-dark: #0a0e1a;
    --bg-darker: #060810;
    --bg-card: #0f1420;
    --bg-card-hover: #151b2e;
    --text-primary: #ffffff;
    --text-secondary: #b4b4b4;
    --text-muted: #737373;
    --border: #1a2332;
    --success: #1CE882;
    --danger: #ef4444;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
    --glow: 0 0 20px rgba(0, 167, 255, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #060810 0%, #0a0e1a 50%, #0d1220 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background - Dynamic & Engaging */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 167, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(28, 232, 130, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(245, 212, 30, 0.08) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 70% 20%, rgba(245, 89, 20, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 30% 80%, rgba(0, 167, 255, 0.10) 0%, transparent 45%),
        radial-gradient(circle at 90% 50%, rgba(28, 232, 130, 0.07) 0%, transparent 45%);
    animation: backgroundMoveAlt 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Disable animations for detail page */
body.detail-page-body::before,
body.detail-page-body::after {
    animation: none;
    opacity: 0.3;
    transform: none;
}

@keyframes backgroundMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translate(5%, -5%) scale(1.1);
        opacity: 1;
    }
    50% {
        transform: translate(-3%, 4%) scale(0.95);
        opacity: 0.9;
    }
    75% {
        transform: translate(4%, 3%) scale(1.05);
        opacity: 0.85;
    }
}

@keyframes backgroundMoveAlt {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.7;
    }
    33% {
        transform: translate(-4%, 5%) rotate(2deg);
        opacity: 0.9;
    }
    66% {
        transform: translate(5%, -4%) rotate(-2deg);
        opacity: 0.8;
    }
}

.navbar,
.main-content,
.container {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, rgba(6, 8, 16, 0.98), rgba(10, 14, 26, 0.98));
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(0, 167, 255, 0.5), rgba(28, 232, 130, 0.5), transparent) 1;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(0, 167, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 167, 255, 0.03) 25%, 
        rgba(28, 232, 130, 0.03) 50%, 
        rgba(245, 212, 30, 0.03) 75%, 
        transparent 100%);
    pointer-events: none;
    animation: navbarShimmer 8s ease-in-out infinite;
}

@keyframes navbarShimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 70px;
    gap: 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.nav-brand:hover {
    transform: translateY(-1px);
}

.nav-brand svg {
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.nav-brand:hover svg {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 167, 255, 0.4));
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00A7FF 0%, #1CE882 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.8px;
}

/* Nav Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    max-width: 600px;
}

.nav-search {
    position: relative;
    flex: 1;
    z-index: 100;
}

.nav-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.nav-search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.75rem;
    background: rgba(15, 20, 32, 0.6);
    border: 1px solid rgba(0, 167, 255, 0.15);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.nav-search-input::placeholder {
    color: var(--text-muted);
}

.nav-search-input:focus {
    outline: none;
    border-color: rgba(0, 167, 255, 0.4);
    background: rgba(15, 20, 32, 0.8);
    box-shadow: 0 0 0 3px rgba(0, 167, 255, 0.1);
}

.nav-genre-filter {
    padding: 0.7rem 1rem;
    background: rgba(15, 20, 32, 0.6);
    border: 1px solid rgba(0, 167, 255, 0.15);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    min-width: 150px;
}

.nav-genre-filter:focus {
    outline: none;
    border-color: rgba(0, 167, 255, 0.4);
    background: rgba(15, 20, 32, 0.8);
    box-shadow: 0 0 0 3px rgba(0, 167, 255, 0.1);
}

.nav-genre-filter option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 100%;
    background: rgba(15, 20, 32, 0.98);
    border: 1px solid rgba(0, 167, 255, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-dropdown.show {
    display: block;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0, 167, 255, 0.1);
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: rgba(0, 167, 255, 0.15);
}

.search-dropdown-thumb {
    width: 60px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.search-dropdown-info {
    flex: 1;
    min-width: 0;
}

.search-dropdown-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-genres {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.search-dropdown-genre {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.15rem 0.5rem;
    background: rgba(0, 167, 255, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(0, 167, 255, 0.2);
}

.search-dropdown-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0, 167, 255, 0.3);
    border-radius: 10px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 167, 255, 0.5);
}

/* Filters Section */
.filters-section {
    margin-bottom: 2rem;
}

.filters-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(15, 20, 32, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(0, 167, 255, 0.1);
    backdrop-filter: blur(10px);
    width: fit-content;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.category-tab svg {
    transition: all 0.2s;
}

.category-tab:hover {
    background: rgba(0, 167, 255, 0.1);
    color: var(--text-primary);
}

.category-tab.active {
    background: linear-gradient(135deg, rgba(0, 167, 255, 0.2), rgba(28, 232, 130, 0.15));
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 167, 255, 0.2);
}

.category-tab.active svg {
    filter: drop-shadow(0 0 4px rgba(0, 167, 255, 0.6));
}

/* Search & Filter Group */
.search-filter-group {
    display: flex;
    gap: 0.75rem;
}

.search-wrapper {
    flex: 2;
    position: relative;
}

.filter-wrapper {
    flex: 1;
    max-width: 250px;
    position: relative;
}

.search-input,
.category-filter {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    background: rgba(15, 20, 32, 0.7);
    border: 1px solid rgba(0, 167, 255, 0.15);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus,
.category-filter:focus {
    outline: none;
    border-color: rgba(0, 167, 255, 0.5);
    background: rgba(15, 20, 32, 0.9);
    box-shadow: 0 0 0 4px rgba(0, 167, 255, 0.1);
    transform: translateY(-1px);
}

.category-filter option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.search-icon,
.filter-icon {
    width: 18px;
    height: 18px;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.game-card {
    background: linear-gradient(145deg, rgba(15, 20, 32, 0.95), rgba(10, 14, 26, 0.95));
    border-radius: 16px;
    overflow: hidden;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 167, 255, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

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

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 8px 16px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 167, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, rgba(20, 25, 37, 0.98), rgba(15, 20, 32, 0.98));
}

.game-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
}

.game-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 2;
}

.game-card:hover .game-thumbnail::after {
    left: 100%;
}

.game-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
}



.game-info {
    padding: 1rem;
    background: transparent;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8rem;
    letter-spacing: -0.3px;
}

.game-genres-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.genre-tag-small {
    background: rgba(0, 167, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border-radius: 4px;
    border: 1px solid rgba(0, 167, 255, 0.25);
    transition: all 0.2s ease;
}

.genre-tag-small:hover {
    background: rgba(0, 167, 255, 0.2);
    border-color: rgba(0, 167, 255, 0.4);
    color: var(--text-primary);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 167, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(0, 167, 255, 0.5);
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
}

.btn-danger {
    background: linear-gradient(135deg, #ff0050, #cc0040);
    color: var(--text-primary);
}

.btn-danger:hover {
    box-shadow: 0 6px 25px rgba(255, 0, 80, 0.5);
    transform: translateY(-2px);
}

.btn-download {
    width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 20, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-card);
    margin: 3rem auto;
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 900px;
    position: relative;
    animation: slideIn 0.3s;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-darker);
}

.close:hover {
    color: var(--primary);
    background: var(--bg-dark);
    transform: rotate(90deg);
}

/* Admin Panel */
.admin-section {
    background: rgba(15, 20, 32, 0.7);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 167, 255, 0.15);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.admin-section h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem 1rem;
    background: rgba(6, 8, 16, 0.6);
    border: 1px solid rgba(0, 167, 255, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 167, 255, 0.15);
    background: rgba(6, 8, 16, 0.9);
}

.form-group select option {
    background: var(--bg-darker);
    color: var(--text-primary);
}

.admin-games-section {
    background: rgba(36, 36, 36, 0.4);
    padding: 1.8rem;
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.admin-games-section h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-game-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: rgba(26, 26, 26, 0.4);
    border: 1px solid rgba(51, 51, 51, 0.5);
    border-radius: 8px;
    margin-bottom: 0.8rem;
    transition: all 0.2s;
}

.admin-game-item:hover {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(26, 26, 26, 0.7);
}

.admin-game-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.admin-game-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-game-actions {
    display: flex;
    gap: 0.75rem;
}

/* Loading & Error */
.loading {
    display: none !important;
}

.error,
.message {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.error {
    color: var(--danger);
    border-color: var(--danger);
}

/* Skeleton Loading */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.skeleton-card {
    background: rgba(15, 20, 32, 0.6);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(26, 35, 50, 0.6);
    backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.skeleton-thumbnail {
    width: 100%;
    height: 180px;
    background: linear-gradient(
        90deg,
        rgba(26, 35, 50, 0.4) 0%,
        rgba(0, 167, 255, 0.1) 50%,
        rgba(26, 35, 50, 0.4) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-title {
    height: 1.5rem;
    background: linear-gradient(
        90deg,
        rgba(26, 35, 50, 0.4) 0%,
        rgba(0, 167, 255, 0.1) 50%,
        rgba(26, 35, 50, 0.4) 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: shimmer 1.5s ease-in-out infinite;
    animation-delay: 0.1s;
}

.skeleton-genres {
    display: flex;
    gap: 0.5rem;
}

.skeleton-genre {
    height: 1.5rem;
    width: 60px;
    background: linear-gradient(
        90deg,
        rgba(26, 35, 50, 0.4) 0%,
        rgba(0, 167, 255, 0.1) 50%,
        rgba(26, 35, 50, 0.4) 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: shimmer 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.message {
    margin-top: 1rem;
    font-weight: 600;
}

.message.success {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.1));
    color: var(--success);
    border-color: var(--success);
}

.message.error {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.2), rgba(255, 0, 80, 0.1));
    color: var(--danger);
    border-color: var(--danger);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    padding: 3rem 0 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        padding: 1rem;
        height: auto;
        gap: 1rem;
    }

    .nav-controls {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
    }
    
    .nav-genre-filter {
        width: 100%;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-tabs {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    
    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .admin-game-item {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .modal-content {
        margin: 10% 1rem;
        padding: 1.5rem;
    }
}

/* Main Content */
.main-content {
    padding: 1.5rem 0;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.header-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat-item svg {
    stroke: var(--primary);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search Wrapper */
.search-wrapper,
.filter-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-icon,
.filter-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    padding-left: 3.5rem !important;
}

.category-filter {
    padding-left: 3.5rem !important;
}

/* Loading Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header svg {
    stroke: var(--primary);
}

.section-header h2 {
    margin: 0;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label svg {
    stroke: var(--primary);
}

/* Button with Icon */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn svg {
    stroke: currentColor;
}

/* Admin Game Item Enhanced */
.admin-game-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
}

.admin-game-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Nav Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand svg {
    flex-shrink: 0;
}

/* Nav Link with Icon */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link svg {
    stroke: currentColor;
    flex-shrink: 0;
}

/* Modal Close Button */
.close {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    cursor: pointer;
}

.close svg {
    stroke: var(--text-muted);
}



/* Online Badge SVG */
.online-badge-svg {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.3rem 0.55rem;
    border-radius: 5px;
    border: 1px solid rgba(16, 185, 129, 0.5);
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    animation: onlinePulse 2.5s ease-in-out infinite, onlineFloat 3s ease-in-out infinite;
}

.online-badge-svg svg {
    flex-shrink: 0;
    filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.7));
    animation: onlineRotate 8s linear infinite;
}

.online-badge-svg span {
    font-size: 0.65rem;
    font-weight: 700;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

@keyframes onlinePulse {

    0%,
    100% {
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.6),
            0 0 0 0 rgba(16, 185, 129, 0.6),
            inset 0 0 10px rgba(16, 185, 129, 0.1);
        border-color: rgba(16, 185, 129, 0.5);
    }

    50% {
        box-shadow:
            0 2px 12px rgba(0, 0, 0, 0.7),
            0 0 0 3px rgba(16, 185, 129, 0),
            inset 0 0 15px rgba(16, 185, 129, 0.2);
        border-color: rgba(16, 185, 129, 0.8);
    }
}

@keyframes onlineRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes onlineFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-2px);
    }
}

/* Online Game Border */
.game-card.online-game:hover {
    border-color: rgba(16, 185, 129, 0.8);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(16, 185, 129, 0.4);
    background: rgba(15, 20, 32, 0.9);
}

/* Detail Page */
.detail-page {
    min-height: 60vh;
    padding: 2rem 0;
}

.detail-header {
    margin-bottom: 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.back-button:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.detail-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-hero {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.hero-image {
    max-width: 700px;
    max-height: 400px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.download-section {
    margin-top: 1.5rem;
}

.btn-download-hero {
    width: 100%;
    background: linear-gradient(135deg, #00A7FF, #1CE882, #F5D41E);
    color: #0a0e1a;
    padding: 1.25rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 24px rgba(0, 167, 255, 0.4), 0 0 40px rgba(28, 232, 130, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    animation: downloadPulse 2s ease-in-out infinite;
}

.btn-download-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-download-hero:hover::before {
    left: 100%;
}

.btn-download-hero:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 167, 255, 0.6), 0 0 60px rgba(28, 232, 130, 0.4);
    background: linear-gradient(135deg, #1CE882, #F5D41E, #F59914);
}

.btn-download-hero svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes downloadPulse {

    0%,
    100% {
        box-shadow: 0 4px 24px rgba(0, 167, 255, 0.4), 0 0 40px rgba(28, 232, 130, 0.2);
    }

    50% {
        box-shadow: 0 4px 24px rgba(0, 167, 255, 0.6), 0 0 50px rgba(28, 232, 130, 0.3);
    }
}

.detail-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.detail-section h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.detail-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.gameplay-video {
    width: 100%;
    border-radius: 6px;
    background: #000;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-title-main {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
}

.game-version {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.genre-tag {
    background: var(--primary);
    color: var(--text-primary);
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
}

.info-box h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.info-box pre {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        order: -1;
    }
}

/* Steam Preview */
.steam-preview {
    background: linear-gradient(135deg, rgba(0, 167, 255, 0.08), rgba(28, 232, 130, 0.05));
    border: 1px solid rgba(0, 167, 255, 0.3);
    border-radius: 10px;
    padding: 1.2rem;
    margin: 0.8rem 0;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 167, 255, 0.1);
}

.steam-preview-content {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.steam-preview-content img {
    width: 260px;
    height: auto;
    border-radius: 6px;
    border: 1px solid rgba(0, 167, 255, 0.3);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 167, 255, 0.15);
}

.steam-preview-info {
    flex: 1;
}

.steam-preview-info h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.steam-preview-info p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.85rem;
}

.steam-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--text-secondary);
}

.steam-loading .loading-spinner {
    width: 30px;
    height: 30px;
}

@media (max-width: 768px) {
    .steam-preview-content {
        flex-direction: column;
    }

    .steam-preview-content img {
        width: 100%;
    }
}