/*
Theme Name: CharTier
Theme URI: #
Author: AI Assistant
Description: A modern dark-mode template for game character evaluations and tier lists.
Version: 1.0.0
Text Domain: chartier
*/

:root {
    --bg-dark: #09090b;
    --bg-card: #18181b;
    --bg-card-hover: #27272a;
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #a1a1aa;
    --tier-s: #fbbf24;
    --tier-a: #f87171;
    --tier-b: #60a5fa;
    --tier-c: #34d399;
    --border: #27272a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Hero Section */
.hero {
    margin-top: 70px;
    padding: 5rem 2rem;
    background: radial-gradient(circle at center top, #1e1b4b 0%, var(--bg-dark) 70%);
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #a78bfa, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

/* Review Post Card */
.review-post {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.review-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(139, 92, 246, 0.08), transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.review-header,
.review-image-wrapper,
.review-body {
    position: relative;
    z-index: 2;
}

.review-post:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.5);
}

.game-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Allows dynamic color override from inline styles */
.game-tag[style] {
    /* Styles will be overridden inline, this ensures specificity issues won't happen easily */
}

.review-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.review-header h2 a {
    color: inherit;
}

.review-header h2 a:hover {
    color: var(--primary);
}


.meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Image Wrapper */
.review-image-wrapper {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem 0;
    background: linear-gradient(135deg, #18181b, #27272a);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
    position: relative;
}

.review-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    font-size: 5rem;
    color: var(--border);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.5;
}

/* Tier Badge */
.tier-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-weight: 900;
    font-size: 1.4rem;
    padding: 0.5rem 1.2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.tier-s {
    background: rgba(251, 191, 36, 0.15);
    color: var(--tier-s);
    border: 2px solid var(--tier-s);
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.tier-a {
    background: rgba(248, 113, 113, 0.15);
    color: var(--tier-a);
    border: 2px solid var(--tier-a);
}

.tier-b {
    background: rgba(96, 165, 250, 0.15);
    color: var(--tier-b);
    border: 2px solid var(--tier-b);
}

.tier-c {
    background: rgba(52, 211, 153, 0.15);
    color: var(--tier-c);
    border: 2px solid var(--tier-c);
}

/* Review Content */
.review-body h3 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #fff;
}

.review-body h3::before {
    content: '';
    display: block;
    width: 6px;
    height: 1.2em;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 3px;
}

.review-body p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: 1rem;
}

.read-more:hover {
    color: #a78bfa;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Stats Bars */
.stats-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-label {
    width: 110px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.stat-bar-bg {
    flex: 1;
    height: 12px;
    background: var(--bg-dark);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-bar-fill {
    height: 100%;
    width: 0;
    /* Animated via JS */
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 6px;
    transition: width 1.2s cubic-bezier(0.1, 0.8, 0.2, 1);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
}

.stat-value {
    width: 45px;
    text-align: right;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    color: #fff;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.widget {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.8rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
    font-weight: 900;
}

.tier-list {
    list-style: none;
}

.tier-list li {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.8rem 0;
    border-bottom: 1px dashed var(--border);
    font-weight: 500;
}

.tier-list li:last-child {
    border-bottom: none;
}

.badge {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.1rem;
}

.past-article-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.past-article-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.past-article-item:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.past-article-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(135deg, #18181b, #27272a);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--border);
    font-size: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.past-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.past-article-info {
    display: flex;
    flex-direction: column;
}

.past-article-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.2rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.past-article-item:hover .past-article-info h4 {
    color: var(--primary);
}

.past-article-info .date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.8rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-list a:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--primary);
    transform: translateX(5px);
}

.category-list span {
    color: var(--text-muted);
    font-size: 0.85rem;
    background: var(--bg-dark);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-weight: 700;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    border-color: rgba(139, 92, 246, 0.3);
}

.pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        /* In a real WP theme you'd add a hamburger menu */
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}