/**
 * Modern Statistics Styles for Klick-Game
 * Basiert auf dem Styleguide: Schwarz-Grau-Gradienten, Orange Border
 */

/* Container */
.statistik-container {
    background: linear-gradient(135deg, #726B6C 0%, #595959 100%);
    border: 2px solid #ff6600;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1rem auto;
    max-width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Header/Title */
.statistik-header {
    background: linear-gradient(135deg, #ff6600 0%, #ff9900 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 1.5rem;
    border-bottom: 2px dashed #328727;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Navigation Tabs */
.statistik-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: rgba(42, 42, 42, 0.5);
    border-radius: 0.375rem;
}

.statistik-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    background: linear-gradient(135deg, #726B6C 0%, #595959 100%);
    border: 1px solid #595959;
    transition: all 0.3s ease;
    font-weight: 500;
}

.statistik-nav a:hover,
.statistik-nav a.active {
    background: linear-gradient(135deg, #ff6600 0%, #ff9900 100%);
    border-color: #ff6600;
    transform: translateY(-2px);
}

.statistik-nav .divider {
    color: #AC0000;
    font-weight: bold;
}

/* Modern Table */
.statistik-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    margin: 1rem 0;
}

.statistik-table thead {
    background: linear-gradient(135deg, #726B6C 0%, #595959 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.statistik-table th {
    color: #fff;
    padding: 0.75rem;
    text-align: center;
    font-weight: bold;
    border: 1px solid #726B6C;
    font-size: 0.875rem;
    white-space: nowrap;
}

.statistik-table th img {
    vertical-align: middle;
    margin-left: 0.25rem;
}

.statistik-table tbody tr {
    background: #635E5E;
    transition: background 0.2s ease;
    border-bottom: 1px solid #595959;
}

.statistik-table tbody tr:hover {
    background: #545050;
}

.statistik-table td {
    padding: 0.75rem;
    color: #BAB3B4;
    border: 1px solid #726B6C;
    font-size: 0.875rem;
    text-align: center;
}

.statistik-table td:first-child {
    text-align: left;
}

/* Clickable rows */
.statistik-table tbody tr[onclick] {
    cursor: pointer;
}

/* Status Icons */
.statistik-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* Tooltips */
.statistik-tooltip {
    position: absolute;
    display: none;
    background: linear-gradient(135deg, #726B6C 0%, #595959 100%);
    border: 1px solid #ff6600;
    border-radius: 0.375rem;
    padding: 0.5rem;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    max-width: 300px;
}

.statistik-tooltip.active {
    display: block;
}

.statistik-tooltip-header {
    background: linear-gradient(135deg, #ff6600 0%, #ff9900 100%);
    color: #fff;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 0.25rem 0.25rem 0 0;
    text-align: center;
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
}

.statistik-tooltip-content {
    color: #BAB3B4;
    font-size: 0.875rem;
}

/* Success/Warning Tooltips */
.tooltip-success .statistik-tooltip-header {
    background: linear-gradient(135deg, #24BC06 0%, #01A60D 100%);
}

.tooltip-warning .statistik-tooltip-header {
    background: linear-gradient(135deg, #B54949 0%, #D22525 100%);
}

/* Pagination */
.statistik-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.statistik-pagination a,
.statistik-pagination span {
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #726B6C 0%, #595959 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 0.25rem;
    border: 1px solid #595959;
    transition: all 0.3s ease;
}

.statistik-pagination a:hover {
    background: linear-gradient(135deg, #ff6600 0%, #ff9900 100%);
    border-color: #ff6600;
}

.statistik-pagination span.current {
    background: linear-gradient(135deg, #ff6600 0%, #ff9900 100%);
    border-color: #ff6600;
    font-weight: bold;
}

/* Blocked/Item indicators */
.statistik-blocked {
    cursor: pointer;
    position: relative;
}

.statistik-item {
    cursor: pointer;
    position: relative;
}

/* Responsive */
@media (max-width: 768px) {
    .statistik-table {
        font-size: 0.75rem;
    }
    
    .statistik-table th,
    .statistik-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .statistik-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .statistik-nav .divider {
        display: none;
    }
}

/* Old table styling compatibility */
table[bgcolor="#BAB3B4"] {
    background: transparent !important;
}

.messages-head {
    background: linear-gradient(135deg, #726B6C 0%, #595959 100%) !important;
    border: 1px solid #444646 !important;
    color: #fff !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 0.75rem !important;
}

/* Wrap long content */
.statistik-table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 200px;
}

/* Special column widths */
.statistik-table td:nth-child(1) { /* Geld */
    white-space: nowrap;
}

.statistik-table td:nth-child(2) { /* EP */
    white-space: nowrap;
}

.statistik-table td:nth-child(3) { /* Zeit */
    white-space: nowrap;
}

.statistik-table td:nth-child(5) { /* JS */
    width: 40px;
}

.statistik-table td:nth-child(7) { /* Land */
    width: 60px;
}
