/* Material Design CSS for Game-Scanner */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary: #c90272;
    --primary-dark: #9c0038;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-white: #ffffff;
    --bg-gray: #fafafa;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--bg-white);
}

/* Header */
.header {
    background: var(--bg-white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .logo img {
    max-height: 50px;
}

.header .navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.header .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.header .nav-link:hover {
    color: var(--primary);
    background: rgba(201, 2, 114, 0.1);
}

/* Featured Article */
.featured-article {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-white) 100%);
}

/* News Cards */
.hot-news {
    padding: 3rem 0;
    background: var(--bg-white);
}

.hot-news h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hot-news h2 i {
    color: var(--primary);
}

.news-carousel-section {
    padding: 3rem 0;
    background: var(--bg-gray);
}

.news-carousel-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.news-carousel-section h2 i {
    color: var(--primary);
    margin-right: 0.5rem;
}

/* Reviews */
.reviews-section {
    padding: 3rem 0;
    background: var(--bg-gray);
}

.reviews-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.reviews-section h2 i {
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem 0;
    margin-top: 3rem;
}

.footer p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.footer .social-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.footer .social-links a {
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer .social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .header .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    .footer .social-links {
        justify-content: center;
        margin-top: 1.5rem;
    }
    .news-carousel-section {
        padding: 2rem 0;
    }
}

@media (max-width: 576px) {
    .news-card .card-image {
        height: 180px;
    }
    .news-card .card-content {
        padding: 1rem;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.scroll-to-top i {
    font-size: 1.2rem;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image loading animation */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Only apply loading animation to lazy-loaded images */
img.lazy {
    opacity: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

img.lazy.loaded {
    opacity: 1;
    background: none;
    animation: none;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .read-more,
    .scroll-to-top {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
    .featured-post,
    .news-card,
    .review-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Placeholder image for missing images */
.placeholder-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #666;
    font-size: 3rem;
}

.placeholder-image i {
    opacity: 0.5;
}

/* Comment counts styling */
.comments {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(201, 2, 114, 0.1);
    color: var(--primary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.comments i {
    font-size: 0.7rem;
    color: var(--primary);
}

.comments:hover {
    background: rgba(201, 2, 114, 0.2);
    transform: scale(1.05);
} 