/* ==========================================================================
   social.css — Online menü öğeleri: oda (lobi), arkadaşlar, liderlik, eşleşme penceresi
   ========================================================================== */

/* ---------- Menü ek parçaları ---------- */
.rating-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
}
.rating-card > div { display: flex; flex-direction: column; gap: 2px; }
.rating-card small { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.rating-card b { font-size: 20px; font-weight: 900; }
.net-state { flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 12px; font-weight: 700; color: var(--text-dim); }
#net-dot { width: 10px; height: 10px; border-radius: 50%; background: #9ca3af; box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.25); }
#net-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28); }
#net-dot.connecting { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.4; } }

.btn-row { display: flex; gap: 10px; width: 100%; }
.btn-row .btn { flex: 1; padding: 12px 8px; font-size: 15px; }
.tile-grid.three { grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; }
.tile .count-badge { top: 4px; right: 8px; }

/* ---------- Oda (lobi) ---------- */
.room-code-card {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    text-align: center;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    box-shadow: inset 0 0 0 1px var(--border);
}
.room-code-card small { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.room-code {
    margin: 4px 0 10px;
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 900;
    letter-spacing: 0.22em;
    color: var(--accent);
    padding-left: 0.22em;
}
.room-code-card .btn-row .btn { font-size: 14px; padding: 10px 6px; }

.seat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.lobby-seat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px 10px;
    min-height: 118px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
    text-align: center;
}
.lobby-seat.empty { border: 2px dashed var(--border); box-shadow: none; background: transparent; justify-content: center; color: var(--text-dim); }
.lobby-seat .avatar { width: 48px; height: 48px; flex: 0 0 auto; font-size: 24px; }
.lobby-seat b { font-size: 14px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-seat small { font-size: 11px; color: var(--text-dim); }
.lobby-seat .crown { position: absolute; top: 6px; left: 8px; font-size: 16px; }
.lobby-seat .x-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--surface-2);
    font-size: 14px;
    line-height: 26px;
}
.lobby-seat.offline { opacity: 0.55; }
.lobby-seat .btn-small { margin-top: 2px; }

.lobby-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.wait-note { text-align: center; padding: 14px; font-size: 14px; color: var(--text-dim); }

/* ---------- Arkadaşlar ---------- */
.friend-code-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
}
.friend-code-card small { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.friend-code-card b { font-family: var(--font-display); font-size: 26px; letter-spacing: 0.18em; color: var(--accent); }
.add-row { display: flex; gap: 8px; margin-bottom: 14px; }
.add-row .text-input { text-transform: uppercase; letter-spacing: 0.12em; }
.add-row .btn { flex: 0 0 auto; }

.section-title { margin: 14px 2px 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }

.person {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
}
.person .avatar { flex: 0 0 auto; width: 42px; height: 42px; font-size: 21px; position: relative; overflow: visible; }
.person .dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #9ca3af; border: 2px solid var(--surface-solid); }
.person .dot.on { background: #22c55e; }
.person .dot.busy { background: #f59e0b; }
.person .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person .who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .who small { font-size: 12px; color: var(--text-dim); }
.person .acts { display: flex; gap: 6px; flex: 0 0 auto; }
.person .acts .btn-small { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.mini-x { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); font-size: 16px; }

/* ---------- Liderlik ---------- */
.lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin-bottom: 6px;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
}
.lb-row.me { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface-2); }
.lb-rank { flex: 0 0 34px; text-align: center; font-weight: 900; font-size: 15px; color: var(--text-dim); }
.lb-row:nth-child(1) .lb-rank { font-size: 22px; }
.lb-row:nth-child(2) .lb-rank { font-size: 22px; }
.lb-row:nth-child(3) .lb-rank { font-size: 22px; }
.lb-row .avatar { flex: 0 0 auto; width: 38px; height: 38px; font-size: 19px; }
.lb-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-row .who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row .who small { font-size: 11px; color: var(--text-dim); }
.lb-score { font-size: 18px; font-weight: 900; color: var(--accent); }
.my-rank-card {
    position: sticky;
    bottom: 0;
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 16px;
    background: var(--surface-solid);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.25), inset 0 0 0 2px var(--accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
}

/* ---------- Eşleşme / davet / sonuç ---------- */
.queue-box { text-align: center; }
.queue-box .spinner {
    width: 54px;
    height: 54px;
    margin: 6px auto 14px;
    border-radius: 50%;
    border: 5px solid var(--surface-2);
    border-top-color: var(--accent);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.queue-box .big { font-size: 34px; font-weight: 900; color: var(--accent); }

.place-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.place-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 14px;
    background: var(--surface-2);
    font-weight: 700;
}
.place-row.me { box-shadow: inset 0 0 0 2px var(--accent); }
.place-row .medal { flex: 0 0 30px; font-size: 22px; text-align: center; }
.place-row .avatar { flex: 0 0 auto; width: 32px; height: 32px; font-size: 16px; }
.place-row .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-row .pt { font-weight: 900; font-size: 18px; }

.rating-delta { text-align: center; margin: 4px 0 8px; font-size: 14px; font-weight: 800; color: var(--text-dim); }
.rating-delta b { display: block; font-size: 34px; }
.rating-delta b.up { color: var(--good); }
.rating-delta b.down { color: var(--bad); }

.deal-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.deal-table th { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); padding: 4px 2px; }
.deal-table td { padding: 6px 2px; text-align: center; border-top: 1px solid var(--border); }
.deal-table td.neg { color: var(--bad); font-weight: 800; }
.deal-table td.pos { color: var(--good); font-weight: 800; }
.deal-table td:first-child, .deal-table th:first-child { text-align: left; padding-left: 4px; }
.deal-bid { font-size: 13px; text-align: center; margin: 4px 0 8px; color: var(--text-dim); }
.deal-bid b { color: var(--text); }

.emote-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.emote-grid button { aspect-ratio: 1; border-radius: 14px; background: var(--surface-2); font-size: 30px; }
.emote-grid button:active { transform: scale(0.92); }

.code-input { text-align: center; font-size: 28px !important; letter-spacing: 0.3em; text-transform: uppercase; padding-left: 0.3em !important; }
