/* ============================================
   СвойЛот — Bento Profile 2.2 (Clean)
   ============================================ */

:root {
    --bg: #09090b;
    --card-bg: #18181b;
    --card-hover: #27272a;
    --border: #27272a;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --text-main: #fafafa;
    --text-muted: #a1a1aa;
    --success: #22c55e;
    --gold: #c9a84c;
    --red: #ef4444;
    --radius: 24px;
}

.profile-bento-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

/* ОБЛОЖКА */
.profile-cover-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a3e 0%, #0f0f23 50%, #6366f1 100%);
    margin-bottom: -15px;
    z-index: 0;
}
.profile-cover-wrapper .cover-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.profile-cover-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
    z-index: 1;
}
.cover-edit-btn {
    position: absolute;
    top: 12px; right: 16px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: 0.2s;
}
.cover-edit-btn:hover {
    background: rgba(0,0,0,0.8);
    border-color: rgba(255,255,255,0.3);
}

/* BENTO GRID */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}


/* IDENTITY */
.block-identity {
    grid-column: span 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    background: radial-gradient(circle at top right, #2e2e35 0%, var(--card-bg) 60%);
}
.id-avatar-wrapper { position: relative; flex-shrink: 0; }
.id-avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg);
    box-shadow: 0 0 0 2px var(--accent);
}
.online-dot {
    position: absolute;
    bottom: 6px; right: 6px;
    width: 16px; height: 16px;
    background: var(--success);
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 10px rgba(34,197,94,0.5);
}
.id-info { flex: 1; min-width: 0; }
.id-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.id-name {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}
.verified-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(34,197,94,0.1);
    color: var(--success);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.id-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge.verified { background: rgba(34,197,94,0.1); color: var(--success); }
.badge.role-admin { background: rgba(249,115,22,0.15); color: #f97316; }
.badge.role-mod { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.badge.role-seller { background: rgba(99,102,241,0.1); color: var(--accent); }
.badge.social-vk { background: rgba(0,119,255,0.15); color: #4a9eff; }
.badge.social-ya { background: rgba(255,0,0,0.1); color: #ff4d4d; }
.badge.badge-2fa { background: rgba(16,185,129,0.1); color: #34d399; }
.badge.online { background: rgba(34,197,94,0.1); color: var(--success); }
.id-bio {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 400px;
    margin: 0 0 16px;
}
.id-mini-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.mini-stat { text-align: center; }
.mini-stat-val { display: block; font-size: 18px; font-weight: 700; color: #fff; }
.mini-stat-lbl { font-size: 11px; color: var(--text-muted); }

/* BALANCE */
.block-balance {
    grid-column: span 1;
    background: linear-gradient(145deg, rgba(99,102,241,0.1) 0%, rgba(0,0,0,0) 100%);
    border-color: rgba(99,102,241,0.3);
    justify-content: center;
    align-items: center;
    text-align: center;
}
.bal-label {
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.bal-amount {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 20px;
}
.bal-buttons { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.bal-btn {
    border: none;
    padding: 10px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    transition: 0.2s;
    text-align: center;
    display: block;
}
.bal-btn-fill {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.bal-btn-fill:hover { filter: brightness(1.1); transform: scale(1.02); }
.bal-btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid var(--border);
}
.bal-btn-outline:hover { background: var(--card-hover); border-color: #fff; }

/* STATS */
.block-stats {
    grid-column: span 1;
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    align-self: start;
    margin-top: 2px;
}
.block-stats:hover { transform: none; box-shadow: none; }
.stat-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: 0.2s;
}
.stat-item:hover { }
.stat-val { font-size: 20px; font-weight: 700; color: #fff; }
.stat-val.stat-green { color: var(--success); }
.stat-lbl { font-size: 12px; color: var(--text-muted); }

/* TABS */
.block-actions {
    grid-column: span 4;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 12px;
}
.nav-links {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.nav-link {
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
    white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-link.active { background: #fff; color: #000; }
.action-btns { display: flex; gap: 10px; flex-shrink: 0; }
.btn-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}
.btn-icon:hover { background: var(--card-hover); border-color: #fff; }

/* CONTENT */
.block-content {
    grid-column: span 3;
    min-height: 400px;
}
.content-empty {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

/* SIDEBAR */
.block-sidebar {
    grid-column: span 1;
    background: linear-gradient(180deg, #18181b 0%, #0f0f11 100%);
    align-self: start;
    position: sticky;
    top: 16px;
    padding: 24px;
}
.sidebar-inner { display: flex; flex-direction: column; gap: 16px; }
.sidebar-title { margin: 0; font-size: 18px; font-weight: 700; color: #fff; }
.sidebar-text { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.promo-box {
    background: rgba(255,255,255,0.03);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.promo-label { font-size: 12px; color: var(--text-muted); }
.promo-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    word-break: break-all;
    background: rgba(0,0,0,0.3);
    padding: 8px;
    border-radius: 8px;
}
.promo-copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}
.promo-copy-btn:hover { background: var(--card-hover); }

/* ============================================
   АДАПТИВ: ПЛАНШЕТ (≤1024px)
   ============================================ */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .block-identity { grid-column: span 2; }
    .block-actions {
        grid-column: span 2;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .nav-links {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .nav-links::-webkit-scrollbar { height: 0; }
    .action-btns { justify-content: flex-end; }
    .block-content { grid-column: span 2; }
    .block-sidebar { grid-column: span 2; position: static; }
}

/* ============================================
   АДАПТИВ: ТЕЛЕФОН (≤600px)
   ============================================ */
@media (max-width: 600px) {
    .profile-bento-wrapper { padding: 0; }
    .bento-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 8px;
    }
    .bento-card { border-radius: 16px; padding: 16px; }
    
    /* Identity */
    .block-identity {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .id-name-row { justify-content: center; }
    .id-name { font-size: 22px; }
    .id-avatar { width: 80px; height: 80px; }
    .id-badges { justify-content: center; }
    .id-bio { text-align: center; max-width: 100%; }
    .id-mini-stats { justify-content: center; gap: 16px; }
    .mini-stat-val { font-size: 16px; }
    
    /* Stats */
    .block-stats {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        gap: 8px;
    }
    
    /* Tabs — скроллятся горизонтально */
        /* Tabs */
    .block-actions {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }
    .nav-links {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        padding-bottom: 4px;
        width: 100%;
    }
    .nav-links::-webkit-scrollbar { height: 0; }
    .nav-link {
        padding: 8px 14px !important;
        font-size: 13px !important;
        border-radius: 8px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .action-btns {
        display: flex;
        justify-content: flex-end;
        width: 100%;
    }
    
    /* Cover */
    .profile-cover-wrapper { height: 140px; border-radius: 0; }
}

.id-status {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
/* Модальное окно «О продавце» */
.bio-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}
.bio-modal-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.bio-modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: 0.2s;
}
.bio-modal-close:hover { color: #fff; background: var(--card-hover); }
.bio-modal-title { margin: 0 0 16px; font-size: 20px; color: #fff; }
.bio-modal-text { color: var(--text-muted); line-height: 1.7; font-size: 14px; }
.bio-info-icon {
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
    flex-shrink: 0;
    display: flex;
}
.bio-info-icon:hover { opacity: 1; }
.sidebar-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    display: block;
    margin-top: 12px;
}
.sidebar-link:hover { text-decoration: underline; }
.mini-stat-info {
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
}
.mini-stat-info:hover {
    opacity: 1;
}
