/* Base Styles */
:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #4e54c8;
    --accent-hover: #3941a0;
    --card-bg: #1e1e1e;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Header Styles */
header {
    background-color: var(--bg-secondary);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    position: relative;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links .active {
    color: var(--accent);
}

.nav-links .active::after {
    width: 100%;
}

/* Mobile Nav */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
main {
    padding-top: calc(var(--header-height) + 50px);
    min-height: 100vh;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(30px) scale(1.1);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

.hero-bg div {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    animation: float 15s infinite ease-in-out;
}

.hero-bg div:nth-child(1) {
    width: 300px;
    height: 300px;
    left: -150px;
    top: -150px;
    animation-delay: 0s;
}

.hero-bg div:nth-child(2) {
    width: 200px;
    height: 200px;
    right: -100px;
    top: 50%;
    animation-delay: 5s;
}

.hero-bg div:nth-child(3) {
    width: 150px;
    height: 150px;
    left: 40%;
    bottom: -75px;
    animation-delay: 10s;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.3s;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.6s;
}

/* About Section */
.about {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.about-img {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-img img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.about-img:hover img {
    transform: scale(1.05);
}

/* Game Progress */
.progress {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.progress-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.progress-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.progress-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.progress-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.progress-item p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--bg-primary);
    border-radius: 5px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent);
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

/* Blog Section - Home Page */
.blog {
    padding: 80px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.blog-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.blog-card:hover .blog-img img {
    transform: scale(1.1);
}

.blog-content {
    padding: 20px;
}

.blog-date {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.blog-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
    color: var(--accent);
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.read-more {
    color: var(--accent);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.read-more span {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.blog-card:hover .read-more span {
    transform: translateX(5px);
}

/* Animation delays for blog cards */
.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

/* Blog Page Styles */
.blog-header {
    text-align: center;
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

.blog-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

.blog-header-bg div {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    animation: float 15s infinite ease-in-out;
}

.blog-header-bg div:nth-child(1) {
    width: 200px;
    height: 200px;
    left: -100px;
    top: -100px;
    animation-delay: 0s;
}

.blog-header-bg div:nth-child(2) {
    width: 150px;
    height: 150px;
    right: -75px;
    top: 30%;
    animation-delay: 5s;
}

.blog-header h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.3s;
}

.blog-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.6s;
}

/* Blog Container */
.blog-container {
    padding: 0 0 80px;
}

/* Blog Filter */
.blog-filter {
    margin-bottom: 50px;
    text-align: center;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 8px 15px;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.filter-btn:hover {
    color: var(--text-primary);
}

.filter-btn:hover::after {
    width: 80%;
}

.filter-btn.active {
    color: var(--accent);
}

.filter-btn.active::after {
    width: 80%;
}

/* Blog Meta */
.blog-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.blog-category {
    background-color: rgba(78, 84, 200, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent);
}

/* Search Bar */
.search-bar {
    display: flex;
    max-width: 500px;
    margin: 0 auto 40px;
    position: relative;
}

.search-input {
    width: 100%;
    background-color: var(--card-bg);
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 1rem;
    color: var(--text-primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    background-color: var(--accent);
    border: none;
    border-radius: 50px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: var(--accent-hover);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination button {
    margin: 0 5px;
    padding: 5px 10px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background-color: var(--accent);
}

.pagination button.active {
    background-color: var(--accent);
    color: #fff;
}

/* Blog Post Page */
.post-container {
    padding: 3rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2rem;
    text-align: center;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-date {
    position: relative;
    padding-right: 1rem;
}

.post-date::after {
    content: '•';
    position: absolute;
    right: 0;
    color: var(--accent);
}

.post-category {
    color: var(--accent);
    font-weight: 500;
}

.post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.post-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

.post-featured-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    line-height: 1.7;
    font-size: 1.1rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.post-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background-color: var(--accent);
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--accent);
}

.post-content h4 {
    font-size: 1.3rem;
    margin: 1.8rem 0 0.8rem;
}

.post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.post-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 0 1rem 1.5rem;
    margin: 2rem 0;
    background-color: rgba(78, 84, 200, 0.1);
    border-radius: 0 5px 5px 0;
}

.post-content blockquote p {
    font-style: italic;
    margin-bottom: 0;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content figure {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.post-content figcaption {
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
    padding: 0.5rem;
    background-color: var(--card-bg);
    font-size: 0.9rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.post-content code {
    background-color: var(--bg-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--accent);
}

.post-content pre {
    background-color: var(--bg-primary);
    padding: 1rem;
    border-radius: 0 0 5px 5px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent);
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    color: var(--text-primary);
}

.code-filename {
    background-color: var(--bg-primary);
    padding: 0.5rem 1rem;
    border-radius: 5px 5px 0 0;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--accent);
}

.post-navigation {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
}

.back-to-blog {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(78, 84, 200, 0.3);
}

.back-to-blog:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(78, 84, 200, 0.4);
}

/* Loading States */
.loading, .error, .no-content, .no-posts {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.error {
    color: #e74c3c;
}

/* Blog Post Styles */
.blog-post {
    border: 1px solid #333;
    padding: 15px;
    margin: 10px;
    border-radius: 10px;
    background-color: var(--card-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.blog-post a {
    display: block;
    color: var(--text-primary);
}

.blog-post h3 {
    margin: 10px 0;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.blog-post:hover h3 {
    color: var(--accent);
}

.blog-post p {
    color: var(--text-secondary);
}

.blog-post img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.blog-post:hover img {
    transform: scale(1.03);
}

/* Related posts section */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-posts h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

.related-posts h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 70%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-secondary);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-img {
        grid-row: 1;
    }

    .hero h2, .blog-header h2 {
        font-size: 2.2rem;
    }

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

    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-navigation {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero h2, .blog-header h2 {
        font-size: 1.8rem;
    }
    
    .post-title {
        font-size: 1.6rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.3rem;
    }
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.footer-logo img {
    height: 30px;
    margin-right: 10px;
}

.footer-logo h3 {
    font-size: 1.3rem;
}

.footer-info p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent);
}

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

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

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

html {
    scroll-behavior: smooth;
}

.newsletter-container {
    max-width: 100%;
}
  
  .newsletter-form {
    margin-top: 15px;
}
  
  .form-group {
    display: flex;
    margin-bottom: 10px;
}
  
.newsletter-input {
    flex: 1;
    background-color: var(--bg-primary);
    border: 1px solid #333;
    border-radius: 4px 0 0 4px;
    padding: 10px 15px;
    color: var(--text-primary);
    font-size: 0.9rem;
}
  
.newsletter-input:focus {
    outline: none;
    border-color: var(--accent);
}
  
.subscribe-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
  
.subscribe-btn:hover {
    background-color: var(--accent-hover);
}
  
.subscription-message {
    margin-top: 10px;
    font-size: 0.9rem;
}
  
.success-message {
    color: #4CAF50;
}
  
.error-message {
    color: #f44336;
}