/**
 * KiroTools GeoProfile - Stylesheet
 * CSS-Prefix: kt-gp--
 */

/* === Profil === */
.kt-gp--profile {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.kt-gp--profile h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.kt-gp--profile-header {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--color-surface, #ffffff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.kt-gp--avatar-section {
    text-align: center;
}

.kt-gp--avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--color-primary-light, #e8edff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kt-gp--avatar-icon {
    font-size: 2.5rem;
}

.kt-gp--username {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.kt-gp--member-since {
    font-size: 0.85rem;
    color: var(--color-text-muted, #888);
    margin-bottom: 1rem;
}

.kt-gp--change-avatar {
    font-size: 0.85rem;
}

/* === Statistik-Karten === */
.kt-gp--stats-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-content: center;
}

.kt-gp--stat-card {
    text-align: center;
    padding: 1.25rem;
    background: var(--color-bg, #f8f9fa);
    border-radius: 10px;
}

.kt-gp--stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary, #4361ee);
    margin-bottom: 0.25rem;
}

.kt-gp--stat-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary, #4a4a6a);
}

/* === Detail-Statistiken === */
.kt-gp--stats-detail {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-surface, #ffffff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.kt-gp--stats-detail h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-text-secondary, #4a4a6a);
}

.kt-gp--mode-stats,
.kt-gp--region-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.kt-gp--mode-card,
.kt-gp--region-card {
    padding: 1rem;
    background: var(--color-bg, #f8f9fa);
    border-radius: 8px;
}

.kt-gp--mode-card h3,
.kt-gp--region-card h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary, #4361ee);
}

.kt-gp--mode-card dl,
.kt-gp--region-card dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    font-size: 0.9rem;
}

.kt-gp--mode-card dt,
.kt-gp--region-card dt {
    color: var(--color-text-secondary, #4a4a6a);
}

.kt-gp--mode-card dd,
.kt-gp--region-card dd {
    margin: 0;
    font-weight: 600;
}

.kt-gp--empty-card {
    opacity: 0.6;
}

.kt-gp--empty-card p {
    font-style: italic;
    color: var(--color-text-muted, #888);
}

/* === Spielverlauf === */
.kt-gp--history {
    padding: 1.5rem;
    background: var(--color-surface, #ffffff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.kt-gp--history h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.kt-gp--history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kt-gp--history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border, #eee);
}

.kt-gp--history-item:last-child {
    border-bottom: none;
}

.kt-gp--history-info {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.kt-gp--history-mode,
.kt-gp--history-region,
.kt-gp--history-difficulty {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--color-bg, #f0f0f0);
}

.kt-gp--history-result {
    text-align: right;
}

.kt-gp--history-score {
    display: block;
    font-weight: 700;
    color: var(--color-primary, #4361ee);
}

.kt-gp--history-correct {
    font-size: 0.85rem;
    color: var(--color-text-secondary, #4a4a6a);
}

.kt-gp--history-date {
    font-size: 0.8rem;
    color: var(--color-text-muted, #888);
    min-width: 80px;
    text-align: right;
}

/* === Bestenliste === */
.kt-gp--leaderboard {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.kt-gp--leaderboard h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.kt-gp--filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.kt-gp--filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kt-gp--filter-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.kt-gp--filter-group select {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--color-border, #e0e0e0);
    border-radius: 6px;
    font-size: 0.9rem;
    min-height: 44px;
}

.kt-gp--leaderboard-table {
    background: var(--color-surface, #ffffff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.kt-gp--table {
    width: 100%;
    border-collapse: collapse;
}

.kt-gp--table th {
    padding: 1rem;
    text-align: left;
    background: var(--color-bg, #f8f9fa);
    font-size: 0.85rem;
    color: var(--color-text-secondary, #4a4a6a);
    border-bottom: 2px solid var(--color-border, #e0e0e0);
}

.kt-gp--table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border, #eee);
}

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

.kt-gp--table .kt-gp--rank {
    font-size: 1.2rem;
    text-align: center;
    width: 50px;
}

.kt-gp--table .kt-gp--player {
    font-weight: 600;
}

.kt-gp--table .kt-gp--score {
    font-weight: 700;
    color: var(--color-primary, #4361ee);
}

.kt-gp--top-1 {
    background: rgba(241, 196, 15, 0.08);
}

.kt-gp--top-2 {
    background: rgba(189, 195, 199, 0.08);
}

.kt-gp--top-3 {
    background: rgba(230, 126, 34, 0.08);
}

/* === Modal === */
.kt-gp--modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.kt-gp--modal {
    background: var(--color-surface, #ffffff);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.kt-gp--modal h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.kt-gp--avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.kt-gp--avatar-option {
    width: 60px;
    height: 60px;
    border: 2px solid var(--color-border, #e0e0e0);
    border-radius: 50%;
    background: var(--color-bg, #f8f9fa);
    font-size: 1.5rem;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kt-gp--avatar-option:hover {
    border-color: var(--color-primary, #4361ee);
    transform: scale(1.1);
}

.kt-gp--avatar-option:focus-visible {
    outline: 3px solid var(--color-primary, #4361ee);
    outline-offset: 2px;
}

.kt-gp--modal-close {
    width: 100%;
}

/* === Allgemein === */
.kt-gp--loading {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-secondary, #4a4a6a);
}

.kt-gp--error {
    text-align: center;
    padding: 3rem;
}

.kt-gp--empty {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted, #888);
    font-style: italic;
}

/* === Responsive === */
@media (max-width: 768px) {
    .kt-gp--profile-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .kt-gp--stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .kt-gp--history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .kt-gp--history-result {
        text-align: left;
    }

    .kt-gp--table {
        font-size: 0.85rem;
    }

    .kt-gp--table th,
    .kt-gp--table td {
        padding: 0.625rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .kt-gp--profile,
    .kt-gp--leaderboard {
        padding: 1rem 0.75rem;
    }

    .kt-gp--filter-bar {
        flex-direction: column;
    }

    .kt-gp--avatar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    .kt-gp--avatar-option {
        transition: none;
    }
}
