/* 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%);
}

.featured-post {
    height: 750px;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.featured-post .post-image {
    height: 400px;
    overflow: hidden;
}

.featured-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-post:hover .post-image img {
    transform: scale(1.05);
}

.featured-post .post-content {
    padding: 1.2rem;
    position: relative;
}

.featured-post h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.featured-post .post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.featured-post .post-meta .date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.featured-post .post-meta .author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.featured-post .post-meta i {
    color: var(--primary);
    margin-right: 0.25rem;
}

.featured-post .post-excerpt {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1rem;
}

.featured-post .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.featured-post .read-more:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: white;
}

.featured-post .read-more i {
    transition: transform 0.3s ease;
}

.featured-post .read-more:hover i {
    transform: translateX(4px);
}

/* Trending Articles */
.trending-articles {
    height: fit-content;
    position: sticky;
    top: 100px;
}

.trending-articles h3 {
    margin-bottom: 1.25rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.trending-articles h3 i {
    color: var(--primary);
}

/* New Trending Cards */
.trending-card {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.trending-card:last-child {
    margin-bottom: 0;
}

.trending-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.trending-card-link {
    display: flex;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.trending-card-image {
    width: 80px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.trending-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trending-card:hover .trending-card-image img {
    transform: scale(1.05);
}

.trending-card-content {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.trending-card-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.trending-card-meta .date {
    color: var(--text-light);
    font-size: 0.75rem;
}

.trending-card-meta .comments {
    color: var(--primary);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.trending-card-meta .comments i {
    font-size: 0.7rem;
}

.trending-card-read-more {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: auto;
    transition: color 0.2s ease;
}

.trending-card-read-more i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.trending-card:hover .trending-card-read-more {
    color: var(--primary-dark);
}

.trending-card:hover .trending-card-read-more i {
    transform: translateX(2px);
}

/* Mobile responsive for trending cards */
@media (max-width: 576px) {
    .trending-card-image {
        width: 60px;
    }
    
    .trending-card-content {
        padding: 0.5rem;
    }
    
    .trending-card-content h4 {
        font-size: 0.85rem;
    }
    
    .trending-card-meta {
        font-size: 0.7rem;
    }
    
    .trending-card-read-more {
        font-size: 0.75rem;
    }
}

/* 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;
}

.news-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.news-card .card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-card .card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover .card-image::before {
    opacity: 1;
}

.news-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .card-image img {
    transform: scale(1.05);
}

.news-card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.news-card .card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.news-card .card-meta .date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-card .card-meta .date i {
    color: var(--primary);
}

.news-card .card-meta i {
    margin-right: 0.25rem;
    color: var(--primary);
}

.news-card .read-more {
    color: var(--primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.news-card .read-more:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

.news-card .read-more i {
    transition: transform 0.3s ease;
}

.news-card:hover .read-more i {
    transform: translateX(4px);
}

/* 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);
}

.review-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.review-card::before {
    content: 'REVIEW';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.review-card .card-image {
    height: 200px;
    background: linear-gradient(45deg, #ff4081, var(--primary));
    position: relative;
    overflow: hidden;
}

.review-card .card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.review-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.review-card:hover .card-image img {
    transform: scale(1.05);
}

.review-card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.review-card .card-content > div {
    flex-grow: 1;
}

.review-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.review-card .card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.review-card .card-meta .date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.review-card .card-meta .date i {
    color: var(--primary);
}

.review-card .card-meta i {
    margin-right: 0.25rem;
    color: var(--primary);
}

.review-card .read-more {
    color: var(--primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.review-card .read-more i {
    transition: transform 0.3s ease;
}

.review-card:hover .read-more i {
    transform: translateX(4px);
}

/* 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;
    }
    
    .featured-post .post-image {
        height: 250px;
    }
    
    .featured-post .post-content {
        padding: 1.5rem;
    }
    
    .featured-post h1 {
        font-size: 1.5rem;
    }
    
    .trending-articles {
        margin-top: 2rem;
        position: static;
    }
    
    .footer .social-links {
        justify-content: center;
        margin-top: 1.5rem;
    }
    
    .news-carousel-section {
        padding: 2rem 0;
    }
}

@media (max-width: 576px) {
    .featured-post .post-image {
        height: 200px;
    }
    
    .featured-post .post-content {
        padding: 1rem;
    }
    
    .trending-card-image {
        width: 60px;
    }
    
    .trending-card-content {
        padding: 0.5rem;
    }
    
    .trending-card-content h4 {
        font-size: 0.85rem;
    }
    
    .trending-card-meta {
        font-size: 0.7rem;
    }
    
    .trending-card-read-more {
        font-size: 0.75rem;
    }
    
    .news-card .card-image {
        height: 180px;
    }
    
    .news-card .card-content {
        padding: 1rem;
    }
    
    .trending-articles {
        padding: 1.5rem;
    }
}

/* 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);
}

/* Update card-meta to accommodate comments */
.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.card-meta .date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-meta .date i {
    color: var(--primary);
}

/* Update post-meta for featured and trending articles */
.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.post-meta .date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-meta .author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-meta .date i,
.post-meta .author i {
    color: var(--primary);
}

/* Clickable card links */
.card-link,
.trending-link,
.review-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.card-link:hover,
.trending-link:hover,
.review-link:hover {
    text-decoration: none;
    color: inherit;
}

.card-link:hover .news-card,
.trending-link:hover .trending-card,
.review-link:hover .review-card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* Hover effects */
.news-card.hover,
.featured-post.hover,
.review-card.hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-card.hover .card-image img,
.featured-post.hover .post-image img,
.review-card.hover .card-image img {
    transform: scale(1.05);
} 