/* Base Styles */
:root {
    --primary-color: #4a148c;
    --secondary-color: #7b1fa2;
    --accent-color: #ff4081;
    --text-color: #333333;
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --header-color: #212121;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px 0 0 20px;
    width: 100%;
    font-size: 0.9rem;
    outline: none;
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0 15px;
    border-radius: 0 20px 20px 0;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.user-actions {
    display: flex;
    gap: 15px;
}

.login-btn, .signup-btn {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.signup-btn {
    background-color: var(--primary-color);
    color: white;
}

.login-btn:hover {
    background-color: rgba(74, 20, 140, 0.1);
}

.signup-btn:hover {
    background-color: var(--secondary-color);
}

.main-nav {
    background-color: var(--header-color);
    padding: 10px 0;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.main-nav a {
    color: white;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a:hover {
    color: var(--accent-color);
}

/* Hero Banner */
.hero-banner {
    height: 500px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://via.placeholder.com/1920x1080?text=Game+Background');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: white;
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hero-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transition: all 0.5s ease;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.hero-btn:hover::after {
    left: 100%;
}

/* Featured Topics */
.featured-topics {
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--header-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.topic-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.topic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.topic-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.topic-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.topic-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--header-color);
}

.topic-desc {
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Breaking News */
.breaking-news {
    padding: 60px 0;
    background-color: #f5f5f5;
}

.news-feed {
    position: relative;
    padding: 20px 0;
}

.news-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px var(--shadow-color);
    display: none;
}

.news-item.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-content {
    max-width: 800px;
    margin: 0 auto;
}

.news-category {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.news-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--header-color);
}

.news-excerpt {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.7;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
}

.news-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 10;
}

.prev-news {
    left: -60px;
}

.next-news {
    right: -60px;
}

.news-nav-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Featured News */
.featured-news {
    padding: 60px 0;
    background-color: white;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 30px;
    height: 100%;
}

.featured-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.featured-card.large {
    grid-column: span 2;
    height: 100%;
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.featured-img-container {
    height: 200px;
}

.featured-img-container.large {
    height: 300px;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.featured-category {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.featured-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--header-color);
    line-height: 1.4;
}

.featured-excerpt {
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
}

/* Recent Updates */
.recent-updates {
    padding: 60px 0;
    background-color: #f5f5f5;
}

.updates-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(550px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.update-item {
    display: flex;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

.update-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.update-img-container {
    flex: 0 0 120px;
}

.update-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.update-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.update-category {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 5px;
}

.update-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--header-color);
    line-height: 1.4;
}

.update-time {
    font-size: 0.8rem;
    color: #888;
    margin-top: auto;
}

.view-more-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 200px;
    margin: 0 auto;
}

.view-more-btn:hover {
    background-color: var(--secondary-color);
}

/* Footer Styles */
.footer-top {
    background-color: var(--header-color);
    padding: 60px 0;
    color: white;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
}

.footer-desc {
    margin-bottom: 20px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    color: white;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--accent-color);
}

.footer-heading {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: white;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    background-color: #1a1a1a;
    padding: 20px 0;
    color: white;
}

.footer-legal {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.legal-link {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.legal-link:hover {
    color: var(--accent-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .header-top {
        flex-wrap: wrap;
    }

    .logo-container {
        margin-bottom: 10px;
    }

    .search-container {
        order: 3;
        margin: 10px 0;
        width: 100%;
    }

    .user-actions {
        gap: 10px;
    }

    .login-btn, .signup-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .featured-card.large {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-wrap: wrap;
        gap: 15px;
    }

    .hero-banner {
        height: 400px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .updates-list {
        grid-template-columns: 1fr;
    }

    .footer-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .user-actions {
        display: none;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .news-title {
        font-size: 1.5rem;
    }

    .featured-title {
        font-size: 1.1rem;
    }

    .footer-columns {
        grid-template-columns: 1fr;
    }

    .copyright, .footer-legal {
        text-align: center;
    }
}