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

:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-card-hover: #2a2a2a;
    --primary: #6a55fa;
    --primary-hover: #7d68ff;
    --primary-light: rgba(106, 85, 250, 0.2);
    --text: #e0e0e0;
    --text-secondary: #b0b0b0;
    --accent: #ff6b6b;
    --transition: all 0.3s ease;
    --hero-gradient: radial-gradient(circle at center, #2c1b6e 0%, #121212 70%);
}

body {
    background: var(--bg-dark);
    color: var(--text);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-gradient);
    opacity: 0.15;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(80, 80, 80, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: white;
    text-decoration: none;
}

.logo-icon {
    color: var(--primary);
    font-size: 2.2rem;
    transition: transform 0.5s ease;
}

.logo:hover .logo-icon {
    transform: rotate(15deg);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a:hover {
    color: var(--primary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 8px 15px;
    width: 250px;
    transition: var(--transition);
}

.search-bar:focus-within {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px var(--primary);
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    width: 100%;
    padding: 5px 10px;
    outline: none;
}

.search-bar button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-bar button:hover {
    color: var(--primary);
}

/* Hero Section - IMPROVED */
.hero {
    padding: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 40vh;
    display: flex;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 4.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #fff, var(--primary), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    text-shadow: 0 0 15px rgba(106, 85, 250, 0.4);
    line-height: 1.1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero p {
    max-width: 650px;
    margin: 0 auto 15px;
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero .search-container {
    position: relative;
    max-width: 700px;
    margin: 30px auto 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.6s;
}

.hero .search-bar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    backdrop-filter: blur(5px);
}

.hero .search-bar:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light), 0 10px 35px rgba(0, 0, 0, 0.5);
}

.hero .search-bar input {
    padding: 0;
    font-size: 1.2rem;
    color: white;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    flex-grow: 1;
}

.hero .search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hero .search-bar button {
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 50%;
    flex-shrink: 0;
}

.hero .search-bar button:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(106, 85, 250, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.8s;
}

.btn {
    padding: 14px 35px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 20px rgba(106, 85, 250, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(106, 85, 250, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Particles Background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(106, 85, 250, 0.15);
    animation: float 15s infinite linear;
}

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

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Games Grid */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin: 0 0 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 70px;
    height: 5px;
    background: var(--primary);
    border-radius: 3px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 35px;
    margin-top: 40px;
}

/* Game Card */
.game-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.5);
    background: var(--bg-card-hover);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
}

.card-image {
    height: 220px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .card-image img {
    transform: scale(1.08);
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: white;
}

.card-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

.genre-tag {
    background: rgba(106, 85, 250, 0.15);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 400;
    transition: var(--transition);
}

.genre-tag:hover {
    background: rgba(106, 85, 250, 0.3);
    transform: translateY(-2px);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex-grow: 1;
    line-height: 1.5;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 18px;
    margin-top: auto;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-weight: 700;
    font-size: 1.15rem;
    color: white;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.card-button {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-align: center;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
    margin-top: 1px;
    transition: var(--transition);
    font-weight: 500;
}

.card-button:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(106, 85, 250, 0.4);
}

/* Footer */
footer {
    margin-top: 100px;
    background: var(--bg-dark, #18181c);
    padding: 50px 0;
    border-top: 1px solid rgba(80, 80, 80, 0.3);
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: white;
    position: relative;
    display: inline-block;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    transition: var(--transition);
    font-size: 1.3rem;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid rgba(80, 80, 80, 0.3);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 900px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 3.2rem;
    }

    .hero p {
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero .search-bar {
        padding: 12px 20px;
    }

    .hero .search-bar input {
        font-size: 1.1rem;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.3rem;
    }

    .hero p {
        font-size: 1rem;
    }

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

/* Hide header search bar on all devices */
.header-content .search-bar {
    display: none;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    list-style: none;
    padding: 5px 0;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-menu li a:hover {
    background: rgba(106, 85, 250, 0.1);
    color: var(--primary);
}

.dropdown-menu li a .fas {
    width: 20px;
    text-align: center;
}

/* Added explicit style for small buttons to reduce border-radius */
.btn-sm {
    padding: 8px 12px;
    font-size: 0.85rem;
    margin-right: 8px;
    border-radius: 5px;
}

.admin-table .btn-sm {
    margin-right: 8px;
    border-radius: 5px;
}

/* Game Detail Page Background */
.game-detail-page {
    position: relative;
    overflow: hidden; /* Ensure background doesn't overflow */
    background: none; /* Remove previous background as it's now handled by .game-background */
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-top: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 2; /* Ensure content is above background */
}

.game-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4); /* Darken the background image */
    z-index: -1; /* Place behind content */
    border-radius: 15px; /* Match container border-radius */
}

/* Ensure content is positioned correctly above the background */
.game-detail-page > *:not(.game-background) {
    position: relative;
    z-index: 10;
}

/* --- Forum Styles --- */

.forum-page {
    /* Specific styles for forum pages if needed */
}

.forum-category-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.forum-category-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card-dark);
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.forum-category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.category-card-content {
    flex-grow: 1;
}

.category-title {
    margin: 0 0 5px 0;
    color: var(--primary);
    font-size: 1.2rem;
}

.category-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.category-card-stats {
    flex-shrink: 0;
    padding-left: 20px;
    margin-left: 20px;
    border-left: 1px solid var(--border-color-light);
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
}

.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.topic-list {
    background-color: var(--bg-card-dark);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.topic-list-header,
.topic-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    gap: 20px;
    padding: 15px 20px;
    align-items: center;
}

.topic-list-header {
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color-light);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.topic-item {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

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

.topic-item:hover {
    background-color: var(--bg-card-hover);
}

.topic-title a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 5px;
}

.topic-title a:hover {
    color: var(--primary);
}

.topic-title small {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.topic-replies {
    text-align: center;
    font-size: 1.2rem;
}

.topic-last-post {
    font-size: 0.9rem;
    line-height: 1.4;
}
.topic-last-post a {
    color: var(--text);
    text-decoration: none;
}
.topic-last-post a:hover {
    text-decoration: underline;
}
.topic-last-post small {
    display: block;
    color: var(--text-secondary);
}

/* Post Styles */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-item {
    display: flex;
    gap: 20px;
    background-color: var(--bg-card-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.post-author {
    flex-shrink: 0;
    width: 150px;
    background-color: rgba(0,0,0,0.2);
    padding: 20px;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid var(--primary);
}

.author-name {
    font-weight: 700;
    color: var(--text);
}

.author-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-content {
    padding: 20px;
    flex-grow: 1;
}

.post-meta {
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.post-body {
    line-height: 1.7;
}

.forum-divider {
    border-color: var(--border-color-light);
    margin: 30px 0;
}

.reply-form-container {
    background-color: var(--bg-card-dark);
    padding: 25px;
    border-radius: 8px;
}

.reply-title {
    margin-top: 0;
}

.reply-textarea {
    width: 100%;
    padding: 10px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text);
    margin-bottom: 15px;
    resize: vertical;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 8px;
    padding: 10px;
}

.pagination a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination a:hover {
    background-color: var(--bg-card-hover);
    color: var(--text);
    border-color: var(--primary-light);
}

.pagination a.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    cursor: default;
} 