/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Audiowide&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff0022;
    --primary-dark: #cc0019;
    --primary-light: #ff3355;
    --dark: #050505;
    --darker: #000000;
    --dark-gray: #0a0a0a;
    --medium-gray: #111111;
    --light-gray: #222222;
    --text: #f0f0f0;
    --text-muted: #888888;
    --glow: 0 0 10px rgba(255, 0, 34, 0.7);
    --glow-strong: 0 0 20px rgba(255, 0, 34, 0.9);
}

body {
    background-color: var(--darker);
    color: var(--text);
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Audiowide', cursive;
    font-weight: 400;
    letter-spacing: 1px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromBottom {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 5px var(--primary),
            0 0 10px var(--primary),
            0 0 20px var(--primary),
            0 0 40px var(--primary);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* Login Page Styles */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--darker);
    position: relative;
    overflow: hidden;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at center, rgba(255, 0, 34, 0.1) 0%, rgba(0, 0, 0, 0.5) 70%);
    z-index: 1;
}

.login-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 0, 34, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 34, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 2;
    perspective: 1000px;
    transform-style: preserve-3d;
    animation: fadeIn 2s ease-out;
}

.login-container {
    position: relative;
    z-index: 3;
    text-align: center;
    animation: fadeIn 1.5s ease-out;
}

.login-logo {
    margin-bottom: 2rem;
    animation: pulse 3s infinite ease-in-out;
}

.main-title {
    color: var(--primary);
    font-size: 4rem;
    text-shadow: 
        0 0 5px var(--primary),
        0 0 10px var(--primary),
        0 0 20px var(--primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    animation: neonFlicker 5s infinite;
}

.login-box {
    justify-self: center;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 0, 34, 0.3);
    width: 350px;
    border: 1px solid rgba(255, 0, 34, 0.2);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 0, 34, 0),
        rgba(255, 0, 34, 0),
        rgba(255, 0, 34, 0.05),
        rgba(255, 0, 34, 0)
    );
    transform: rotate(30deg);
    animation: rotateGradient 10s linear infinite;
    z-index: -1;
}

@keyframes rotateGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-box h2 {
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

.login-box h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.login-box input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 1.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--light-gray);
    color: var(--text);
    border-radius: 3px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.login-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 0, 34, 0.5);
}

.login-box button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Audiowide', cursive;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-box button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.5s;
}

.login-box button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 34, 0.4);
}

.login-box button:hover::before {
    left: 100%;
}

.login-box button:active {
    transform: translateY(1px);
}

#error-message {
    color: var(--primary);
    margin-top: 1rem;
    font-size: 0.9rem;
    height: 20px;
    font-weight: 500;
}

/* Header Styles */
header {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.8rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 0 5px rgba(255, 0, 34, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 0, 34, 0.1);
}

header .main-title {
    font-size: 2rem;
    margin-bottom: 0;
    text-shadow: 
        0 0 5px var(--primary),
        0 0 10px var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

nav ul li a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 3px;
    transition: all 0.3s;
    position: relative;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul li a i {
    color: var(--primary);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--text);
    background-color: rgba(255, 0, 34, 0.1);
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a.active {
    background-color: var(--primary);
    color: black;
    font-weight: 700;
}

nav ul li a.active i {
    color: black;
}

nav ul li a.active::after {
    width: 0;
}

/* Main Content Styles */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 1s ease-out;
}

.content {
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 0 0 5px rgba(255, 0, 34, 0.2);
    border: 1px solid rgba(255, 0, 34, 0.1);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-light));
}

.content h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
    animation: slideInFromLeft 1s ease-out;
}

.content h2 i {
    margin-right: 0.5rem;
}

.content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Games Grid Styles */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: linear-gradient(145deg, #0a0a0a, #050505);
    border-radius: 5px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(20, 20, 20, 1);
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.games-grid .game-card:nth-child(1) { animation-delay: 0.1s; }
.games-grid .game-card:nth-child(2) { animation-delay: 0.15s; }
.games-grid .game-card:nth-child(3) { animation-delay: 0.2s; }
.games-grid .game-card:nth-child(4) { animation-delay: 0.25s; }
.games-grid .game-card:nth-child(5) { animation-delay: 0.3s; }
.games-grid .game-card:nth-child(6) { animation-delay: 0.35s; }
.games-grid .game-card:nth-child(7) { animation-delay: 0.4s; }
.games-grid .game-card:nth-child(8) { animation-delay: 0.45s; }
.games-grid .game-card:nth-child(9) { animation-delay: 0.5s; }
.games-grid .game-card:nth-child(10) { animation-delay: 0.55s; }
.games-grid .game-card:nth-child(11) { animation-delay: 0.6s; }
.games-grid .game-card:nth-child(12) { animation-delay: 0.65s; }

.game-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 0, 34, 0),
        rgba(255, 0, 34, 0),
        rgba(255, 0, 34, 0.1),
        rgba(255, 0, 34, 0)
    );
    transform: rotate(30deg);
    z-index: 1;
    transition: all 0.5s;
    opacity: 0;
}

.game-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 0, 34, 0.05),
        rgba(0, 0, 0, 0)
    );
    z-index: 0;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 0, 34, 0.3);
    border-color: rgba(255, 0, 34, 0.3);
    background: linear-gradient(145deg, #0c0c0c, #070707);
}

.game-card:hover::before {
    opacity: 1;
    animation: rotateGradient 10s linear infinite;
}

.game-card h3 {
    color: var(--text);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    position: relative;
    display: inline-block;
    z-index: 2;
}

.game-card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s;
}

.game-card:hover h3::after {
    width: 80%;
}

.game-card button {
    background-color: var(--primary);
    color: black;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Audiowide', cursive;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.game-card button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.5s;
}

.game-card button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 34, 0.4);
}

.game-card button:hover::before {
    left: 100%;
}

.game-card button:active {
    transform: translateY(1px);
}

/* Footer Styles */
footer {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 0, 34, 0.1);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Page Transitions */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--darker);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

.page-transition.active {
    opacity: 1;
}

/* Hero Section for Home Page */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 0, 34, 0.1);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.95)),
                url('https://images.unsplash.com/photo-1511512578047-dfb367046420?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2071&q=80');
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0.7;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 0, 34, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 34, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 2;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    text-shadow: 
        0 0 5px var(--primary),
        0 0 10px var(--primary);
    animation: fadeIn 1s ease-out;
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    animation: fadeIn 1.5s ease-out;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeIn 2s ease-out;
}

.hero-btn {
    padding: 1rem 2.5rem;
    background-color: var(--primary);
    color: black;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Audiowide', cursive;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-btn.secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--text);
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.5s;
}

.hero-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 34, 0.4);
}

.hero-btn.secondary:hover {
    background-color: rgba(255, 0, 34, 0.1);
    color: var(--text);
}

.hero-btn:hover::before {
    left: 100%;
}

/* Featured Games Section */
.featured-games {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 5px rgba(255, 0, 34, 0.5);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    box-shadow: 0 0 10px var(--primary);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* About Page Specific Styles */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.about-image {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    height: 400px;
    border: 1px solid rgba(255, 0, 34, 0.1);
    position: relative;
}

.about-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3),
        rgba(0, 0, 0, 0.7)
    );
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h2 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-shadow: 0 0 5px rgba(255, 0, 34, 0.5);
}

.about-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    
    header .main-title {
        margin-bottom: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero {
        height: 500px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    main {
        padding: 2rem 1rem;
    }
    
    .content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-box {
        width: 90%;
        padding: 1.5rem;
    }
    
    .main-title {
        font-size: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .game-card {
        padding: 1.2rem;
    }
    
    .game-card h3 {
        font-size: 1.3rem;
    }
    
    .about-image {
        height: 300px;
    }
}

/* Animations for elements */
.content, .game-card, .about-image, .about-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.content.visible, .game-card.visible, .about-image.visible, .about-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Shake animation for password input */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}

/* Loading animation */
.loaded {
    animation: fadeIn 0.5s ease-out;
}

/* Glitch effect for game cards on hover */
.game-card:hover h3 {
    animation: glitch 0.3s ease-in-out;
}

/* Update to game card styling to ensure consistent layout */
.game-card {
    background: linear-gradient(145deg, #0a0a0a, #050505);
    border-radius: 5px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(20, 20, 20, 1);
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 180px;
}

.game-card h3 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    position: relative;
    display: inline-block;
    z-index: 2;
    align-self: center;
}

.game-card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s;
}

.game-card:hover h3::after {
    width: 80%;
}

.game-card button {
    background-color: var(--primary);
    color: black;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Audiowide', cursive;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 2;
    margin-top: auto;
    align-self: center;
    width: 80%;
}

/* Games Grid Styles */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    
    .game-card {
        height: 160px;
        padding: 1.2rem;
    }
    
    .game-card h3 {
        font-size: 1.3rem;
    }
    
    .game-card button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

/* Update for main title to have consistent appearance without flicker */
.main-title {
    font-family: 'Audiowide', cursive;
    color: var(--primary);
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary), 0 0 20px var(--primary);
}

/* For the login page title specifically */
.login-container .main-title {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Music Page Styles */
.music-search-container {
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.music-search-box {
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, #0a0a0a, #050505);
    border-radius: 5px;
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 0, 34, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.music-search-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 0, 34, 0.03) 10px,
        rgba(255, 0, 34, 0.03) 20px
    );
    z-index: 0;
    animation: grid-move 20s linear infinite;
    opacity: 0.3;
}

.search-icon {
    color: var(--primary);
    font-size: 1.2rem;
    margin-right: 1rem;
    position: relative;
    z-index: 1;
}

#music-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    padding: 0.8rem 0;
    font-family: 'Rajdhani', sans-serif;
    position: relative;
    z-index: 1;
}

#music-search-input:focus {
    outline: none;
}

#music-search-button {
    background-color: var(--primary);
    color: black;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Audiowide', cursive;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

#music-search-button:hover {
    background-color: #ff1f3d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 34, 0.3);
}

.popular-searches {
    margin-bottom: 2.5rem;
}

.popular-searches h3 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    position: relative;
    display: inline-block;
}

.popular-searches h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    background: rgba(255, 0, 34, 0.1);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 0, 34, 0.2);
}

.tag:hover {
    background: rgba(255, 0, 34, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.music-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category {
    background: linear-gradient(145deg, #0a0a0a, #050505);
    border-radius: 5px;
    padding: 1.5rem;
    border: 1px solid rgba(20, 20, 20, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}

.category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 0, 34, 0.2);
}

.category h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category ul {
    list-style: none;
    padding: 0;
}

.category li {
    color: var(--text);
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.category li:last-child {
    border-bottom: none;
}

.category li:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

.category li:hover::before {
    content: '▶';
    position: absolute;
    left: -15px;
    color: var(--primary);
    font-size: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

@media (max-width: 768px) {
    .music-search-box {
        flex-direction: column;
        padding: 1rem;
    }
    
    .search-icon {
        display: none;
    }
    
    #music-search-input {
        width: 100%;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    #music-search-button {
        width: 100%;
    }
    
    .music-categories {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Logo styling */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-family: 'Audiowide', cursive;
    font-size: 1.8rem;
    color: #ff0022;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 0, 34, 0.3);
}

@media (max-width: 768px) {
    .logo img {
        width: 32px;
        height: 32px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
}

/* Search Bar Styles */
.search-container {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 600px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(255, 0, 34, 0.3);
    border-radius: 5px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 0, 34, 0.2);
}

.search-icon {
    color: var(--text-muted);
    margin-right: 0.8rem;
}

#game-search {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    width: 100%;
    padding: 0.5rem 0;
}

#game-search:focus {
    outline: none;
}

#game-search::placeholder {
    color: var(--text-muted);
}

.clear-search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.clear-search-btn:hover {
    opacity: 1;
    color: var(--primary);
}

/* No results message */
.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 1.2rem;
    background: rgba(10, 10, 10, 0.5);
    border-radius: 5px;
    margin: 2rem 0;
    display: none;
}

/* Animation for search results */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.game-card.search-visible {
    animation: fadeIn 0.3s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
    }
}

