/* ================= Базовые настройки ================= */
:root {
    color-scheme: light;
    --bg: #f4f4f7;
    /* Изменяем прозрачность карточки с 0 до 0.4 или 0.5 */
    --card: rgba(255, 255, 255); 
    --txt: #000000;
    --mut: #212125;
    --bio: #333339;
    
    --lnk: rgba(255, 255, 255); 
    --brd: rgba(255, 255, 255); 
    --hov: rgb(250, 250, 250); 
    --act: rgba(250, 250, 250); 
    
    --shd: 0 10px 40px rgba(0, 0, 0, 0.06); /* Делаем тень более естественной (темной, но мягкой) */
    --blu: #1d9bf0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Скрываем системный скроллбар */
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
html, body { scrollbar-width: none; -ms-overflow-style: none; }

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    background-color: var(--bg);
    color: var(--txt);
    padding: 7vh 16px 60px; 
    position: relative;
    overflow-x: hidden;
}

/* Фон страницы */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-image: url('assets/background_1.svg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -2;
}

/* ================= Карточка ================= */
.card {
    position: relative;
    overflow: hidden; 
    background: var(--card);
    border-radius: 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shd);
    border: 3px solid rgb(255, 255, 255); /* 3px слишком толстый, 1px или 1.5px смотрится изящнее */
    padding: clamp(28px, 8vw, 36px) clamp(16px, 6vw, 24px);
    text-align: center;
    z-index: 1;
}

/* 2. ИСПРАВЛЕНО: Радуга перевернута (Синий СВЕРХУ, Красный СНИЗУ) */
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    
    /* Направление 180deg пускает градиент строго сверху вниз. 
       Сначала идут синие и фиолетовые цвета, затем они переходят в красные */
    background: linear-gradient(180deg, 
        #5e5ce6,    /* Фиолетовый (Фиалковый) - теперь на самом верху */
        #0a84ff
    );
    opacity: 0.05; 
    z-index: -1;
    pointer-events: none;
}

/* Шапка профиля */
.ava {
    width: 96px; height: 96px;
    border-radius: 50%;
    object-fit: cover;
    padding: 3px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    margin-bottom: 16px;
    background: #fff;
}

.name {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}

.verified-icon { flex-shrink: 0; }

.title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mut);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.bio {
    font-size: 0.92rem;
    color: var(--bio);
    line-height: 1.5;
    margin-bottom: 24px;
}

/* ================= Кнопки и ссылки ================= */
.links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--lnk);
    border: 1px solid var(--brd);
    padding: 12px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--txt);
    cursor: pointer;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);   
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
    .btn:hover { background: var(--hov); }
}

.btn:active { background: var(--act); }
.btn-toggle { outline: none; }

.icon {
    width: clamp(36px, 12vw, 40px);
    height: clamp(36px, 12vw, 40px);
    margin-right: clamp(10px, 6vw, 14px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.icon img {
    width: 100%; height: 100%;
    object-fit: contain;
}

.icon img.round-img {
    border-radius: 50%;
    object-fit: cover;
}

.txt-wrap {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.l-title {
    font-size: clamp(0.9rem, 6vw, 0.95rem);
    font-weight: 600;
}

.l-sub {
    font-size: 0.75rem;
    color: var(--mut);
    margin-top: 2px;
}

/* Стрелки */
.arr {
    display: block;
    flex-shrink: 0;
    transition: transform 0.2s ease-in-out; 
    will-change: transform; /* Исправляет микро-дергания стрелки */
}

.arr-sub {
    display: block;
    flex-shrink: 0;
    color: var(--mut);
}

/* ================= Выпадающие списки ================= */
.dropdown {
    display: flex;
    flex-direction: column;
}

.dropdown-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.2s ease-in-out;
    overflow: hidden;
}

.dropdown-list {
    min-height: 0;
    transform: translateZ(0);
}

.dropdown.active .dropdown-content {
    grid-template-rows: 1fr;
}

/* Поворот стрелки при активации */
.dropdown.active .btn-toggle .arr {
    transform: rotate(-180deg);
}

/* Внутренние ссылки выпадающего меню */
/* Внутренние ссылки выпадающего меню */
.btn-sub {
    margin-top: 10px;
    margin-left: 24px;
    width: calc(100% - 24px);
    padding: 8px 12px;
    
    /* Отключаем размытие для подпунктов */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* Делаем фон чуть более непрозрачным, чтобы компенсировать отсутствие блюра */
    background: rgba(255, 255, 255, 0.95); 
}

/* Уменьшаем иконку соцсети */
.btn-sub .icon {
    width: clamp(28px, 10vw, 32px);
    height: clamp(28px, 10vw, 32px);
    margin-right: 12px;
}

/* Уменьшаем текст названия (Instagram, TikTok и тд) */
.btn-sub .l-title {
    font-size: 0.85rem;
}

/* Уменьшаем текст юзернейма (@chiline...) */
.btn-sub .l-sub {
    font-size: 0.7rem;
}

/* ================= Поделиться & Уведомление ================= */
.share {
    background: none; border: none;
    color: var(--mut);
    font-size: 0.85rem; font-weight: 500;
    margin-top: 24px;
    cursor: pointer;
    display: inline-flex; align-items: center;
    gap: 10px; padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.2s, color 0.2s;
}

@media (hover: hover) {
    .share:hover {
        background: rgba(255, 255, 255, 0.2);
        color: var(--txt);
    }
}

.toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translate(-50%, 100px);
    background: #222;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85rem; font-weight: 500;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.2s ease;
    opacity: 0; pointer-events: none;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}