/* ══════════════════════════════════════════════════════════════
   PROFILEVIEWER.CSS — Roblox Profile Viewer page styles
   Requires: base.css, biogen.css
   ══════════════════════════════════════════════════════════════ */

/* ── Search Section ── */
.pv-search {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 20px 32px;
}

.pv-search-card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 8px 40px var(--shadow);
    position: relative;
    overflow: hidden;
}

.pv-search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue), var(--mint), var(--yellow));
    border-radius: 28px 28px 0 0;
}

.pv-search-label {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .08em;
    display: block;
    margin-bottom: 10px;
    text-align: center;
}

.pv-search-row {
    display: flex;
    gap: 10px;
}

.pv-search-row input {
    flex: 1;
    background: #faf5ff;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    font-size: .95rem;
    color: var(--text);
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-weight: 500;
    outline: none;
    transition: transform .25s, opacity .25s, box-shadow .25s;
}

.pv-search-row input::placeholder {
    color: #c4b5d4;
}

.pv-search-row input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, .15);
}

.pv-search-row button {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: white;
    border: none;
    border-radius: 14px;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: transform .25s, opacity .25s, box-shadow .25s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pv-search-row button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(255, 107, 157, .3);
}

.pv-search-row button:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.pv-search-hint {
    margin-top: 12px;
    font-size: .82rem;
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
}

/* ── Loading State ── */
.pv-loading {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
    display: none;
}

.pv-loading.visible {
    display: block;
}

.pv-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: pvSpin .8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes pvSpin {
    to { transform: rotate(360deg); }
}

.pv-loading-text {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 600;
}

/* ── Error State ── */
.pv-error {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 20px 32px;
    display: none;
}

.pv-error.visible {
    display: block;
}

.pv-error-card {
    background: var(--bg-card);
    border: 3px solid #fecaca;
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(248, 113, 113, .1);
}

.pv-error-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.pv-error-title {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.pv-error-msg {
    font-size: .9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   HORIZONTAL PROFILE RESULT
   ══════════════════════════════════════════════════════════════ */

.pv-result {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: none;
}

.pv-result.visible {
    display: block;
}

.pv-result-header {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

/* ── Horizontal Container ── */
.pv-horizontal {
    display: flex;
    gap: 0;
    background: #2b2d31;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .3);
    border: 3px solid #3a3c40;
}

/* ── Left: Avatar Side ── */
.pv-h-left {
    flex-shrink: 0;
    width: 280px;
    background: linear-gradient(180deg, #1a5fb4 0%, #2a6dd4 40%, #232428 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px 24px;
    gap: 20px;
}

.pv-h-avatar-wrap {
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-h-avatar {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .5));
    transition: transform .3s;
}

.pv-h-avatar:hover {
    transform: scale(1.06);
}

.pv-h-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* ── Right: Info Side ── */
.pv-h-right {
    flex: 1;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

/* ── Name ── */
.pv-h-name-area {
    border-bottom: 2px solid #3a3c40;
    padding-bottom: 16px;
}

.pv-h-display-name {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pv-verified-badge {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #3584e4, #62a0ea);
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: .7rem;
    color: white;
    flex-shrink: 0;
}

.pv-h-username {
    font-size: .95rem;
    color: #a5a7ab;
    font-weight: 500;
    margin-top: 2px;
}

.pv-h-user-id {
    font-size: .78rem;
    color: #6d6f73;
    font-weight: 500;
    margin-top: 2px;
}

/* ── Stats ── */
.pv-h-stats {
    display: flex;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #232428;
    border: 2px solid #3a3c40;
}

.pv-h-stat {
    flex: 1;
    text-align: center;
    padding: 14px 10px;
    position: relative;
}

.pv-h-stat + .pv-h-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: #3a3c40;
}

.pv-h-stat-num {
    display: block;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.pv-h-stat-label {
    display: block;
    font-size: .72rem;
    color: #a5a7ab;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ── Bio ── */
.pv-h-bio {
    background: #232428;
    border-radius: 12px;
    padding: 16px 18px;
    border: 2px solid #3a3c40;
}

.pv-h-section-label {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: .76rem;
    font-weight: 600;
    color: #a5a7ab;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}

.pv-h-bio-text {
    font-size: .9rem;
    color: #d4d6d9;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.pv-bio-empty {
    color: #6d6f73;
    font-style: italic;
}

/* ── Info Row (inline items) ── */
.pv-h-info-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pv-h-info {
    flex: 1;
    min-width: 120px;
    background: #232428;
    border: 2px solid #3a3c40;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: border-color .2s;
}

.pv-h-info:hover {
    border-color: #4a4c50;
}

.pv-h-info-icon {
    font-size: 1rem;
}

.pv-h-info-label {
    font-size: .68rem;
    font-weight: 600;
    color: #6d6f73;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.pv-h-info-value {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: .88rem;
    font-weight: 600;
    color: #d4d6d9;
}

/* ── Previous Usernames ── */
.pv-h-prev-names {
    background: #232428;
    border-radius: 12px;
    padding: 16px 18px;
    border: 2px solid #3a3c40;
}

.pv-h-prev-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pv-prev-name-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: #2b2d31;
    border: 2px solid #3a3c40;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 600;
    color: #a5a7ab;
    transition: transform .2s, opacity .2s, box-shadow .2s;
}

.pv-prev-name-chip:hover {
    border-color: var(--purple);
    color: #d4d6d9;
}

.pv-no-prev-names {
    font-size: .85rem;
    color: #6d6f73;
    font-style: italic;
}

/* ── Action Buttons ── */
.pv-btn-roblox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    background: linear-gradient(135deg, #1a5fb4, #3584e4);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: transform .25s, opacity .25s, box-shadow .25s;
    text-decoration: none;
}

.pv-btn-roblox:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(53, 132, 228, .4);
}

.pv-btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    background: rgba(255,255,255,.08);
    color: #d4d6d9;
    border: 2px solid #3a3c40;
    border-radius: 12px;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: transform .25s, opacity .25s, box-shadow .25s;
}

.pv-btn-share:hover {
    border-color: var(--purple);
    transform: scale(1.05);
}

/* ══════════════════════════════════════════════════════════════
   AVATAR DOWNLOADER — reuses pv-search, pv-loading, pv-error
   ══════════════════════════════════════════════════════════════ */

.ad-result-card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 8px 40px var(--shadow);
    text-align: center;
}

.ad-avatar-wrap {
    display: inline-block;
    margin-bottom: 16px;
}

.ad-avatar-img {
    width: 280px;
    height: 280px;
    border-radius: 18px;
    object-fit: contain;
    background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 50%, #e0e7ff 100%);
    border: 3px solid var(--border);
    box-shadow: 0 8px 30px var(--shadow);
    transition: transform .3s;
}

.ad-avatar-img:hover {
    transform: scale(1.04);
}

.ad-display-name {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 2px;
}

.ad-username {
    font-size: .92rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 18px;
}

.ad-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.ad-btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 14px;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: transform .25s, opacity .25s, box-shadow .25s;
    width: 100%;
    max-width: 300px;
}

.ad-btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 22px rgba(34, 197, 94, .4);
}

.ad-btn-download:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.ad-btn-roblox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    background: linear-gradient(135deg, #1a5fb4, #3584e4);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: transform .25s, opacity .25s, box-shadow .25s;
    text-decoration: none;
    width: 100%;
    max-width: 300px;
}

.ad-btn-roblox:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(53, 132, 228, .4);
}

.ad-image-size {
    font-size: .78rem;
    color: var(--text-light);
    font-weight: 500;
    margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .pv-horizontal {
        flex-direction: column;
    }

    .pv-h-left {
        width: 100%;
        flex-direction: row;
        padding: 20px;
        gap: 16px;
        align-items: center;
    }

    .pv-h-avatar-wrap {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
    }

    .pv-h-actions {
        flex: 1;
    }

    .pv-h-right {
        padding: 20px;
    }

    .pv-h-display-name {
        font-size: 1.4rem;
    }

    .pv-h-info-row {
        flex-direction: column;
    }

    .pv-h-info {
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .pv-search-row {
        flex-direction: column;
    }

    .pv-search-row button {
        justify-content: center;
    }

    .pv-h-left {
        flex-direction: column;
    }

    .pv-h-avatar-wrap {
        width: 160px;
        height: 160px;
    }

    .pv-h-stat-num {
        font-size: 1rem;
    }

    .pv-h-stat {
        padding: 10px 6px;
    }
}
