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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

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

.status-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.card-header i {
    font-size: 1.5em;
    margin-right: 15px;
    color: #667eea;
}

.card-header h2 {
    font-size: 1.4em;
    color: #333;
}

.card-content {
    text-align: center;
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
}

.stat-text {
    font-size: 1.8em;
    font-weight: 600;
    color: #667eea;
    word-break: break-all;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-text {
    font-size: 1.5em;
    font-weight: 600;
    padding: 15px 20px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#status-indicator {
    font-size: 1em !important;
    margin-right: 10px !important;
}

.status-online {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    animation: pulse-green 2s infinite;
}

.status-offline {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    animation: pulse-red 2s infinite;
}

.indicator-online {
    color: #4CAF50;
    animation: pulse-green 2s infinite;
}

.indicator-offline {
    color: #f44336;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-green {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary i.fa-spin {
    animation: fa-spin 1s linear infinite;
}

.last-updated {
    color: #666;
    font-size: 0.9em;
}

.btn-logout {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.raw-data {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.raw-data summary {
    padding: 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e9ecef;
}

.raw-data summary:hover {
    background: #e9ecef;
}

.raw-data pre {
    padding: 20px;
    background: #2c3e50;
    color: #ecf0f1;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
    overflow-x: auto;
    margin: 0;
}

/* Panels (Online Players, Performance) */
.panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.panel-header i {
    font-size: 1.3em;
    margin-right: 12px;
    color: #667eea;
}

.panel-header h2 {
    font-size: 1.2em;
    color: #333;
    margin: 0;
}

.panel-content {
    padding: 20px 25px;
}

/* Online Players List */
.players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.player-name {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-name i {
    color: #667eea;
    font-size: 0.9em;
}

.player-info {
    font-size: 0.85em;
    color: #666;
    background: #e9ecef;
    padding: 3px 10px;
    border-radius: 12px;
}

.player-account {
    font-size: 0.8em;
    color: #999;
    margin-left: auto;
}

.player-location {
    font-size: 0.85em;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.player-location i {
    color: #e74c3c;
    font-size: 0.8em;
}

.player-guild {
    font-size: 0.85em;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.player-guild i {
    color: #f39c12;
    font-size: 0.8em;
}

.player-officer-note {
    font-size: 0.85em;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.player-officer-note i {
    color: #8e44ad;
    font-size: 0.8em;
}

.player-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.player-tag i {
    font-size: 0.8em;
    opacity: 0.8;
}

.player-level {
    font-size: 0.75em;
    opacity: 0.7;
    margin-left: 2px;
}

.no-data {
    color: #999;
    font-style: italic;
    margin: 0;
}

/* Performance Grid */
.perf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.perf-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: help;
    position: relative;
}

.perf-item[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.78em;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 220px;
    line-height: 1.4;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.perf-item[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2c3e50;
    z-index: 100;
    pointer-events: none;
}

.perf-label {
    display: block;
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.perf-value {
    display: block;
    font-size: 1.6em;
    font-weight: 700;
    color: #333;
}

.perf-value.good {
    color: #4CAF50;
}

.perf-value.warn {
    color: #FF9800;
}

.perf-value.bad {
    color: #f44336;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .actions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stat-number {
        font-size: 2.5em;
    }
}