@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-surface: #12121a;
    --bg-border: #2a2a3a;
    --color-gold: #c9a84c;
    --color-purple: #8b5cf6;
    --color-text: #e8e6e0;
    --color-green: #4ade80;
    --color-red: #f87171;
    --color-gray: #6b7280;
    --color-yellow: #fbbf24;
    --color-cyan: #22d3ee;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', serif;
    background: var(--bg-primary);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Particules de fond */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--color-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Header */
header {
    position: relative;
    z-index: 10;
    background: var(--bg-surface);
    border-bottom: 2px solid var(--bg-border);
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold);
    text-shadow: 0 0 20px rgba(201, 168, 76, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    font-family: 'Cinzel', serif;
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
    position: relative;
}

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

nav a:hover {
    color: var(--color-gold);
}

nav a:hover::after {
    width: 100%;
}

.sync-info {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--color-gray);
}

/* Main container */
main {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    animation: fadeInUp 0.6s ease-out;
}

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

h1, h2, h3 {
    font-family: 'Cinzel', serif;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    text-shadow: 0 0 30px rgba(201, 168, 76, 0.6);
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--bg-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.2);
    border-color: var(--color-gold);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--bg-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.3);
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-gold);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.mortel { background: var(--color-gray); color: #fff; }
.badge.adepte { background: var(--color-yellow); color: #000; }
.badge.pretre { background: var(--color-cyan); color: #000; }
.badge.archpretre { background: var(--color-purple); color: #fff; }
.badge.premier { 
    background: #f59e0b; 
    color: #000;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

/* Score bars */
.score-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-border);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 0.5rem;
    position: relative;
}

.score-fill {
    height: 100%;
    transition: width 0.5s ease-out;
    background: linear-gradient(to right, var(--color-red), var(--color-gray), var(--color-green));
}

.score-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

thead {
    background: var(--bg-primary);
    border-bottom: 2px solid var(--color-gold);
}

th {
    font-family: 'Cinzel', serif;
    padding: 1rem;
    text-align: left;
    color: var(--color-gold);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-border);
}

tr:hover {
    background: rgba(201, 168, 76, 0.05);
}

.player-name {
    font-weight: 600;
    color: var(--color-gold);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Notes et plans */
.note-item, .plan-item, .heretique-item {
    background: var(--bg-primary);
    border-left: 3px solid var(--color-purple);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.note-source {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.note-text, .plan-desc {
    font-style: italic;
    line-height: 1.8;
}

.plan-name, .heretique-name {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.heretique-item {
    border-left-color: var(--color-red);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
}

/* Loading animation */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--color-gold);
    font-family: 'Cinzel', serif;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
