/**
 * Modern Highscore Styles for Klick-Game
 * Basierend auf dem Styleguide: Schwarz-Grau-Gradienten, Orange Border, Grün gestrichelt
 */

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

/* Highscore Header */
.highscore-header {
    background: linear-gradient(135deg, #726B6C 0%, #595959 100%);
    padding: 1rem;
    border-bottom: 2px dashed #328727;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 0.5rem;
    align-items: center;
    font-weight: bold;
    color: #FFFFFF;
    text-align: center;
}

.highscore-header > div:first-child {
    text-align: left;
    padding-left: 1rem;
}

/* Highscore Rows */
.highscore-row {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #595959;
    background: #635E5E;
    transition: background-color 0.2s ease;
}

.highscore-row:hover {
    background: linear-gradient(90deg, #726B6C 0%, #635E5E 100%);
}

/* Highlight row (current user) */
.highscore-row.highlight {
    background: linear-gradient(90deg, #8B7D7D 0%, #726B6C 100%);
    border-left: 4px solid #ff6600;
    font-weight: bold;
}

.highscore-row.highlight:hover {
    background: linear-gradient(90deg, #9B8D8D 0%, #8B7D7D 100%);
}

/* Highscore Columns */
.highscore-col {
    color: #BAB3B4;
    text-align: center;
    font-size: 0.875rem;
}

.highscore-col:first-child {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Rank badge */
.highscore-rank {
    display: inline-block;
    background: linear-gradient(135deg, #ff6600 0%, #ff9900 100%);
    color: #FFFFFF;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    min-width: 2.5rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Top 3 special ranks */
.highscore-row:nth-child(1) .highscore-rank {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    font-size: 1rem;
}

.highscore-row:nth-child(2) .highscore-rank {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    color: #000;
    font-size: 0.95rem;
}

.highscore-row:nth-child(3) .highscore-rank {
    background: linear-gradient(135deg, #CD7F32 0%, #A0522D 100%);
    color: #FFFFFF;
    font-size: 0.9rem;
}

/* Username Link */
.highscore-username {
    color: #E7E7E7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.highscore-username:hover {
    color: #ff6600;
    text-decoration: underline;
}

/* Navigation Links */
.highscore-navigation {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #726B6C 0%, #595959 100%);
    border: 2px solid #ff6600;
    border-radius: 0.5rem;
    text-align: center;
}

.highscore-navigation a {
    color: #E7E7E7;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    display: inline-block;
    transition: all 0.2s ease;
}

.highscore-navigation a:hover {
    color: #FFFFFF;
    background: #635E5E;
    border-radius: 4px;
}

.highscore-navigation a.active {
    background: linear-gradient(135deg, #ff6600 0%, #ff9900 100%);
    color: #FFFFFF;
    border-radius: 4px;
    font-weight: bold;
}

/* Pagination */
.highscore-pagination {
    margin: 1.5rem 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.highscore-pagination a,
.highscore-pagination span {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background: #635E5E;
    color: #E7E7E7;
    text-decoration: none;
    border: 1px solid #595959;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    text-align: center;
}

.highscore-pagination a:hover {
    background: #726B6C;
    color: #FFFFFF;
    border-color: #ff6600;
}

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

/* Icons */
.highscore-icon {
    vertical-align: middle;
    margin-right: 0.25rem;
    width: 1rem;
    height: 1rem;
}

/* Status badges */
.highscore-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.highscore-badge.online {
    background: #24BC06;
    color: #FFFFFF;
}

.highscore-badge.berserker {
    background: #D22525;
    color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 992px) {
    .highscore-header,
    .highscore-row {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 0.25rem;
    }
    
    .highscore-header {
        display: none; /* Hide header on mobile, use data labels instead */
    }
    
    .highscore-header > div:first-child {
        padding-left: 0;
    }
    
    .highscore-col {
        text-align: left;
        padding: 0.25rem 0;
    }
    
    .highscore-col:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        color: #E7E7E7;
        display: inline-block;
        min-width: 120px;
    }
    
    .highscore-col:first-child:before {
        content: "";
        display: none;
    }
    
    .highscore-row {
        padding: 1rem;
        margin-bottom: 0.5rem;
        border: 2px solid #595959;
        border-radius: 0.5rem;
    }
    
    .highscore-row.highlight {
        border: 2px solid #ff6600;
    }
}

@media (max-width: 768px) {
    .highscore-container {
        margin: 0.5rem 0;
    }
    
    .highscore-rank {
        min-width: 2rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .highscore-username {
        font-size: 0.9rem;
    }
    
    .highscore-navigation {
        padding: 0.75rem;
    }
    
    .highscore-navigation a {
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
        display: block;
        margin: 0.25rem 0;
    }
    
    .highscore-pagination a,
    .highscore-pagination span {
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
        min-width: 2rem;
    }
}

@media (max-width: 480px) {
    .highscore-col:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .highscore-col {
        font-size: 0.8rem;
    }
}

/* Print styles */
@media print {
    .highscore-navigation,
    .highscore-pagination {
        display: none;
    }
    
    .highscore-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .highscore-row {
        break-inside: avoid;
    }
}
