/* ════════════════════════════════════════════════════════
   Social Theme — Profile, Feed, Friends, Messages, Settings
   ════════════════════════════════════════════════════════ */

:root {
  --pf-card: linear-gradient(180deg, rgba(20,12,3,.90), rgba(8,5,2,.92));
  --pf-border: rgba(255,170,40,.18);
  --pf-border-hi: rgba(255,170,40,.32);
}

.social-shell { max-width: 1180px; margin: 24px auto; padding: 0 20px; }
.social-grid  { display: grid; grid-template-columns: 240px 1fr 280px; gap: 20px; align-items: flex-start; }
@media (max-width: 980px) { .social-grid { grid-template-columns: 1fr; } .side-l, .side-r { display: none; } }

/* ── Cards ─────────────────────────────────────────── */
.card-gold {
    background: var(--pf-card);
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.card-gold h3 { font-family: 'Oswald', sans-serif; letter-spacing: .08em; font-size: 1rem; margin-bottom: 10px; color: var(--gold-lt); }
.card-gold + .card-gold { margin-top: 16px; }

/* ════════════════════════════════════════════════════
   PROFIL — Facebook-Style Hero
   ════════════════════════════════════════════════════ */
.pf-hero {
    background: var(--pf-card);
    border: 1px solid var(--pf-border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.pf-banner {
    position: relative;
    width: 100%;
    height: 320px;
    background-size: cover;
    background-position: center;
    background-color: rgba(20,10,2,.6);
}
.pf-banner.empty {
    background: linear-gradient(135deg, rgba(255,170,40,.22), rgba(40,15,3,.85)),
                radial-gradient(circle at 30% 40%, rgba(255,200,80,.15), transparent 60%);
}
.pf-banner-empty-text {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: rgba(255,255,255,.5); pointer-events: none;
    font-size: 1rem; letter-spacing: .12em; text-transform: uppercase;
}
.pf-banner-empty-text .crest {
    font-size: 3.4rem; margin-bottom: 12px; opacity: .65;
    filter: drop-shadow(0 4px 12px rgba(255,170,40,.4));
}

.pf-banner-actions {
    position: absolute; top: 16px; right: 16px;
    display: flex; gap: 8px; z-index: 4;
}
.pf-icon-btn {
    background: rgba(0,0,0,.55); color: #fff;
    border: 1px solid rgba(255,255,255,.18);
    width: 40px; height: 40px; border-radius: 99px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: .15s; font-size: 1rem;
    backdrop-filter: blur(4px);
}
.pf-icon-btn:hover { background: rgba(255,170,40,.6); border-color: rgba(255,255,255,.4); transform: translateY(-1px); }

.pf-identity {
    position: relative;
    padding: 0 32px 24px;
    margin-top: -90px;
    display: flex;
    gap: 24px;
    align-items: flex-end;
}
.pf-avatar-wrap { position: relative; flex-shrink: 0; }
.pf-avatar {
    width: 168px; height: 168px; border-radius: 50%;
    background-color: rgba(40,20,5,.85);
    background-size: cover; background-position: center;
    border: 5px solid rgba(15,8,2,.96);
    box-shadow: 0 8px 24px rgba(0,0,0,.55);
}
.pf-avatar.empty { display: flex; align-items: center; justify-content: center; font-size: 4rem; color: rgba(255,170,40,.5); }
.pf-avatar-online {
    position: absolute; bottom: 12px; right: 12px;
    width: 24px; height: 24px; border-radius: 50%;
    background: #4ade80; border: 4px solid rgba(15,8,2,.96);
    box-shadow: 0 0 8px rgba(74,222,128,.6);
}
.pf-avatar-online.offline { background: #6b6b6b; box-shadow: none; }
.pf-avatar-cam {
    position: absolute; bottom: 8px; left: 8px;
    background: rgba(255,170,40,.95); color: #1a0a02;
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: 4px solid rgba(15,8,2,.96);
    font-size: 1.05rem; transition: .15s;
}
.pf-avatar-cam:hover { background: rgba(255,210,90,1); transform: scale(1.08); }

.pf-identity-info { flex: 1; padding-bottom: 8px; }
.pf-name {
    font-family: 'Oswald', sans-serif; font-size: 2.1rem; letter-spacing: .06em;
    margin: 0 0 4px; color: #fff;
}
.pf-meta {
    display: flex; gap: 14px; flex-wrap: wrap;
    color: var(--muted); font-size: .85rem;
    margin-bottom: 10px;
}
.pf-meta .pill {
    background: rgba(255,170,40,.08); border: 1px solid var(--pf-border);
    border-radius: 99px; padding: 3px 10px; color: rgba(255,255,255,.75);
    display: inline-flex; gap: 5px; align-items: center;
}
.pf-bio { color: rgba(255,255,255,.78); font-size: .94rem; line-height: 1.55; max-width: 640px; }

.pf-actions {
    padding: 0 32px 22px;
    display: flex; gap: 8px; flex-wrap: wrap;
    border-bottom: 1px solid var(--pf-border);
}
.pf-action {
    padding: 9px 16px; border-radius: 7px; font-size: .85rem;
    border: 1px solid var(--pf-border-hi); background: rgba(255,170,40,.1);
    color: var(--gold-lt); cursor: pointer; transition: .15s; text-decoration: none;
    font-family: inherit; display: inline-flex; align-items: center; gap: 6px;
}
.pf-action:hover { background: rgba(255,170,40,.22); transform: translateY(-1px); }
.pf-action.solid { background: linear-gradient(180deg, #ffb84a, #e89a18); color: #1a0a02; border-color: #ffb84a; font-weight: 600; }
.pf-action.solid:hover { background: linear-gradient(180deg, #ffc870, #f0a728); }
.pf-action.danger { border-color: rgba(255,80,80,.4); color: #ff9999; background: rgba(255,80,80,.08); }
.pf-action.danger:hover { background: rgba(255,80,80,.22); }
.pf-action[disabled] { opacity: .55; cursor: not-allowed; }

.pf-stats {
    display: flex; gap: 32px; padding: 16px 32px;
    background: rgba(0,0,0,.25);
    border-top: 1px solid rgba(255,170,40,.08);
}
.pf-stat { text-align: left; }
.pf-stat .v { font-size: 1.5rem; font-weight: 700; color: var(--gold-lt); font-family: 'Oswald',sans-serif; }
.pf-stat .l { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

@media (max-width: 720px) {
    .pf-banner { height: 200px; }
    .pf-identity { flex-direction: column; align-items: flex-start; gap: 14px; padding: 0 20px 18px; margin-top: -70px; }
    .pf-avatar { width: 130px; height: 130px; }
    .pf-name { font-size: 1.6rem; }
    .pf-stats { padding: 14px 20px; gap: 22px; flex-wrap: wrap; }
    .pf-actions { padding: 0 20px 18px; }
}

/* ── Posts ─────────────────────────────────────────── */
.post-card {
    background: var(--pf-card);
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 14px;
    transition: .15s;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.post-card:hover { border-color: var(--pf-border-hi); }
.post-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.post-avatar { width: 44px; height: 44px; border-radius: 50%; background-size: cover; background-position: center; background-color: rgba(40,20,5,.7); flex-shrink: 0; }
.post-author { font-weight: 600; }
.post-author a { color: var(--gold-lt); }
.post-time   { font-size: .72rem; color: var(--muted); }
.post-content { font-size: .94rem; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; margin-bottom: 10px; }
.post-image { width: 100%; max-height: 600px; object-fit: cover; border-radius: 6px; margin-bottom: 10px; cursor: zoom-in; }
.post-actions { display: flex; gap: 14px; padding-top: 10px; border-top: 1px solid rgba(255,170,40,.08); }
.post-act-btn {
    display: flex; align-items: center; gap: 6px;
    background: none; border: none; color: rgba(255,255,255,.6);
    cursor: pointer; font-size: .85rem; padding: 4px 0; transition: .15s;
}
.post-act-btn:hover, .post-act-btn.active { color: var(--gold-lt); }

.post-composer { display: flex; gap: 12px; padding: 14px; }
.post-composer textarea {
    flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--pf-border);
    border-radius: 6px; color: #fff; font-family: inherit; font-size: .92rem;
    padding: 10px 12px; resize: vertical; min-height: 80px;
}
.composer-bar { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.composer-bar select { background: rgba(255,255,255,.04); border: 1px solid var(--pf-border); color: #fff; padding: 6px 10px; border-radius: 4px; font-size: .82rem; }

.privacy-badge {
    display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .65rem;
    background: rgba(255,170,40,.1); color: var(--gold-lt);
    text-transform: uppercase; letter-spacing: .08em;
}

/* ── Sidebar Nav ───────────────────────────────────── */
.side-nav { padding: 10px; }
.side-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 6px; transition: .15s;
    color: rgba(255,255,255,.62); font-size: .9rem;
}
.side-nav a:hover, .side-nav a.active {
    background: rgba(255,170,40,.1); color: var(--gold-lt);
}
.side-nav .badge {
    background: #e94a4a; color: #fff; border-radius: 99px;
    font-size: .65rem; padding: 1px 7px; margin-left: auto;
}
.side-nav .icon { width: 22px; text-align: center; font-size: 1rem; }

/* ── Online-Liste ─────────────────────────────────── */
.online-item { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; transition: .15s; }
.online-item:hover { background: rgba(255,170,40,.08); }
.online-item .av { position: relative; width: 36px; height: 36px; border-radius: 50%; background-size: cover; background-color: rgba(40,20,5,.7); flex-shrink: 0; }
.online-item .av::after { content: ''; position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: #4ade80; border: 2px solid rgba(15,8,2,1); }
.online-item .av.offline::after { background: #777; }
.online-item .name { font-size: .85rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Friend-Cards ─────────────────────────────────── */
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 12px; }
.friend-card { background: var(--pf-card); border: 1px solid var(--pf-border); border-radius: 10px; padding: 14px; text-align: center; transition: .15s; }
.friend-card:hover { border-color: var(--pf-border-hi); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.friend-card .av { width: 80px; height: 80px; border-radius: 50%; background-size: cover; background-color: rgba(40,20,5,.7); margin: 0 auto 10px; border: 2px solid rgba(255,170,40,.2); }
.friend-card .nm { font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.friend-card .st { font-size: .7rem; color: var(--muted); margin-bottom: 10px; }

/* ── DM-Layout ─────────────────────────────────────── */
.dm-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; min-height: 600px; }
.dm-list { background: var(--pf-card); border: 1px solid var(--pf-border); border-radius: 10px; overflow: auto; max-height: 720px; }
.dm-conv-item { display: flex; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid rgba(255,255,255,.04); cursor: pointer; transition: .15s; }
.dm-conv-item:hover, .dm-conv-item.active { background: rgba(255,170,40,.1); }
.dm-conv-item .av { width: 42px; height: 42px; border-radius: 50%; background-size: cover; background-color: rgba(40,20,5,.7); flex-shrink: 0; }
.dm-conv-item .meta { flex: 1; min-width: 0; }
.dm-conv-item .nm { font-weight: 600; font-size: .88rem; margin-bottom: 2px; }
.dm-conv-item .lm { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-conv-item .un { background: #e94a4a; color: #fff; border-radius: 99px; font-size: .65rem; padding: 1px 7px; }

.dm-thread { background: var(--pf-card); border: 1px solid var(--pf-border); border-radius: 10px; display: flex; flex-direction: column; max-height: 720px; }
.dm-thread-head { padding: 14px; border-bottom: 1px solid rgba(255,170,40,.1); display: flex; gap: 12px; align-items: center; }
.dm-thread-body { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.dm-msg { padding: 9px 14px; border-radius: 14px; max-width: 70%; font-size: .9rem; line-height: 1.4; word-wrap: break-word; }
.dm-msg.in  { background: rgba(255,255,255,.06); align-self: flex-start; }
.dm-msg.out { background: linear-gradient(135deg, rgba(255,170,40,.35), rgba(255,140,0,.25)); align-self: flex-end; color: #1a0a02; }
.dm-msg-time { font-size: .65rem; color: var(--muted); margin-top: 4px; }
.dm-thread-foot { padding: 12px; border-top: 1px solid rgba(255,170,40,.1); display: flex; gap: 8px; }
.dm-thread-foot input { flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--pf-border); color: #fff; padding: 10px 12px; border-radius: 6px; font-size: .9rem; }

.topbar-user-mini { display: flex; gap: 10px; align-items: center; }
.topbar-user-mini .av { width: 32px; height: 32px; border-radius: 50%; background-size: cover; background-color: rgba(40,20,5,.7); }

.btn-action {
    padding: 7px 14px; border-radius: 6px; font-size: .82rem;
    border: 1px solid var(--pf-border-hi); background: rgba(255,170,40,.1);
    color: var(--gold-lt); cursor: pointer; transition: .15s; text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-action:hover { background: rgba(255,170,40,.22); }
.btn-action.solid { background: linear-gradient(180deg, #ffb84a, #e89a18); color: #1a0a02; border-color: #ffb84a; font-weight: 600; }
.btn-action.solid:hover { background: linear-gradient(180deg, #ffc870, #f0a728); }
.btn-action.danger { border-color: rgba(255,80,80,.4); color: #ff9999; background: rgba(255,80,80,.08); }
.btn-action.danger:hover { background: rgba(255,80,80,.2); }

/* ── Toast für Upload-Fehler etc. ─────────────────── */
.tfrp-toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    background: rgba(15,8,2,.96); border: 1px solid var(--pf-border-hi);
    border-radius: 10px; padding: 14px 18px;
    color: #fff; font-size: .88rem; max-width: 360px;
    box-shadow: 0 10px 30px rgba(0,0,0,.55);
    animation: tfrpToastIn .25s ease-out;
}
.tfrp-toast.ok  { border-color: rgba(70,200,90,.5); }
.tfrp-toast.err { border-color: rgba(255,80,80,.5); }
@keyframes tfrpToastIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
