/* Raptor Isle Dashboard — Dark WoW Theme */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #14141f;
    --bg-card-hover: #1a1a2a;
    --bg-nav: #0d0d15;
    --border: #2a2a3a;
    --text: #c8c8d8;
    --text-dim: #888898;
    --text-bright: #e8e8f0;
    --accent: #b08d57;         /* WoW gold */
    --accent-glow: #d4a94e;
    --alliance: #3388ff;
    --horde: #cc2222;
    --bar-fill: #4a3a1a;
    --bar-track: #1a1a25;
    --online-green: #44cc44;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

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

a:hover {
    color: var(--accent-glow);
    text-decoration: underline;
}

/* Navigation */
.topnav {
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    margin-right: 2rem;
}

.nav-brand:hover {
    color: var(--accent-glow);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    color: var(--text-dim);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--accent);
    background: rgba(176, 141, 87, 0.1);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.card h2, .card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Status Section */
.realm-status h1 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 1px;
}

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

.status-card {
    text-align: center;
    padding: 1.5rem;
}

.card-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-bright);
}

.card-value-sm {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-bright);
}

.card-sub {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: var(--bg-nav);
    color: var(--accent);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(42, 42, 58, 0.5);
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.data-table .rank {
    color: var(--text-dim);
    font-weight: 600;
    width: 2rem;
}

/* Faction colors */
.faction-alliance {
    color: var(--alliance);
    font-weight: 600;
}

.faction-horde {
    color: var(--horde);
    font-weight: 600;
}

/* Gold color */
.gold {
    color: var(--accent);
}

/* Online badge */
.online-badge {
    display: inline-block;
    background: var(--online-green);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--text-dim);
    padding: 3rem 1rem;
    font-size: 1.1rem;
}

/* Who's Online */
.whos-online {
    margin-bottom: 2rem;
}

.whos-online h2 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Bot Population */
.bot-population h2 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
}

/* Bar charts */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bar-label {
    flex: 0 0 140px;
    font-size: 0.8rem;
    color: var(--text);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-track {
    flex: 1;
    height: 20px;
    background: var(--bar-track);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a3a1a, #b08d57);
    border-radius: 3px;
    min-width: 2px;
    transition: width 0.3s ease;
}

.bar-fill.level-bar {
    background: linear-gradient(90deg, #1a3a4a, #3388bb);
}

.bar-value {
    flex: 0 0 40px;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: right;
}

/* Leaderboard grid */
.leaderboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.leaderboard-grid h2 {
    font-size: 1.2rem;
}

/* Player Profile */
.player-profile {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-subtitle {
    font-size: 1.1rem;
    color: var(--text-dim);
}

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

.profile-cards .card {
    text-align: center;
    padding: 1rem;
}

/* Achievements */
.achievements-section {
    margin-top: 1rem;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.achievement-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
}

.achievement-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

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

/* Guild name */
.guild-name {
    color: var(--accent);
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .topnav {
        padding: 0 1rem;
    }

    .nav-brand {
        font-size: 1.1rem;
        margin-right: 1rem;
    }

    .nav-links a {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .container {
        padding: 1rem;
    }

    .realm-status h1 {
        font-size: 1.5rem;
    }

    .card-value {
        font-size: 2rem;
    }

    .bar-label {
        flex: 0 0 100px;
        font-size: 0.75rem;
    }

    .bot-grid {
        grid-template-columns: 1fr;
    }
}
