/* ============================================================
   PROFIL — Sidebar-Layout + View-/Edit-Modus, Crop-Modal
   ============================================================ */

/* ---- Sidebar-Layout (2-spaltig: Avatar-Card + Content) ---- */
.layout_2col { display: grid; grid-template-columns: 275px 1fr; gap: 20px; }
.card { background: rgba(26,29,37,0.95); border-radius: 10px; padding: 15px; }
.avatar_large { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 3px; display: block; }
.username { font-size: 22px; font-weight: 600; margin-bottom: 5px; }
.muted { color: var(--text-muted); font-size: 13px; }

@media (max-width: 900px) {
    .layout_2col { grid-template-columns: 1fr; }
    .avatar_large { width: 100px; height: 100px; display: block; margin: 0 auto 10px; }
    .layout_2col > div:first-child .card { text-align: center; }
}

.admin-notice {
    background: rgba(255,160,0,0.15);
    border: 1px solid rgba(255,160,0,0.4);
    color: #ffb300; border-radius: 6px;
    padding: 8px 14px; font-size: 13px; margin-bottom: 12px;
}

/* ---- Content-Block (Sidebar-Card-Variante mit Titel) ---- */
.content_block {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: rgba(30,30,40,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.content_block_header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
    padding-bottom: 6px;
}
.content_block_body {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.content_block_title {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 5px #000;
    margin-bottom: 10px;
}
.content_block_title a { color: var(--accent); text-decoration: none; }
.content_block_title a:hover { color: #fffacd; }

/* ---- Zurück-Button (Headline-Bar) ---- */
.back-button {
    padding: 6px 14px;
    background: var(--bg-raised);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.15s;
}
.back-button:hover { background: var(--border); }

.required-star { color: var(--danger); }

/* ---- Post-Rang-Abzeichen (Titel unterm Avatar, z.B. "The Chosen One") ---- */
.post-rank {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
}
.post-rank--sand    { background: rgba(180,160,100,0.15); border-color: rgba(180,160,100,0.35); color: #c8b078; }
.post-rank--bronze  { background: rgba(205,127,50,0.15);  border-color: rgba(205,127,50,0.35);  color: #cd7f32; }
.post-rank--gold    { background: rgba(250,199,117,0.15); border-color: rgba(250,199,117,0.4);  color: #e6b84a; }
.post-rank--platin  { background: rgba(181,212,244,0.15); border-color: rgba(181,212,244,0.35); color: #90bce0; }
.post-rank--diamant { background: rgba(206,203,246,0.15); border-color: rgba(206,203,246,0.4);  color: #b0a8f0; }
.post-rank--admin   { background: rgba(216,90,48,0.2);    border-color: rgba(216,90,48,0.5);    color: #ff7a50; }

/* Forumtitel-Kachel unterm Avatar: volle Breite, Inhalt zentriert */
.profile-title-tile.post-rank {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: none;
  text-align: center;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

/* ---------------------------------------------------------------
   ANSICHTS-MODUS
--------------------------------------------------------------- */
.view-section-title {
    display: flex;
    align-items: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #a0aaff;
    margin-top: 20px;
    padding: 7px 12px;
    background: rgba(108,123,255,0.08);
    border: 1px solid rgba(108,123,255,0.2);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}
.view-section-title:first-of-type { margin-top: 0; }

.view-block {
    padding: 14px 12px;
    border: 1px solid rgba(108,123,255,0.2);
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: rgba(0,0,0,0.18);
    margin-bottom: 2px;
}

.view-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 16px;
}
@media (max-width: 600px) { .view-2col { grid-template-columns: 1fr; } }

.view-item {
    display: flex;
    flex-direction: column;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.view-item:last-child { border-bottom: none; }

.view-item-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 2px;
}
.view-item-value {
    font-size: 13px;
    color: #ddd;
    word-break: break-word;
}
.view-item-link {
    color: #6c7bff;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.view-item-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   ACHIEVEMENT-TITEL UNTER DEM AVATAR
--------------------------------------------------------------- */
.profile-title-display {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #c0caff;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(108,123,255,0.1);
    border: 1px solid rgba(108,123,255,0.25);
    border-radius: 20px;
    display: inline-block;
}

/* ---------------------------------------------------------------
   PROFIL META KACHELN
--------------------------------------------------------------- */
.profile-meta-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}
.profile-meta-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(108,123,255,0.15);
    border-radius: 6px;
}
.profile-meta-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
}
.profile-meta-value {
    font-size: 13px;
    font-weight: 500;
    color: #ddd;
}

/* ---------------------------------------------------------------
   AVATAR EDIT-BUTTON
--------------------------------------------------------------- */
.avatar-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid rgba(108,123,255,0.4);
    background: rgba(108,123,255,0.1);
    color: #a0aaff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    box-sizing: border-box;
}
.avatar-edit-btn:hover {
    background: rgba(108,123,255,0.22);
    border-color: rgba(108,123,255,0.7);
    color: #fff;
}
.avatar-edit-btn--active {
    background: rgba(108,123,255,0.25);
    border-color: #6c7bff;
    color: #fff;
    box-shadow: 0 0 8px rgba(108,123,255,0.3);
}

/* ---------------------------------------------------------------
   EDIT-SEKTIONEN
--------------------------------------------------------------- */
.edit-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #a0aaff;
    margin-top: 20px;
    padding: 7px 12px;
    background: rgba(108,123,255,0.12);
    border: 1px solid rgba(108,123,255,0.25);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}
.edit-section-title:first-of-type { margin-top: 0; }

.edit-block {
    padding: 14px 12px;
    border: 1px solid rgba(108,123,255,0.25);
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: rgba(0,0,0,0.22);
    margin-bottom: 2px;
}
.edit-block:last-of-type { margin-bottom: 0; }

/* ── Sidebar Speichern-Button ── */
.avatar-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid rgba(76,175,80,0.5);
    background: rgba(76,175,80,0.12);
    color: #4caf50;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    box-sizing: border-box;
    font-family: inherit;
}
.avatar-save-btn:hover:not(:disabled) {
    background: rgba(76,175,80,0.22);
    border-color: #4caf50;
    color: #6dcc70;
}
.avatar-save-btn:disabled {
    opacity: .4;
    cursor: default;
}

/* ── Person 2-Spalten Grid ── */
.edit-person-title-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 4px;
}
.edit-person-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
@media (max-width: 600px) {
    .edit-person-grid { grid-template-columns: 1fr; }
}
.edit-person-col {
    padding: 12px 14px;
    border-right: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.edit-person-col:nth-child(even) { border-right: none; }
.edit-person-col:nth-last-child(-n+2) { border-bottom: none; }

.edit-person-field { display: flex; flex-direction: column; gap: 5px; }
.edit-person-field + .edit-person-field { margin-top: 12px; }

/* Vorname+Nachname nebeneinander + Sichtbarkeit rechts */
.edit-person-name-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.edit-person-name-row .edit-input { flex: 1; min-width: 0; }

/* Einzelnes Input + Sichtbarkeit rechts */
.edit-person-single-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.edit-person-single-row .edit-input:not(.person-vis-select) { flex: 1; min-width: 0; }
.edit-person-single-row .plz-lookup-wrap { flex: 1; min-width: 0; }

/* Sichtbarkeits-Dropdown im Person-Block */
.person-vis-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}
.person-vis-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    margin-left: auto;
}
.person-vis-select {
    width: auto !important;
    max-width: 120px;
}

.edit-section-vis {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.vis-label {
    font-size: 13px;
    color: #999;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}
.vis-select {
    padding-top: 3px;
    padding-bottom: 3px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.15);
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
}
.vis-select:focus { outline: none; border-color: #6c7bff; }

/* ---------------------------------------------------------------
   PLZ LOOKUP
--------------------------------------------------------------- */
.plz-lookup-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.plz-input { max-width: 110px; flex-shrink: 0; }

.plz-inline-result {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #ddd;
    white-space: nowrap;
}
.plz-inline-result strong { color: #fff; font-weight: 600; }
.plz-pin { font-size: 13px; line-height: 1; }

.plz-status { font-size: 12px; }
.plz-status--ok      { color: #4caf50; }
.plz-status--err     { color: #f44336; }
.plz-status--loading { color: #aaa; }

.plz-multi-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}
.plz-chip {
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(108,123,255,0.45);
    background: rgba(108,123,255,0.1);
    color: #ccc; font-size: 12px; cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.plz-chip:hover  { background: rgba(108,123,255,0.25); color: #fff; }
.plz-chip.active { background: #6c7bff; border-color: #6c7bff; color: #fff; font-weight: 600; }

/* ---------------------------------------------------------------
   EDIT-LAYOUT
--------------------------------------------------------------- */
.edit-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}
@media (max-width: 520px) { .edit-row-2col { grid-template-columns: 1fr; } }

.edit-field { margin-bottom: 12px; }
.edit-field:last-child { margin-bottom: 0; }
.edit-label {
    display: block; font-size: 12px; color: #aaa;
    margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}
.edit-hint { display: block; font-size: 11px; color: #666; margin-top: 4px; }
.edit-input {
    width: 100%; padding: 7px 10px; border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.3); color: #fff; font-size: 13px;
    box-sizing: border-box; transition: border-color 0.15s;
}
.edit-input--narrow { max-width: 200px; width: auto; }

/* ---------------------------------------------------------------
   AUTO-SUBSCRIBE TOGGLE
--------------------------------------------------------------- */
.edit-toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}
.edit-toggle-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.edit-toggle-track {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 21px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 11px;
    flex-shrink: 0;
    margin-top: 1px;
    transition: background 0.2s, border-color 0.2s;
}
.edit-toggle-thumb {
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background: #6a7490;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.edit-toggle-row input:checked + .edit-toggle-track {
    background: rgba(108,123,255,0.3);
    border-color: #6c7bff;
}
.edit-toggle-row input:checked + .edit-toggle-track .edit-toggle-thumb {
    transform: translateY(-50%) translateX(17px);
    background: #6c7bff;
}
.edit-toggle-label {
    font-size: 13px;
    color: #ddd;
    line-height: 1.4;
}
.edit-input:focus { outline: none; border-color: #6c7bff; }
.edit-actions { display: flex; align-items: center; gap: 12px; }

/* ---------------------------------------------------------------
   EDIT-MODE BUTTON (Schloss oben rechts)
--------------------------------------------------------------- */
.edit-mode-btn {
    width: 28px; height: 28px; border-radius: 4px;
    background: rgba(80,80,100,0.6); color: #fff;
    border: none; cursor: pointer; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.edit-mode-btn.active {
    background: #6c7bff;
    box-shadow: 0 0 10px rgba(108,123,255,0.5);
}

/* ---------------------------------------------------------------
   AVATAR DROP-ZONE
--------------------------------------------------------------- */
.avatar-drop-zone {
    position: relative; display: inline-block; border-radius: 6px;
}
.avatar-drop-zone.active { cursor: pointer; }
.avatar-drop-zone.drag-over .avatar_large { opacity: 0.5; }
.avatar-drop-zone.drag-over::after {
    content: '📂 Loslassen';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: #fff;
    background: rgba(108,123,255,0.5); border-radius: 6px;
    pointer-events: none;
}
.avatar-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    font-size: 100px; cursor: pointer; opacity: 0.85; transition: opacity 0.2s;
}
.avatar-drop-zone.active:hover .avatar-overlay,
.avatar-drop-zone.active:focus-within .avatar-overlay { opacity: 1; }

/* ---------------------------------------------------------------
   CROP MODAL
--------------------------------------------------------------- */
.crop-modal {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.75);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; box-sizing: border-box;
}
.crop-modal-box {
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; width: 100%; max-width: 520px;
    display: flex; flex-direction: column; overflow: hidden;
}
.crop-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 14px; color: #ddd;
}
.crop-close-btn {
    background: none; border: none; color: #aaa;
    font-size: 18px; cursor: pointer; line-height: 1;
}
.crop-close-btn:hover { color: #fff; }

.crop-stage {
    position: relative; width: 100%; aspect-ratio: 1 / 1;
    background: #111; overflow: hidden; cursor: grab; user-select: none;
}
.crop-stage:active { cursor: grabbing; }

#imgCanvas, #overlayCanvas {
    position: absolute; inset: 0;
    width: 100% !important; height: 100% !important; display: block;
}

.crop-modal-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; flex-direction: column; gap: 12px;
}
.zoom-row { display: flex; align-items: center; gap: 10px; }
.zoom-label {
    font-size: 12px; color: #888; min-width: 36px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.zoom-row input[type=range] { flex: 1; accent-color: #6c7bff; }
#zoomVal { font-size: 12px; color: #aaa; min-width: 36px; text-align: right; }
.crop-foot-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------
   BUTTONS & FEEDBACK
--------------------------------------------------------------- */
.btn-save { padding: 7px 16px; border-radius: 6px; border: none; background: #6c7bff; color: #fff; font-size: 13px; cursor: pointer; transition: background 0.15s; }
.btn-save:hover { background: #7f8fff; }
.btn-cancel { padding: 7px 16px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.15); background: transparent; color: #ccc; font-size: 13px; cursor: pointer; }
.btn-cancel:hover { background: rgba(255,255,255,0.07); }
.btn-danger-subtle {
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid rgba(231,76,60,0.3);
    background: rgba(231,76,60,0.08);
    color: rgba(231,76,60,0.8);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-danger-subtle:hover {
    background: rgba(231,76,60,0.15);
    border-color: rgba(231,76,60,0.6);
    color: #e74c3c;
}
.save-feedback { font-size: 13px; }
.feedback-ok   { color: #4caf50; }
.feedback-err  { color: #f44336; }

/* ── Forum Edit 2-Spalten ── */
.edit-forum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
@media (max-width: 600px) { .edit-forum-grid { grid-template-columns: 1fr; } }
.edit-forum-col {
    padding: 14px;
    border-right: 1px solid rgba(255,255,255,0.05);
}
.edit-forum-col--right { border-right: none; }

/* ── Geburtstag als Button ── */
.date-btn-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    position: relative;
}
.date-btn-wrap:hover {
    border-color: #6c7bff;
    background: rgba(108,123,255,0.06);
}
.date-btn-display { flex: 1; font-size: 13px; }
.date-btn-icon { font-size: 15px; opacity: .6; }

/* ---------------------------------------------------------------
   TAB: CLANS
--------------------------------------------------------------- */
.clan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
@media (max-width: 480px) {
    .clan-grid { grid-template-columns: 1fr; }
}
.clan-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    min-width: 0;
}
.clan-card:hover {
    background: rgba(108,123,255,0.1);
    border-color: rgba(108,123,255,0.35);
}
.clan-card-logo {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(0,0,0,0.3);
}
.clan-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.clan-card-name {
    font-size: 13px;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.clan-card-tag {
    font-size: 11px;
    color: #6c7bff;
    letter-spacing: 0.03em;
}

/* ---------------------------------------------------------------
   TAB: SPIELE (Steam)
--------------------------------------------------------------- */
.btn-steam-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 6px;
    background: #1b2838;
    border: 1px solid rgba(108,123,255,0.4);
    color: #c7d5e0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    align-self: flex-start;
}
.btn-steam-login:hover {
    background: #2a475e;
    border-color: rgba(108,123,255,0.7);
    color: #fff;
}
.btn-steam-login--disconnect {
    background: rgba(244,67,54,0.08);
    border-color: rgba(244,67,54,0.3);
    color: #f4a8a0;
}
.btn-steam-login--disconnect:hover {
    background: rgba(244,67,54,0.18);
    border-color: rgba(244,67,54,0.6);
    color: #fff;
}

.steam-link-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    font-size: 13px;
    flex-wrap: wrap;
}
.steam-connected-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4caf50;
    font-size: 13px;
}
.steam-explainer {
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.6;
}

.steam-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}
.steam-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.steam-logo-svg {
    width: 56px;
    height: 56px;
    fill: #6c7bff;
    animation: steam-spin 2s linear infinite;
    filter: drop-shadow(0 0 10px rgba(108,123,255,0.6));
}
.steam-logo-dot { fill: #fff; opacity: 0.9; }
@keyframes steam-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.steam-loader-bar {
    width: 180px; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,0.1); overflow: hidden;
}
.steam-loader-fill {
    height: 100%; border-radius: 2px;
    background: linear-gradient(90deg, #6c7bff, #a78bfa);
    animation: steam-bar 1.6s ease-in-out infinite;
    transform-origin: left;
}
@keyframes steam-bar {
    0%   { transform: scaleX(0);   margin-left: 0; }
    50%  { transform: scaleX(0.7); margin-left: 0; }
    100% { transform: scaleX(0);   margin-left: 100%; }
}
.steam-loader-text { font-size: 12px; color: #aaa; letter-spacing: 0.04em; }

.steam-error-inner {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; padding: 30px 0; text-align: center;
}

.steam-section-title {
    margin: 16px 0 8px; font-size: 14px; color: #ccc;
    display: flex; align-items: center; gap: 8px;
}

.steam-toolbar { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; flex-wrap: wrap; }
.steam-search-wrap { position: relative; width: 200px; flex-shrink: 0; }
.steam-search-input {
    width: 100%; padding: 7px 32px 7px 10px; border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15); background: rgba(0,0,0,0.3);
    color: #fff; font-size: 13px; box-sizing: border-box; transition: border-color 0.15s;
}
.steam-search-input:focus { outline: none; border-color: #6c7bff; }
.steam-search-input::placeholder { color: #666; }
.steam-search-icon {
    position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
    font-size: 13px; pointer-events: none; opacity: 0.5;
}
.steam-toolbar-title { font-size: 13px; color: #ccc; white-space: nowrap; }
.steam-game-count { font-size: 12px; color: #aaa; }
.steam-toolbar .steam-pagination { margin-left: auto; }

@media (max-width: 600px) {
    .steam-search-wrap { width: 100%; flex-basis: 100%; }
    .steam-toolbar .steam-pagination { margin-left: 0; flex-basis: 100%; justify-content: flex-start; }
}

.steam-game-card { align-self: start; }
.steam-playtime { font-size: 11px; color: #aaa; margin-top: 2px; }
.steam-no-results { margin-top: 12px; }

.steam-pagination { display: flex; justify-content: flex-end; }
.steam-pagination-bottom { margin-top: 16px; justify-content: flex-end; }
.steam-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.steam-page-btn {
    min-width: 32px; height: 32px; padding: 0 8px; border: none; border-radius: 6px;
    background: rgba(80,80,100,0.6); color: #fff; font-size: 13px; cursor: pointer;
    transition: background 0.15s;
}
.steam-page-btn:hover:not(:disabled) { background: rgba(100,100,130,0.85); }
.steam-page-btn.active               { background: #6c7bff; font-weight: bold; }
.steam-page-btn:disabled             { opacity: 0.3; cursor: default; }
.steam-page-dots { color: #aaa; font-size: 13px; padding: 0 4px; }

/* ---------------------------------------------------------------
   TAB: ERFOLGE (Achievements)
--------------------------------------------------------------- */
.ach-header { margin-bottom: 16px; }
.ach-header-top {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 8px;
}
.ach-stat-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.ach-stat-box {
    display: flex; flex-direction: column; gap: 2px;
    padding: 8px 14px; background: rgba(0,0,0,0.22);
    border: 1px solid rgba(108,123,255,0.18); border-radius: 8px; min-width: 88px;
}
.ach-stat-box--highlight {
    background: rgba(108,123,255,0.1);
    border-color: rgba(108,123,255,0.4);
    box-shadow: 0 0 0 1px rgba(108,123,255,0.08) inset;
}
.ach-stat-val { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.1; }
.ach-stat-box--highlight .ach-stat-val { color: #a0aaff; }
.ach-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: #888; }

.ach-overall-bar { height: 5px; background: rgba(255,255,255,0.07); border-radius: 99px; overflow: hidden; }
.ach-overall-fill { height: 100%; background: linear-gradient(90deg, #6c7bff, #a78bfa); border-radius: 99px; transition: width 0.6s ease; }

.ach-sort-wrap { display: flex; align-items: center; gap: 8px; }
.ach-sort-label { font-size: 11px; color: #888; white-space: nowrap; }
.ach-sort-switch {
    display: flex; gap: 4px; background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 7px; padding: 3px;
}
.ach-sort-btn {
    padding: 5px 11px; border: none; border-radius: 5px; background: transparent;
    color: #888; font-size: 11px; cursor: pointer; transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.ach-sort-btn:hover { color: #ccc; }
.ach-sort-btn.active { background: #6c7bff; color: #fff; font-weight: 600; }

.ach-section { margin-bottom: 18px; }
.ach-section-title {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: #a0aaff;
    padding: 5px 10px; background: rgba(108,123,255,0.08); border: 1px solid rgba(108,123,255,0.2);
    border-radius: 6px 6px 0 0; margin-bottom: 0;
}
.ach-list { border: 1px solid rgba(108,123,255,0.15); border-top: none; border-radius: 0 0 6px 6px; overflow: hidden; }

.ach-item {
    display: flex; align-items: center; gap: 10px; padding: 7px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.15s;
}
.ach-item:last-child { border-bottom: none; }
.ach-item--unlocked { background: rgba(108,123,255,0.05); }
.ach-item--locked   { background: rgba(0,0,0,0.2); }
.ach-item:hover     { background: rgba(108,123,255,0.12); }

.ach-icon {
    width: 32px; height: 32px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.ach-icon--unlocked { background: rgba(108,123,255,0.2); border: 1px solid rgba(108,123,255,0.4); }
.ach-icon--locked { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); filter: grayscale(1); opacity: 0.45; }

.ach-info { flex: 1; min-width: 0; }
.ach-name {
    font-size: 12px; font-weight: 600; color: #FCFCFE;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-bottom: 1px; line-height: 1.3;
}
.ach-item--locked .ach-name { color: #888; }
.ach-name-text { display: flex; align-items: center; gap: 5px; min-width: 0; }
.ach-badge-done {
    font-size: 9px; background: rgba(76,175,80,0.2); border: 1px solid rgba(76,175,80,0.4);
    color: #4caf50; border-radius: 99px; padding: 0px 5px; line-height: 1.4;
}
.ach-desc { font-size: 10px; color: #999; margin-bottom: 4px; line-height: 1.3; }
.ach-item--locked .ach-desc { color: #777; }

.ach-progress-wrap { display: flex; align-items: center; gap: 7px; }
.ach-progress-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.07); border-radius: 99px; overflow: hidden; }
.ach-progress-fill { height: 100%; background: rgba(255,255,255,0.15); border-radius: 99px; transition: width 0.5s ease; }
.ach-progress-fill--active { background: linear-gradient(90deg, #6c7bff, #a78bfa); }
.ach-progress-label { font-size: 10px; color: #666; white-space: nowrap; min-width: 62px; text-align: right; }

.ach-unlocked-date { font-size: 10px; color: #4caf50; opacity: 0.7; white-space: nowrap; flex-shrink: 0; }

.ach-points { font-size: 12px; font-weight: 700; color: #555; text-align: right; white-space: nowrap; min-width: 44px; }
.ach-points--done { color: #a0aaff; }
.ach-points-label { display: block; font-size: 9px; font-weight: 400; color: #555; text-transform: uppercase; letter-spacing: 0.04em; }

@media (max-width: 480px) {
    .ach-item { gap: 8px; padding: 6px 8px; }
    .ach-icon { width: 28px; height: 28px; font-size: 14px; }
    .ach-header-top { flex-direction: column; align-items: stretch; }
    .ach-stat-grid { gap: 8px; }
    .ach-stat-box { flex: 1; min-width: 0; padding: 7px 10px; }
    .ach-sort-wrap { justify-content: space-between; }
    .ach-sort-switch { flex: 1; }
    .ach-sort-btn { flex: 1; }
    .ach-name { flex-wrap: wrap; }
    .ach-unlocked-date { font-size: 9px; }
}