/* ============================================
   Realms of Eldoria — Main Website Stylesheet
   Dark Fantasy Theme
   ============================================ */

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

:root {
    --bg-darkest: #0a0b0f;
    --bg-dark: #12141c;
    --bg-medium: #1a1d2a;
    --bg-light: #232738;
    --bg-lighter: #2d3148;
    
    --gold: #c9a84c;
    --gold-light: #e4c96a;
    --gold-dark: #8b7434;
    --gold-glow: rgba(201, 168, 76, 0.3);
    
    --red: #c0392b;
    --red-light: #e74c3c;
    --green: #27ae60;
    --green-light: #2ecc71;
    --blue: #2980b9;
    --blue-light: #3498db;
    
    --text-primary: #e8e4d9;
    --text-secondary: #9a9587;
    --text-dim: #5a5549;
    --text-bright: #fff;
    
    --border: rgba(201, 168, 76, 0.15);
    --border-hover: rgba(201, 168, 76, 0.35);
    --border-strong: rgba(201, 168, 76, 0.5);
    
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    
    --radius: 4px;
    --radius-lg: 8px;
    
    --header-height: 72px;
    --max-width: 1200px;
}

/* ============ RESET ============ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-darkest);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s;
}

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

img {
    max-width: 100%;
    display: block;
}

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.25;
}

.heading-gold {
    color: var(--gold);
    text-shadow: 0 0 30px var(--gold-glow);
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

/* ============ LAYOUT ============ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.page-content {
    padding-top: var(--header-height);
    min-height: calc(100vh - 200px);
}

/* ============ HEADER ============ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(180deg, rgba(10, 11, 15, 0.98), rgba(10, 11, 15, 0.92));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background 0.3s;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 20px var(--gold-glow);
}

.logo-text {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.04em;
    text-shadow: 0 0 20px var(--gold-glow);
}

.logo-subtitle {
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: block;
    margin-top: -2px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all 0.2s;
    text-decoration: none;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
}

.nav-link.active {
    color: var(--gold-light);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 8px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-username {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px solid var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--gold);
}

/* Mobile menu */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-darkest);
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--bg-darkest);
    transform: translateY(-1px);
    box-shadow: 0 6px 25px var(--gold-glow);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-lighter);
    border-color: var(--border-hover);
    color: var(--text-bright);
}

.btn-danger {
    background: var(--red);
    color: white;
}

.btn-danger:hover {
    background: var(--red-light);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold-dark);
}

.btn-ghost:hover {
    background: rgba(201, 168, 76, 0.1);
    border-color: var(--gold);
    color: var(--gold-light);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.btn-play {
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 16px 48px;
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: white;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.btn-play:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(39, 174, 96, 0.4);
}

/* ============ HERO SECTION ============ */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: var(--header-height) 24px 60px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(180deg, 
            rgba(10, 11, 15, 0.3) 0%, 
            rgba(10, 11, 15, 0.1) 30%,
            rgba(10, 11, 15, 0.6) 70%, 
            rgba(10, 11, 15, 1) 100%
        ),
        url('') center/cover no-repeat;
    background-color: var(--bg-dark);
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 40%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(139, 69, 19, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--border);
    padding: 6px 20px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero h1 span {
    display: block;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-family: 'Crimson Text', serif;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

/* ============ SECTIONS ============ */
.section {
    padding: 80px 0;
}

.section-dark {
    background: var(--bg-dark);
}

.section-medium {
    background: var(--bg-medium);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.section-header p {
    font-family: 'Crimson Text', serif;
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============ FEATURES GRID ============ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============ RACES SECTION ============ */
.races-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.race-card {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.race-card:hover {
    border-color: var(--gold-dark);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.race-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.race-card h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.race-card p {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ============ GAME WORLDS ============ */
.worlds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.world-card {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}

.world-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow);
}

.world-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--bg-light), var(--bg-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.world-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(201, 168, 76, 0.1) 0%, transparent 70%);
}

.world-name {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
    position: relative;
    z-index: 1;
}

.world-body {
    padding: 20px;
}

.world-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.world-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.world-meta strong {
    color: var(--text-primary);
}

.world-status {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 12px;
}

.status-active {
    background: rgba(39, 174, 96, 0.15);
    color: var(--green-light);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-starting {
    background: rgba(41, 128, 185, 0.15);
    color: var(--blue-light);
    border: 1px solid rgba(41, 128, 185, 0.3);
}

.status-ended {
    background: rgba(192, 57, 43, 0.15);
    color: var(--red-light);
    border: 1px solid rgba(192, 57, 43, 0.3);
}

/* ============ NEWS ============ */
.news-grid {
    display: grid;
    gap: 20px;
}

.news-card {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    transition: all 0.3s;
}

.news-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow);
}

.news-card-image {
    width: 220px;
    min-height: 160px;
    background: var(--bg-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-image .placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.news-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.news-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: 3px;
}

.cat-update { background: rgba(41, 128, 185, 0.15); color: var(--blue-light); }
.cat-patch { background: rgba(142, 68, 173, 0.15); color: #bb8fce; }
.cat-event { background: rgba(230, 126, 34, 0.15); color: #f0a050; }
.cat-community { background: rgba(39, 174, 96, 0.15); color: var(--green-light); }
.cat-announcement { background: rgba(201, 168, 76, 0.15); color: var(--gold); }

.news-date {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.news-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.news-card h3 a {
    color: var(--text-bright);
    text-decoration: none;
}

.news-card h3 a:hover {
    color: var(--gold);
}

.news-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.news-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gold);
    margin-top: 12px;
}

.news-card .read-more:hover {
    color: var(--gold-light);
}

/* Full news article */
.article-header {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.article-header h1 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    max-width: 800px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.article-content {
    max-width: 800px;
    font-family: 'Crimson Text', serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content h2, .article-content h3 {
    margin: 32px 0 16px;
}

.article-content h2 { font-size: 1.6rem; }
.article-content h3 { font-size: 1.3rem; }

.article-content p {
    margin-bottom: 16px;
}

.article-content img {
    border-radius: var(--radius-lg);
    margin: 24px 0;
}

.article-content ul, .article-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.article-nav {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

/* ============ ACCOUNT / LOBBY ============ */
.lobby-header {
    padding: 40px 0 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.lobby-header h1 {
    font-size: 1.8rem;
}

.your-worlds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.your-world-card {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}

.your-world-card:hover {
    border-color: var(--gold-dark);
    box-shadow: var(--shadow);
}

.your-world-banner {
    height: 100px;
    background: linear-gradient(135deg, #1a3a2a, #0d1f15);
    display: flex;
    align-items: flex-end;
    padding: 16px 20px;
    position: relative;
}

.your-world-banner .player-name {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.your-world-banner .world-label {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-bright);
    position: relative;
    z-index: 1;
}

.your-world-actions {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.join-world-card {
    background: var(--bg-medium);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    cursor: pointer;
    transition: all 0.3s;
}

.join-world-card:hover {
    border-color: var(--gold-dark);
    background: rgba(201, 168, 76, 0.05);
}

.join-world-inner {
    text-align: center;
    color: var(--text-secondary);
}

.join-world-inner .plus {
    font-size: 2.5rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 8px;
}

/* ============ ACCOUNT SETTINGS ============ */
.settings-panel {
    max-width: 700px;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-header h2 {
    font-size: 1.3rem;
}

.settings-row {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.settings-action {
    flex-shrink: 0;
}

/* ============ FORMS ============ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    font-size: 0.8rem;
    color: var(--red-light);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Auth forms */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.auth-card h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============ ALERTS ============ */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.88rem;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    color: var(--green-light);
}

.alert-error {
    background: rgba(192, 57, 43, 0.1);
    border: 1px solid rgba(192, 57, 43, 0.3);
    color: var(--red-light);
}

.alert-info {
    background: rgba(41, 128, 185, 0.1);
    border: 1px solid rgba(41, 128, 185, 0.3);
    color: var(--blue-light);
}

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--bg-medium);
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--gold-dark);
    color: var(--gold);
}

.pagination .active {
    background: var(--gold);
    color: var(--bg-darkest);
    border-color: var(--gold);
    font-weight: 700;
}

/* ============ FOOTER ============ */
.site-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.footer-bottom-links a:hover {
    color: var(--gold);
}

/* ============ ADMIN ============ */
.admin-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}

.admin-sidebar {
    width: 240px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    flex-shrink: 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.admin-sidebar-title {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    padding: 0 20px;
    margin-bottom: 16px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    text-decoration: none;
}

.admin-nav-link:hover, .admin-nav-link.active {
    background: rgba(201, 168, 76, 0.08);
    color: var(--gold);
}

.admin-nav-link.active {
    border-right: 3px solid var(--gold);
}

.admin-main {
    flex: 1;
    padding: 32px;
    overflow-x: auto;
}

.admin-main h1 {
    font-size: 1.6rem;
    margin-bottom: 24px;
}

/* Admin tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.admin-table th {
    background: var(--bg-light);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(201, 168, 76, 0.03);
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.admin-search {
    display: flex;
    gap: 8px;
}

.admin-search input {
    width: 280px;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.stat-card-value {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

/* ============ EDITOR ============ */
.editor-toolbar {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.editor-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.editor-btn:hover {
    background: var(--bg-lighter);
    color: var(--gold);
}

.editor-content {
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    min-height: 300px;
    padding: 16px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Crimson Text', serif;
    font-size: 1.05rem;
    line-height: 1.7;
    outline: none;
}

.editor-content:focus {
    border-color: var(--gold-dark);
}

/* ============ BADGE / TAG ============ */
.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-admin {
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold);
}

.badge-active {
    background: rgba(39, 174, 96, 0.15);
    color: var(--green-light);
}

.badge-banned {
    background: rgba(192, 57, 43, 0.15);
    color: var(--red-light);
}

.badge-draft {
    background: rgba(108, 108, 108, 0.15);
    color: #999;
}

.badge-published {
    background: rgba(39, 174, 96, 0.15);
    color: var(--green-light);
}

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-bright);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ============ MISC ============ */
.text-gold { color: var(--gold); }
.text-dim { color: var(--text-dim); }
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb .sep {
    color: var(--text-dim);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .races-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-sidebar { width: 200px; }
}

@media (max-width: 768px) {
    :root { --header-height: 60px; }
    
    .hero h1 { font-size: 2.2rem; }
    .hero-desc { font-size: 1.05rem; }
    .hero-stats { gap: 24px; flex-wrap: wrap; }
    .hero-stat-value { font-size: 1.5rem; }
    
    .features-grid { grid-template-columns: 1fr; }
    .races-grid { grid-template-columns: repeat(2, 1fr); }
    .worlds-grid { grid-template-columns: 1fr; }
    
    .section { padding: 50px 0; }
    .section-header h2 { font-size: 1.6rem; }
    
    .news-card { flex-direction: column; }
    .news-card-image { width: 100%; min-height: 180px; }
    
    .main-nav { display: none; }
    .main-nav.open { 
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--border);
        padding: 16px;
    }
    .mobile-toggle { display: block; }
    .nav-divider { display: none; }
    
    .footer-inner { flex-direction: column; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    
    .admin-sidebar { 
        position: fixed;
        left: -240px;
        top: var(--header-height);
        z-index: 999;
        width: 240px;
        transition: left 0.3s;
    }
    .admin-sidebar.open { left: 0; }
    .admin-main { padding: 20px; }
    
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    
    .settings-row { flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .races-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 24px; }
    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 8px 10px; }
}
