/* --- GŁÓWNE RESETOWANIE I TYPOGRAFIA --- */
* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.steam-avatar-overlay {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- DRUGI PANEL (STATYSTYKI) --- */
.drugi-panel {
    height: 100vh; /* Panel zajmuje pełną wysokość ekranu */
    width: 100%;
    display: flex;
    flex-direction: row-reverse; /* Gry po prawej, detale po lewej */
    background: radial-gradient(circle at top left, #1b2838 0%, #101214 100%);
    padding: 5em 5% 2em; /* 5em góry, by nie chowało się pod topbarem */
    gap: 25px;
    overflow: hidden; /* Sam panel nie scrolluje, scrollują kolumny */
}

/* LEWA KOLUMNA - Detale gry */
.leftcol {
    background-color: rgba(41, 46, 55, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 192, 244, 0.1);
    border-radius: 15px;
    flex: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.leftcol-bar {
    background-color: rgba(26, 29, 36, 0.9);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(102, 192, 244, 0.2);
    gap: 15px;
}

.leftcol-bar input {
    background: #101214;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 8px 15px;
    color: white;
    flex-grow: 1;
}

.leftcol-content {
    padding: 30px;
    overflow-y: auto;
    flex-grow: 1;
}
.leftcol button {
    background: rgba(35, 39, 48, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 10px 20px;
    color: #e5e5e5;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* PRAWA KOLUMNA - Lista gier ze scrollem */
.rightcol {
    flex: 1;
    height: 100%;
    overflow-y: auto; /* To włącza scrollowanie listy gier */
    overflow-x: hidden; /* Blokuje wychodzenie na boki */
    padding: 10px 10px 10px 40px; /* Padding 40px z lewej chroni przyciski przed ucinaniem przy hoverze */
}

/* Stylizacja scrollbara biblioteki */
.rightcol::-webkit-scrollbar {
    width: 6px;
}
.rightcol::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
.rightcol::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 10px;
}

/* PRZYCISK GRY NA LIŚCIE */
.stat-button {
    display: flex;
    align-items: center;
    background: rgba(35, 39, 48, 0.6);
    width: 100%;
    height: 110px; /* Wysokość dopasowana do pionowego plakatu */
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0; /* Zapobiega zgniataniu przycisku */
}

.stat-button:hover {
    transform: translateX(-20px); /* Przesunięcie w lewo */
    background: rgba(102, 192, 244, 0.15);
    border-color: #66c0f4;
}

.stat-button.active-title {
    background: #66c0f4 !important;
}

/* PIONOWY PLAKAT GRY */
.btn-img {
    height: 90px; /* Stała wysokość zdjęcia wewnątrz przycisku */
    aspect-ratio: 2 / 3; /* WYMUSZA PIONOWE PROPORCJE PLAKATU */
    object-fit: cover; /* Grafika wypełnia ramkę bez zniekształceń */
    border-radius: 4px;
    margin-right: 20px;
    flex-shrink: 0; /* Obrazek nie da się "ścisnąć" */
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.btn-text {
    color: #e5e5e5;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/*statystyki gry */
.stat-button.active-title .btn-text {
    color: #101214;
}
.stats-title {
    color: #66c0f4;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.stats-playtime {
    margin-top: 10px;
    font-size: 1.1em;
}

.achievements-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    color: white;
}

.progress-bar-bg {
    background: #444;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar-fill {
    background: #66c0f4;
    height: 100%;
    transition: width 0.5s ease;
}

.no-data-msg {
    color: #888;
    margin-top: 15px;
    font-style: italic;
}

.loading-msg {
    color: #66c0f4;
}

.error-msg {
    color: #ff4d4d;
}
.stats-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Mała ikonka w lewym panelu */
.stats-mini-icon {
    width: 24px; /* Nieco większa niż na liście, żeby była wyraźna */
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Usuwamy stare border-bottom z samej klasy tytułu, bo teraz mamy go w .stats-header */
.stats-title-text {
    color: #66c0f4;
    margin: 0;
    font-size: 1.5em;
}
.rare-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rare-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #ebe671; /* Złoty pasek dla rzadkich rzeczy */
}

.rare-name {
    font-weight: bold;
    font-size: 0.9em;
    color: #e0e0e0;
}

.rare-percent {
    font-size: 0.85em;
    color: #ebe671; /* Kolor rzadkości */
    background: rgba(235, 230, 113, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}