/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #07080c;
    --bg-panel: rgba(18, 20, 29, 0.75);
    --bg-panel-hover: rgba(24, 27, 39, 0.85);
    --border-color: rgba(255, 255, 255, 0.05);
    --border-focus: rgba(0, 242, 254, 0.25);
    
    /* Font Colors */
    --text-primary: #f9fafb;
    --text-secondary: #e5e7eb;
    --text-muted: #9ca3af;
    --text-dark: #4b5563;
    
    /* Accents */
    --accent-cyan: #00f2fe;
    --accent-blue: #00c6ff;
    --accent-purple: #9d4edd;
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;
    --accent-gold: #fbbf24;
    --accent-rose: #f43f5e;
    
    /* Font */
    --font-main: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 40%),
        radial-gradient(at 100% 100%, rgba(0, 242, 254, 0.05) 0px, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 100vh;
}

/* Header */
.main-header {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 20px 30px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan));
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.server-icon {
    font-size: 28px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.3));
}

.brand h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.server-ver {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background-color: var(--text-dark);
    border-radius: 50%;
    display: inline-block;
}

.pulse-indicator.online {
    background-color: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulse 1.8s infinite;
}

.pulse-indicator.offline {
    background-color: var(--accent-rose);
    box-shadow: 0 0 10px var(--accent-rose);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

.header-stats .header-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-stats .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-stats .value {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-cyan);
}

/* Dashboard Grid */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Row 1: Metrics */
.performance-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.metric-card {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-focus);
    box-shadow: 0 8px 32px rgba(0, 242, 254, 0.04);
}

.metric-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metric-card .card-header .title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card .card-header i {
    font-size: 18px;
}

.icon-tps { color: var(--accent-cyan); }
.icon-memory { color: var(--accent-purple); }
.icon-players { color: var(--accent-emerald); }

.metric-card .value-main {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}

.metric-card .subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#tps-progress { background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); }
#memory-progress { background: linear-gradient(90deg, var(--accent-indigo), var(--accent-purple)); }
#players-progress { background: linear-gradient(90deg, var(--accent-indigo), var(--accent-emerald)); }

/* Row 2: Global Stats */
.global-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.global-stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.global-stat-box:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.global-stat-box i {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-stat-box .info {
    display: flex;
    flex-direction: column;
}

.global-stat-box .title {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.global-stat-box .number {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.text-broken { color: var(--accent-rose); }
.text-placed { color: var(--accent-blue); }
.text-planted { color: var(--accent-indigo); }
.text-harvested { color: var(--accent-emerald); }

/* Row 3: Charts Row */
.charts-row {
    width: 100%;
}

.chart-panel-body {
    position: relative;
    min-height: 300px;
    background: rgba(0, 0, 0, 0.15);
    padding: 24px;
}

.chart-container {
    width: 100%;
    height: 280px;
    position: relative;
    transition: opacity 0.3s ease;
}

.chart-container.hidden {
    display: none !important;
}

.chart-tabs {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.chart-tab-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.chart-tab-btn.active {
    color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.08);
}

/* Layout Columns */
.layout-main {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    .layout-main {
        grid-template-columns: 1fr;
    }
}

/* Panels */
.dashboard-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    overflow: hidden;
}

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

.panel-header h2 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.2px;
}

.sub-header-tip {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.icon-panel {
    color: var(--accent-cyan);
}

.panel-body {
    padding: 20px;
}

/* Loading Placeholder */
.loading-placeholder {
    color: var(--text-muted);
    text-align: center;
    padding: 30px 0;
    font-size: 14px;
    font-style: italic;
}

/* Worlds and Weather */
#worlds-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.world-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.world-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.world-icon {
    font-size: 18px;
    color: var(--accent-cyan);
}

.world-name {
    font-weight: 600;
    font-size: 14px;
}

.world-players-tag {
    font-size: 11px;
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.world-info-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.world-time {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.world-weather {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
}

.weather-clear {
    background: rgba(251, 191, 36, 0.08);
    color: var(--accent-gold);
}

.weather-rain {
    background: rgba(0, 198, 255, 0.08);
    color: var(--accent-blue);
}

.weather-thunder {
    background: rgba(157, 78, 221, 0.08);
    color: var(--accent-purple);
}

/* Online Players Grid */
#players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 15px;
}

.player-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.player-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-focus);
    transform: scale(1.005);
}

.player-header-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-head {
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
}

.player-name-wrapper {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-weight: 700;
    font-size: 15px;
}

.player-name.afk-text::after {
    content: ' [AFK]';
    color: var(--accent-gold);
    font-size: 11px;
    font-weight: 600;
}

.player-gamemode {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.player-status-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ping-badge {
    font-size: 11px;
    color: var(--accent-emerald);
    font-weight: 600;
}

.ping-badge.high {
    color: var(--accent-rose);
}

.world-badge {
    font-size: 10px;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.player-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.player-bar-row i {
    width: 14px;
    text-align: center;
}

.bar-health-icon { color: var(--accent-rose); }
.bar-food-icon { color: var(--accent-gold); }

.bar-outer {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    overflow: hidden;
}

.bar-inner {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.health-fill { background: var(--accent-rose); }
.food-fill { background: var(--accent-gold); }

.player-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.15);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.player-coords {
    color: var(--text-secondary);
    font-family: monospace;
}

.player-playtime {
    color: var(--accent-cyan);
    font-weight: 600;
}

.player-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    text-align: center;
}

.mini-stat-item {
    background: rgba(255, 255, 255, 0.005);
    border: 1px solid var(--border-color);
    padding: 6px 4px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-stat-item .val {
    font-size: 12px;
    font-weight: 700;
}

.mini-stat-item .lbl {
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Leaderboards Tab Navigation */
.header-tabs {
    flex-direction: row;
}

.leaderboard-tabs {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.02);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.08);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Rank Lists */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.005);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.015);
}

.rank-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rank-position {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.rank-item:nth-child(1) .rank-position {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-gold);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.rank-item:nth-child(2) .rank-position {
    background: rgba(156, 163, 175, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(156, 163, 175, 0.25);
}

.rank-item:nth-child(3) .rank-position {
    background: rgba(217, 119, 6, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.rank-head {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.rank-name {
    font-weight: 600;
    font-size: 14px;
}

.rank-right {
    display: flex;
    align-items: center;
}

.rank-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* Radar (Mapa de Jogadores 2D) */
.header-radar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.radar-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.radar-select {
    background: #0d0f14;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

.radar-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.radar-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.radar-panel-body {
    padding: 16px;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
}

.radar-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #040507;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

#radar-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: grab;
}

#radar-canvas:active {
    cursor: grabbing;
}

.radar-coords-display {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-family: monospace;
    color: var(--text-secondary);
    pointer-events: none;
}

/* Modais (Player Overview Completo) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 15px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: #0c0e14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 1100px;
    max-height: calc(90vh + 35px);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* Layout de dois painéis lado a lado */
.modal-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    justify-content: center;
}

.radar-sibling {
    flex-shrink: 0;
}

/* Oculta o radar da página principal */
[class*="dashboard-panel"]:has(canvas#radar-canvas) {
    display: none !important;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.01);
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-player-identity {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-player-head {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.modal-player-identity h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-player-uuid {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

.modal-close-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Modal Quick Stats */
.modal-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 640px) {
    .modal-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quick-stat-box {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.quick-stat-box .label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.quick-stat-box .value {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* Modal Detail Grid */
.modal-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.detail-panel {
    background: rgba(255, 255, 255, 0.005);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
}

.detail-panel h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    padding-bottom: 8px;
}

.detail-panel h4 i {
    color: var(--accent-blue);
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.detail-table td {
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.02);
}

.detail-table td:first-child {
    color: var(--text-muted);
}

.detail-table td:last-child {
    text-align: right;
    font-weight: 600;
}

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

.highlight-cyan { color: var(--accent-cyan); }
.highlight-green { color: var(--accent-emerald); }
.highlight-rose { color: var(--accent-rose); }
.highlight-gold { color: var(--accent-gold); }

/* Bloco de Mineração Detalhado */
.blocks-broken-panel {
    margin-top: 5px;
}

.blocks-chart-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.block-stat-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.block-stat-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
}

.block-stat-info .name {
    color: var(--text-secondary);
}

.block-stat-info .count {
    color: var(--accent-cyan);
    font-weight: 700;
}

.block-bar-outer {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
    overflow: hidden;
}

.block-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan));
    border-radius: 3px;
    width: 0%;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 15px 0;
    color: var(--text-dark);
    font-size: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.main-footer strong {
    color: var(--text-muted);
}

/* Split Charts Layout */
.chart-panel-body-split {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px !important;
}

.chart-container-split {
    flex: 1 1 400px;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.chart-container-split h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ══════════════════════════════════
   RealLife — Status do Mundo
   ══════════════════════════════════ */
.reallife-row {
    display: block;
}

.reallife-panel .panel-body {
    padding: 16px 20px 20px;
}

.reallife-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.reallife-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.reallife-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.reallife-card .rl-card-icon {
    font-size: 22px;
    color: var(--accent-cyan);
    margin-bottom: 2px;
}

.reallife-card .rl-card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reallife-card .rl-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
    font-weight: 600;
}

.reallife-card .rl-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.reallife-card .rl-sub {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

.reallife-card .rl-progress-wrap {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.reallife-card .rl-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 2s ease, background-color 0.5s ease;
}

.reallife-card .rl-progress-label {
    font-size: 11px;
    color: var(--text-dark);
    font-weight: 500;
}

/* Card específico do tempo — sem barra de progresso */
#rl-time .rl-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* ══════════════════════════════════
   RealLife — Player Stats (no card do jogador)
   ══════════════════════════════════ */
.player-reallife-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 6px 0 4px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.player-reallife-bars .player-bar-row {
    gap: 6px;
}

/* Energy bar — amarelo/laranja */
.bar-energy-icon {
    color: #fbbf24;
    width: 14px;
    font-size: 10px;
    text-align: center;
}

.energy-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
}

/* Comfort bar — verde/ciano */
.bar-comfort-icon {
    color: #10b981;
    width: 14px;
    font-size: 10px;
    text-align: center;
}

.comfort-fill {
    background: linear-gradient(90deg, #059669, #10b981) !important;
}

/* Weight bar — roxo */
.bar-weight-icon {
    color: #9d4edd;
    width: 14px;
    font-size: 10px;
    text-align: center;
}

.weight-fill {
    background: linear-gradient(90deg, #7c3aed, #9d4edd) !important;
}

/* Ajuste para as barras do jogador ficarem compactas com as novas */
.player-reallife-bars .player-bar-row span {
    font-size: 10px;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

.player-reallife-bars .bar-outer {
    flex: 1;
}

/* ══════════════════════════════════
   Bioma + XP — badges no card do jogador
   ══════════════════════════════════ */
.player-state-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    margin: 4px 0 2px;
}

.biome-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.xp-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-gold);
    background: rgba(251, 191, 36, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* ══════════════════════════════════
   Efeitos de Poção — badges no modal
   ══════════════════════════════════ */
.effect-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(157, 78, 221, 0.08);
    border: 1px solid rgba(157, 78, 221, 0.15);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.effect-badge:last-child {
    margin-bottom: 0;
}

.effect-badge i {
    color: #9d4edd;
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.effect-badge strong {
    color: var(--text-primary);
}

/* ══════════════════════════════════
   Equipamento — grid no modal
   ══════════════════════════════════ */
.equipment-panel {
}

.equipment-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.equipment-slot {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: border-color 0.2s ease;
}

.equipment-slot:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.equipment-slot .eq-icon {
    font-size: 18px;
    color: var(--text-dark);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    flex-shrink: 0;
}

.equipment-slot .eq-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.equipment-slot .eq-name {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    font-weight: 600;
}

.equipment-slot .eq-item {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.equipment-slot .eq-durability-wrap {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
}

.equipment-slot .eq-durability-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease, background-color 0.3s ease;
}

.equipment-slot .eq-durability-text {
    font-size: 10px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    margin-top: 3px;
    display: block;
    opacity: 0.7;
}

.equipment-slot .eq-enchants {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 2px;
}

/* ══════════════════════════════════
   Radar — legenda de biomas
   ══════════════════════════════════ */
.radar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 8px 12px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 10px;
    color: var(--text-muted);
}

.radar-legend-title {
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 9px;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ══════════════════════════════════
   Guia de Plantio — tabela
   ══════════════════════════════════ */
.planting-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.planting-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.01);
}

.planting-table thead th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
}

.planting-table thead th.plant-col {
    text-align: left;
    padding-left: 16px;
}

.planting-table thead th.season-col {
    text-align: center;
    min-width: 100px;
    transition: all 0.3s ease;
}

/* Coluna da estação atual destacada */
.planting-table thead th.season-col.active {
    background: rgba(0, 242, 254, 0.08);
    color: var(--accent-gold);
    border-bottom-color: var(--accent-cyan);
    box-shadow: inset 0 -2px 0 var(--accent-cyan);
}

.planting-table tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.planting-table tbody td.plant-col {
    font-weight: 600;
    color: var(--text-primary);
    padding-left: 16px;
    white-space: nowrap;
}

.planting-table tbody td.season-col {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Destaque na linha inteira da coluna ativa */
.planting-table tbody td.season-col.active {
    background: rgba(0, 242, 254, 0.04);
}

/* Cores por rating */
.planting-table .rating-excelente {
    color: #10b981;
}
.planting-table .rating-bom {
    color: #3b82f6;
}
.planting-table .rating-medio {
    color: #f59e0b;
}
.planting-table .rating-ruim {
    color: #f97316;
}
.planting-table .rating-nao-cresce {
    color: #6b7280;
    font-style: italic;
}
.planting-table .rating-lenta {
    color: #f97316;
    font-style: italic;
}

/* ══════════════════════════════════
   Fases da Lua — efeitos
   ══════════════════════════════════ */
.moon-effects-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.moon-effect-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.moon-effect-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.moon-effect-value {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.moon-effect-detail {
    font-size: 11px;
    color: var(--text-dark);
    display: block;
    margin-top: 1px;
}

.moon-effect-item.positive .moon-effect-value { color: #10b981; }
.moon-effect-item.negative .moon-effect-value { color: #f97316; }
.moon-effect-item.danger .moon-effect-value { color: #f43f5e; }

.moon-brightness-info {
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

/* ══════════════════════════════════
   Fases da Lua — tabela completa
   ══════════════════════════════════ */
.moon-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.moon-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.01);
}

.moon-table thead th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
}

.moon-table thead th.moon-icon-col { text-align: center; width: 40px; }
.moon-table thead th.moon-name-col { width: 140px; }

.moon-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

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

.moon-table .moon-icon-td {
    text-align: center;
    font-size: 20px;
}

.moon-table .moon-name-td {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.moon-table .moon-name-td.active {
    color: var(--accent-gold);
}

.moon-table .moon-effects-td {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.moon-table tr.active-row {
    background: rgba(0, 242, 254, 0.04);
}

.moon-table tr.active-row .moon-name-td {
    color: var(--accent-gold);
}

.moon-table .moon-effect-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 4px;
}

.moon-table .moon-effect-tag.positive { color: #10b981; }
.moon-table .moon-effect-tag.negative { color: #f97316; }
.moon-table .moon-effect-tag.danger { color: #f43f5e; }

/* ══════════════════════════════════
   Cards ocultos por solicitação
   ══════════════════════════════════ */
#card-tps,
#card-memory,
#card-players-count {
    display: none !important;
}

/* Remove scrollbar da página inteira — mantém scroll funcional */
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
*::-webkit-scrollbar {
    display: none !important;
}

body {
    overflow-y: auto;
}
