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

body {
    background: #1a1a1a;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.header {
    background: #222;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #333;
}

.header input[type="text"] {
    flex: 1;
    padding: 8px;
    background: #333;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
}

.header button {
    padding: 8px 16px;
    background: #7b4397;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 30px;
}

.character-card {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
}

.character-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.skin-render {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.character-info {
    padding: 20px;
    background: #252525;
}

.character-name {
    font-size: 14px;
    margin-bottom: 10px;
    color: #aaa;
}

.character-nickname,
.character-punishments,
.character-other-stats1,
.character-other-stats2 {
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
}

.character-nickname {
    color: #888;
    font-style: italic;
}

.character-punishments {
    color: #888;
}

.sidebar-header {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 8px;
    text-align: left;
    border-bottom: 1px solid #444;
    padding-bottom: 3px;
}

/* Stat values link to leaderboards, but look like plain text */
.stat-value a.stat-link,
a.stat-link {
    color: inherit;
    text-decoration: none;
}

.lb-banner {
    text-align: center;
    font-size: 15px;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 6px;
    padding: 8px 14px;
    margin-bottom: 14px;
}

.leaderboard {
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.lb-title {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 16px;
    text-align: center;
}

.lb-row {
    display: flex;
    align-items: center;
    padding: 7px 12px;
    border-bottom: 1px solid #2c2c2c;
    font-size: 15px;
}

.lb-rank {
    width: 64px;
    color: #888;
    flex-shrink: 0;
}

.lb-name {
    flex: 1;
    color: #cecece;
    text-decoration: none;
}

.lb-name:hover {
    text-decoration: underline;
}

.lb-top .lb-rank,
.lb-top .lb-name,
.lb-top .lb-value {
    font-weight: bold;
}

.lb-top-1 .lb-rank,
.lb-top-1 .lb-name,
.lb-top-1 .lb-value {
    color: #4dd0e1;
}

.lb-top-2 .lb-rank,
.lb-top-2 .lb-name,
.lb-top-2 .lb-value {
    color: #ffd700;
}

.lb-top-3 .lb-rank,
.lb-top-3 .lb-name,
.lb-top-3 .lb-value {
    color: #d9a77a;
}

.lb-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
}

.lb-btn {
    color: #ffd700;
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid #555;
    border-radius: 4px;
}

.lb-btn:hover {
    background: #2a2a2a;
}

.lb-page {
    color: #888;
}

.lb-empty {
    color: #888;
    text-align: center;
    padding: 20px 0;
}

.character-other-stats1 {
    color: #888;
}

.character-other-stats2 {
    color: #cecece;
}

.stats-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.character-title {
    background: linear-gradient(90deg, #7b4397 0%, #dc2430 100%);
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
}

.stats-group {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
}

.stats-header {
    font-size: 16px;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.stat-icon {
    font-size: 16px;
}

.stat-label {
    flex: 1;
    font-size: 14px;
}

.stat-value {
    font-size: 14px;
    color: #aaa;
}

.stat-bar {
    width: 120px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7b4397 0%, #dc2430 100%);
    border-radius: 4px;
}

.stat-bar-fill.maxed {
    background: linear-gradient(90deg, #8a6d00 0%, #ffd700 35%, #fff3b0 50%, #ffd700 65%, #b8860b 100%);
}

.badge-section-title {
    font-size: 28px;
    font-weight: bold;
    text-align: left;
    margin-top: 20px;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 100px);
    gap: 16px;
    margin-top: 20px;
    justify-content: left;
}

.badge {
    border-radius: 8px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: transform 0.15s ease;
}

.badge:hover {
    transform: translateY(-2px);
}

.badge-icon {
    width: 100%;
    height: 100%;
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
}

.badge-tooltip {
    background: #1a1a1a;
    padding: 10px 14px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .6);
    border: 1px solid #444;
    pointer-events: none;
    transition: opacity .2s ease;
    text-align: center;
    z-index: 10000;
    position: fixed;
    display: none;
    max-width: 250px;
}

.badge-tooltip-name {
    font-weight: bold;
    color: #FFD700;
    font-size: 13px;
    margin-bottom: 4px;
}

.badge-tooltip-desc {
    color: #e0e0e0;
    font-size: 12px;
}

.error-panel {
    display: none;
    text-align: center;
    padding: 40px;
    color: #ff6b6b;
    font-size: 18px;
}

.gallery-wrap {
    padding: 30px;
}

.gallery-title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    color: orange;
    margin-bottom: 20px;
}

.footer-note {
    text-align: center;
    padding: 15px;
    color: #888;
    font-size: 13px;
}
