/* =====================================================
   DATEI: /assets/css/serverlist.css
   BESCHREIBUNG: Styles für TeamSpeak Server-Liste
   PROJEKT: gaming-ts.com
   VERSION: 2.0 - Heatmap, Donut, Peak, eigene Dropdowns
   ===================================================== */

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

body {
    background: #0a0a0a;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 0, 255, 0.05) 0%, transparent 50%);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero-section {
    width: 100%; padding: 60px 20px; text-align: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 255, 255, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-title {
    font-size: 42px; font-weight: bold;
    background: linear-gradient(45deg, #00ff88, #00ffff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}
.hero-subtitle { color: #888; font-size: 16px; }

/* =====================================================
   STATS CARDS
   ===================================================== */
.stats-container {
    width: calc(100% - 40px); max-width: 1400px;
    margin: -30px auto 30px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px;
}
.stat-card {
    background: rgba(0, 0, 0, 0.8); border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 15px; padding: 20px; text-align: center;
    backdrop-filter: blur(10px); transition: all 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-3px); border-color: #00ff88;
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.2);
}
.stat-number { font-size: 32px; font-weight: bold; color: #00ff88; margin-bottom: 5px; }
.stat-label { color: #888; font-size: 13px; }

/* =====================================================
   CHART SECTIONS
   ===================================================== */
.chart-section {
    width: calc(100% - 40px); max-width: 1400px;
    margin: 0 auto 20px;
    background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px; padding: 25px;
}
.chart-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px; margin-bottom: 15px;
}
.chart-title {
    color: #00ff88; font-size: 18px;
    display: flex; align-items: center; gap: 10px; margin: 0;
}
.chart-subtitle { color: #555; font-size: 13px; font-weight: normal; margin-left: 5px; }
.chart-container { position: relative; height: 280px; width: 100%; }
.chart-container-square { height: 300px; }
.chart-empty { text-align: center; color: #555; padding: 40px; font-style: italic; }

/* =====================================================
   CHART CONTROLS (Dropdowns)
   ===================================================== */
.chart-controls {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.range-selector {
    display: flex; align-items: center; gap: 6px;
}
.range-selector label { color: #888; font-size: 13px; white-space: nowrap; }
.range-select {
    background: rgba(0, 0, 0, 0.8); color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3); border-radius: 8px;
    padding: 6px 12px; font-size: 13px; cursor: pointer;
    outline: none; transition: all 0.3s ease;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300ff88' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}
.range-select:hover, .range-select:focus {
    border-color: #00ff88; box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}
.range-select option { background: #111; color: #fff; }

/* =====================================================
   CHARTS GRID (2 nebeneinander)
   ===================================================== */
.charts-grid {
    width: calc(100% - 40px); max-width: 1400px;
    margin: 0 auto 20px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.charts-grid .chart-section { width: 100%; margin: 0; }

/* =====================================================
   HEATMAP
   ===================================================== */
.heatmap-container {
    width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}
#heatmapCanvas {
    width: 100%;
    min-height: 220px;
}
.heatmap-legend {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; margin-top: 15px; padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.legend-label { color: #666; font-size: 12px; }
.legend-gradient {
    width: 200px; height: 12px; border-radius: 6px;
    background: linear-gradient(90deg, 
        rgba(0, 255, 136, 0.05) 0%, 
        rgba(0, 255, 136, 0.2) 25%, 
        rgba(0, 255, 136, 0.5) 50%, 
        rgba(0, 255, 136, 0.8) 75%, 
        #00ff88 100%
    );
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* Heatmap Tooltip */
.heatmap-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(0, 255, 136, 0.5);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 12px;
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    display: none;
}
.heatmap-tooltip .tt-title { color: #00ff88; font-weight: bold; margin-bottom: 4px; }
.heatmap-tooltip .tt-value { color: #fff; }
.heatmap-tooltip .tt-peak { color: #ffd700; font-size: 11px; }

/* =====================================================
   MAIN CONTAINER
   ===================================================== */
.main-container {
    width: 100%; max-width: 1400px; margin: 0 auto;
    padding: 0 20px 40px; flex: 1;
}

/* =====================================================
   SERVER GRID
   ===================================================== */
.servers-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px; margin-bottom: 40px;
}

/* =====================================================
   SERVER CARD
   ===================================================== */
.server-card {
    background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px; padding: 25px; position: relative; overflow: hidden;
    transition: all 0.3s ease;
}
.server-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #00ff88, #00ffff);
    transform: scaleX(0); transition: transform 0.3s ease;
}
.server-card:hover::before { transform: scaleX(1); }
.server-card:hover {
    transform: translateY(-5px); border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

/* Featured Badge */
.featured-badge {
    position: absolute; top: 15px; right: 15px;
    background: linear-gradient(45deg, #ffd700, #ffed4e); color: #000;
    padding: 5px 15px; border-radius: 20px; font-size: 11px; font-weight: bold;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* Ranking Badge */
.ranking-badge {
    position: absolute; top: 15px; left: 15px; width: 35px; height: 35px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 16px; z-index: 10;
}
.ranking-badge.gold {
    background: linear-gradient(45deg, #FFD700, #FFA500); color: #000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}
.ranking-badge.silver {
    background: linear-gradient(45deg, #C0C0C0, #B8B8B8); color: #000;
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.6);
}
.ranking-badge.bronze {
    background: linear-gradient(45deg, #CD7F32, #B87333); color: #fff;
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.6);
}

/* Server Header */
.server-header {
    display: flex; align-items: center; margin-bottom: 15px; padding-left: 40px;
}
.server-name { font-size: 18px; font-weight: bold; color: #fff; flex: 1; }

/* Status Badge */
.server-status {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px;
    border-radius: 20px; font-size: 12px; font-weight: bold;
    text-decoration: none; cursor: pointer; transition: all 0.3s ease;
}
.status-online { background: rgba(0, 255, 0, 0.2); color: #00ff00; border: 1px solid #00ff00; }
.status-online:hover { background: #00ff00; color: #000; transform: scale(1.05); }
.status-empty { background: rgba(255, 170, 0, 0.2); color: #ffaa00; border: 1px solid #ffaa00; }
.status-empty:hover { background: #ffaa00; color: #000; transform: scale(1.05); }
.status-offline { background: rgba(255, 68, 68, 0.2); color: #ff4444; border: 1px solid #ff4444; }
.status-offline:hover { background: #ff4444; color: #fff; transform: scale(1.05); }

/* Server Info */
.server-info {
    background: rgba(255, 255, 255, 0.05); border-radius: 10px;
    padding: 15px; margin-bottom: 15px;
}
.info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: #888; }
.info-row .info-value {
    color: #fff; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
}
.info-row.user-count {
    background: rgba(0, 255, 136, 0.05); padding: 10px; border-radius: 5px;
    border: 1px solid rgba(0, 255, 136, 0.2); margin: 5px 0;
}
.info-row.user-count .info-value {
    color: #00ff88; font-size: 16px; font-weight: bold;
}

/* =====================================================
   KOPIER-BUTTONS
   ===================================================== */
.btn-copy {
    background: rgba(0, 255, 136, 0.15); border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88; border-radius: 5px; padding: 3px 8px; font-size: 11px;
    cursor: pointer; transition: all 0.3s ease; display: inline-flex;
    align-items: center; gap: 4px;
}
.btn-copy:hover { background: #00ff88; color: #000; }
.btn-copy.copied { background: #00ff88; color: #000; }

.btn-copy-large {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px;
    border-radius: 20px; font-size: 12px; font-weight: bold;
    text-decoration: none; cursor: pointer; transition: all 0.3s ease;
    background: rgba(0, 255, 136, 0.1); color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}
.btn-copy-large:hover { background: #00ff88; color: #000; transform: scale(1.05); }
.btn-copy-large.copied { background: #00ff88; color: #000; }

/* =====================================================
   AUSLASTUNGS-BALKEN
   ===================================================== */
.usage-bar-container { margin-top: 5px; }
.usage-bar-bg {
    width: 100%; height: 6px; background: rgba(255, 255, 255, 0.1);
    border-radius: 3px; overflow: hidden;
}
.usage-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.usage-bar-fill.low { background: #00ff88; }
.usage-bar-fill.medium { background: #ffaa00; }
.usage-bar-fill.high { background: #ff4444; }
.usage-text {
    display: flex; justify-content: space-between;
    font-size: 11px; color: #666; margin-top: 4px;
}

/* =====================================================
   CARD ACTIONS
   ===================================================== */
.card-actions {
    display: flex; gap: 10px; justify-content: center;
    margin-top: 15px; flex-wrap: wrap;
}

/* =====================================================
   MINI CHART
   ===================================================== */
.mini-chart-container { height: 80px; margin-top: 10px; position: relative; }

/* =====================================================
   ADD SERVER
   ===================================================== */
.add-server-section {
    text-align: center; padding: 40px;
    background: rgba(0, 0, 0, 0.6); border: 2px dashed rgba(0, 255, 136, 0.3);
    border-radius: 15px; margin: 40px 0;
}
.btn-add {
    display: inline-flex; align-items: center; gap: 10px; padding: 15px 40px;
    background: linear-gradient(45deg, #00ff88, #00ffff); color: #000;
    border: none; border-radius: 25px; font-weight: bold; font-size: 16px;
    text-decoration: none; cursor: pointer; transition: all 0.3s ease;
}
.btn-add:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(0, 255, 136, 0.5); }
.btn-add-login { background: linear-gradient(45deg, #ffaa00, #ff6600); }
.btn-add-login:hover { box-shadow: 0 5px 20px rgba(255, 170, 0, 0.5); }

/* =====================================================
   NOTIFICATION
   ===================================================== */
.notification {
    position: fixed; top: 100px; right: 20px; padding: 15px 25px;
    border-radius: 10px; font-weight: bold; z-index: 3000;
    transform: translateX(400px); transition: transform 0.3s ease;
}
.notification.show { transform: translateX(0); }
.notification.success { background: linear-gradient(45deg, #00ff88, #00ffff); color: #000; }

/* =====================================================
   NO SERVERS
   ===================================================== */
.no-servers { text-align: center; padding: 60px 20px; color: #555; }
.no-servers i { font-size: 60px; margin-bottom: 20px; color: #333; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .hero-title { font-size: 28px; }
    .servers-grid { grid-template-columns: 1fr; }
    .stats-container { grid-template-columns: repeat(2, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
    .server-header { padding-left: 0; }
    .chart-container { height: 200px; }
    .chart-container-square { height: 250px; }
    .chart-header { flex-direction: column; align-items: flex-start; }
    .chart-controls { width: 100%; }
    .card-actions { flex-direction: column; align-items: center; }
    .heatmap-legend { flex-direction: row; }
    .legend-gradient { width: 150px; }
}

@media (max-width: 480px) {
    .stats-container { grid-template-columns: 1fr; }
    .hero-section { padding: 40px 15px; }
    .hero-title { font-size: 24px; }
    .chart-section { padding: 15px; }
}
