:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --background: #ffffff;
    --surface: #f9fafb;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #60a5fa;
        --primary-hover: #3b82f6;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --background: #111827;
        --surface: #1f2937;
        --border: #374151;
        --border-light: #4b5563;
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    }

    body {
        background-color: var(--background);
        color: var(--text-primary);
    }

    .markdown-body h2, .markdown-body h1 {
        border-bottom: 1px solid var(--border);
        color: var(--text-primary);
    }

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

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

    .markdown-body table tr {
        background-color: var(--surface);
    }

    .markdown-body table tr:nth-child(2n) {
        background-color: var(--background);
    }
}

/* Global improvements */
body {
    background-color: var(--background);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.markdown-body {
    font-size: 16px;
    line-height: 1.7;
}

/* Header improvements */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    margin: 0;
}

.site-title:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Post card improvements */
.post {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.post:hover::before {
    transform: scaleX(1);
}

.post:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.post h2 {
    margin: 0 0 0.75rem 0;
    border: none !important;
    font-size: 1.4rem;
    line-height: 1.4;
}

.post h2 a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.post h2 a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.news_date {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-right: 0.5rem;
}

.post-type {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-right: 0.75rem;
    color: white;
    border: none;
    background: var(--text-secondary); /* Default fallback */
}

/* Gaming news - Blue theme */
.post-type-news-jeu {
    background: #2563eb;
}

/* Culture news - Purple theme */
.post-type-news-culture {
    background: #7c3aed;
}

/* Tips/Tricks news - Green theme */
.post-type-news-astuce {
    background: #059669;
}

/* Tech news - Orange theme */
.post-type-news-tech {
    background: #ea580c;
}

/* Sport news - Red theme */
.post-type-news-sport {
    background: #dc2626;
}

/* Business news - Teal theme */
.post-type-news-business {
    background: #0891b2;
}

/* Test news - Pink theme */
.post-type-test {
    background: #db2777;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .post-type-news-jeu {
        background: #3b82f6;
    }

    .post-type-news-culture {
        background: #8b5cf6;
    }

    .post-type-news-astuce {
        background: #10b981;
    }

    .post-type-news-tech {
        background: #f97316;
    }

    .post-type-news-sport {
        background: #ef4444;
    }

    .post-type-news-business {
        background: #06b6d4;
    }

    .post-type-test {
        background: #ec4899;
    }
}

.entry {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 0.75rem;
}

/* Label tag improvements */
.label-tag {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin: 0.125rem;
}

/* Pagination improvements */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 0 1rem;
    list-style: none;
    flex-wrap: wrap;
    max-width: 100%;
}

/* Responsive pagination for tablets */
@media (max-width: 768px) {
    .pagination {
        gap: 0.375rem;
        padding: 0 0.5rem;
    }

    .page-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
        min-width: 2.2rem;
    }
}

.page-item {
    display: inline-block;
    margin: 0;
}

.page-link {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-secondary);
}

/* Link improvements */
a {
    color: var(--primary-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

/* Container improvements */
.container-lg {
    max-width: 800px;
}

/* Footer improvements */
footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    color: var(--text-muted);
    margin: 0;
}

/* Single post improvements */
.single-post {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.post-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    line-height: 1.2;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.post-meta .author {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.post-content {
    line-height: 1.7;
    margin-bottom: 2rem;
}

.post-content h2, .post-content h3, .post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.original-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.original-link:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateX(2px);
}

/* Original title styling */
.original-title {
    margin: 0.5rem 0 1rem 0;
    padding: 0.5rem 0.75rem;
    background-color: var(--surface);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-sm);
}

.original-title small {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Loading and interaction improvements */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    transition: all 0.2s ease;
    scroll-behavior: smooth;
}

/* Add subtle hover effects for better UX */
.post {
    position: relative;
    overflow: hidden;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.post:hover::before {
    transform: scaleX(1);
}

/* Smooth focus states for accessibility */
a:focus,
.page-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Better text selection */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* Add subtle entrance animation */
.post {
    animation: fadeInUp 0.6s ease forwards;
}

.post:nth-child(2) { animation-delay: 0.1s; }
.post:nth-child(3) { animation-delay: 0.2s; }
.post:nth-child(4) { animation-delay: 0.3s; }
.post:nth-child(5) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved code blocks */
.markdown-body pre,
.markdown-body code {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.markdown-body pre {
    padding: 1rem;
    overflow-x: auto;
}

.markdown-body code {
    padding: 0.125rem 0.25rem;
    font-size: 0.875em;
}

/* Better blockquotes */
.markdown-body blockquote {
    border-left: 4px solid var(--primary-color);
    background: var(--surface);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Enhanced tables */
.markdown-body table {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.markdown-body table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Image improvements */
.markdown-body img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.markdown-body img:hover {
    transform: scale(1.02);
}

/* Review conclusion blocks styling */
.reviewConclusionBlock {
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.reviewConclusionBlock--light {
    background: var(--surface);
    border: 1px solid var(--border);
}

.reviewConclusionBlock--dark {
    background: var(--text-primary);
    color: var(--background);
}

/* Review title styling */
.reviewTitle {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 1rem;
    margin: 0;
    text-align: center;
}

/* Strengths and Weaknesses section */
.reviewSW {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.reviewSW__section {
    min-width: 0;
}

.reviewSW__sectionTitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: inherit;
}

.reviewSW__points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reviewSW__point {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    line-height: 1.4;
}

.reviewSW__point:last-child {
    border-bottom: none;
}

.reviewSW__points--strengths .reviewSW__point::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    margin-right: 0.5rem;
}

.reviewSW__points--weaknesses .reviewSW__point::before {
    content: "✗";
    color: #ef4444;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Editorial rating section */
.reviewEditorialRating {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
}

.reviewEditorialRating__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.reviewEditorialRating__gauge {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.reviewEditorialRating__gauge svg {
    width: 100%;
    height: 100%;
}

/* Users opinion section */
.reviewUsersOpinion {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
}

.reviewUsersOpinion__gauge {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.reviewUsersOpinion__gauge svg {
    width: 100%;
    height: 100%;
}

.reviewUsersOpinion__textBlock {
    flex: 1;
}

.reviewUsersOpinion__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: inherit;
}

/* Review text conclusion */
.reviewText {
    padding: 1.5rem;
}

.reviewText p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Responsive adjustments for review blocks */
@media (max-width: 768px) {
    .reviewSW {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .reviewEditorialRating,
    .reviewUsersOpinion {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }

    .reviewEditorialRating__gauge,
    .reviewUsersOpinion__gauge {
        width: 60px;
        height: 60px;
    }

    .reviewText {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .reviewSW {
        padding: 0.75rem;
    }

    .reviewEditorialRating,
    .reviewUsersOpinion {
        padding: 0.75rem;
    }

    .reviewText {
        padding: 0.75rem;
    }

    .reviewSW__point {
        font-size: 0.85rem;
    }
}
