/* Profile page — дополнения к index.css */

        /* ПРОФИЛЬ */
        .profile-cover-wrap {
            position: relative;
            margin-bottom: 60px;
        }
        .profile-cover {
            width: 100%;
            height: 140px;
            background: linear-gradient(135deg, #1a1a2e, var(--accent), #16213e);
            border-radius: var(--radius-lg);
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: all var(--transition-fast);
        }
        .profile-cover:hover {
            filter: brightness(1.1);
        }
        .profile-cover .cover-edit-icon {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 30px;
            height: 30px;
            background: rgba(0,0,0,0.5);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 0.8rem;
            transition: all var(--transition-fast);
        }
        .profile-cover .cover-edit-icon:hover {
            background: rgba(0,0,0,0.7);
        }
        .profile-avatar-wrap {
            position: absolute;
            bottom: -45px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .profile-avatar-large {
            width: 90px;
            height: 90px;
            border-radius: 50%;
            border: 4px solid var(--bg-base);
            background: var(--bg-elevated);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 2.2rem;
            color: var(--accent);
            box-shadow: var(--shadow-lg);
            cursor: pointer;
            transition: all var(--transition-fast);
            position: relative;
        }
        .profile-avatar-large:hover {
            border-color: var(--accent);
            box-shadow: 0 0 0 6px var(--accent-soft);
        }
        .profile-avatar-large .avatar-edit-icon {
            position: absolute;
            bottom: 2px;
            right: 2px;
            width: 24px;
            height: 24px;
            background: var(--accent);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
        }
        .online-indicator {
            position: absolute;
            bottom: 5px;
            right: 5px;
            width: 14px;
            height: 14px;
            background: var(--green);
            border: 3px solid var(--bg-base);
            border-radius: 50%;
        }
        .profile-info {
            text-align: center;
            padding: 0 16px;
            margin-bottom: 16px;
        }
        .profile-name {
            font-size: 1.3rem;
            font-weight: 700;
            margin-top: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .verified-badge {
            width: 18px;
            height: 18px;
            background: var(--blue);
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.6rem;
            font-weight: 700;
        }
        .profile-username {
            font-size: 0.8rem;
            color: var(--text-tertiary);
        }
        .profile-bio {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 6px;
            max-width: 400px;
            margin-left: auto;
            margin-right: auto;
        }
        .profile-location {
            font-size: 0.72rem;
            color: var(--text-tertiary);
            margin-top: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }
        .profile-stats-row {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 12px;
        }
        .profile-stat-item {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            padding: 12px 16px;
            text-align: center;
            min-width: 80px;
            cursor: pointer;
            transition: all var(--transition-fast);
        }
        .profile-stat-item:hover {
            border-color: var(--accent);
            background: var(--bg-elevated);
            box-shadow: var(--shadow-sm);
        }
        .profile-stat-value {
            font-family: var(--font-mono);
            font-weight: 700;
            font-size: 1.3rem;
            color: var(--accent);
        }
        .profile-stat-label {
            font-size: 0.65rem;
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }
        .profile-actions {
            display: flex;
            gap: 8px;
            justify-content: center;
            margin-top: 12px;
            flex-wrap: wrap;
        }
        .profile-btn {
            padding: 8px 18px;
            border-radius: var(--radius-full);
            border: 1px solid var(--border);
            background: var(--bg-elevated);
            color: var(--text-primary);
            cursor: pointer;
            font-size: 0.78rem;
            font-weight: 500;
            transition: all var(--transition-fast);
            white-space: nowrap;
        }
        .profile-btn:hover {
            border-color: var(--border-active);
            background: var(--bg-card);
        }
        .profile-btn.primary {
            background: var(--accent);
            border-color: var(--accent);
            color: white;
            font-weight: 600;
        }
        .profile-btn.primary:hover {
            opacity: 0.9;
        }
        .profile-btn.danger {
            border-color: var(--red);
            color: var(--red);
            background: var(--red-soft);
        }
        .profile-btn.icon-only {
            width: 36px;
            height: 36px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* ТАБЫ */
        .profile-tabs {
            display: flex;
            border-bottom: 1px solid var(--border);
            margin-bottom: 16px;
            gap: 2px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .profile-tabs::-webkit-scrollbar {
            display: none;
        }
        .profile-tab {
            padding: 10px 18px;
            background: transparent;
            border: none;
            color: var(--text-tertiary);
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: all var(--transition-fast);
            white-space: nowrap;
            font-family: var(--font-sans);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .profile-tab:hover {
            color: var(--text-primary);
        }
        .profile-tab.active {
            color: var(--accent);
            border-bottom-color: var(--accent);
        }
        .profile-tab .tab-count {
            font-size: 0.65rem;
            padding: 1px 6px;
            border-radius: var(--radius-full);
            background: var(--bg-elevated);
        }
        .profile-tab.active .tab-count {
            background: var(--accent-soft);
        }

        /* КОНТЕНТ ТАБОВ */
        .tab-panel {
            animation: fadeIn 0.3s ease;
        }
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(5px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Карточки */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 16px;
            margin-bottom: 10px;
            transition: all var(--transition-fast);
        }
        .card:hover {
            border-color: var(--border-active);
            box-shadow: var(--shadow-sm);
        }

        /* Прогнозы */
        .prediction-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 0;
            border-bottom: 1px solid var(--border-light);
        }
        .prediction-row:last-child {
            border-bottom: none;
        }
        .prediction-icon {
            width: 36px;
            height: 36px;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            flex-shrink: 0;
        }
        .prediction-icon.win {
            background: var(--green-soft);
        }
        .prediction-icon.lose {
            background: var(--red-soft);
        }
        .prediction-icon.pending {
            background: var(--amber-soft);
        }
        .prediction-info {
            flex: 1;
            min-width: 0;
        }
        .prediction-match {
            font-weight: 600;
            font-size: 0.85rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .prediction-detail {
            font-size: 0.7rem;
            color: var(--text-tertiary);
        }
        .prediction-odds {
            font-family: var(--font-mono);
            font-weight: 600;
            font-size: 0.85rem;
            flex-shrink: 0;
        }
        .prediction-odds.win {
            color: var(--green);
        }
        .prediction-odds.lose {
            color: var(--red);
        }

        /* Диаграмма */
        .chart-container {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 16px;
            margin-bottom: 10px;
        }
        .chart-title {
            font-size: 0.75rem;
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.04em;
            margin-bottom: 12px;
        }
        .chart-bars {
            display: flex;
            align-items: flex-end;
            gap: 6px;
            height: 120px;
        }
        .chart-bar-wrap {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            height: 100%;
            justify-content: flex-end;
        }
        .chart-bar {
            width: 100%;
            max-width: 40px;
            background: var(--accent);
            border-radius: var(--radius-xs) var(--radius-xs) 0 0;
            transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            min-height: 4px;
            cursor: pointer;
            position: relative;
        }
        .chart-bar:hover {
            background: var(--accent-glow);
            box-shadow: 0 0 10px var(--accent-glow);
        }
        .chart-bar .tooltip {
            position: absolute;
            top: -28px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            border-radius: var(--radius-xs);
            padding: 2px 8px;
            font-size: 0.65rem;
            font-family: var(--font-mono);
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity var(--transition-fast);
        }
        .chart-bar:hover .tooltip {
            opacity: 1;
        }
        .chart-label {
            font-size: 0.55rem;
            color: var(--text-muted);
            margin-top: 4px;
        }

        /* Достижения */
        .badges-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            gap: 10px;
        }
        .badge-card {
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            padding: 14px 8px;
            text-align: center;
            cursor: pointer;
            transition: all var(--transition-fast);
            position: relative;
        }
        .badge-card:hover {
            border-color: var(--accent);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        .badge-card.locked {
            opacity: 0.35;
            filter: grayscale(1);
            cursor: not-allowed;
        }
        .badge-card.locked:hover {
            transform: none;
            border-color: var(--border);
            box-shadow: none;
        }
        .badge-icon {
            font-size: 2rem;
            margin-bottom: 6px;
        }
        .badge-name {
            font-size: 0.65rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .badge-card.locked .badge-name {
            color: var(--text-muted);
        }
        .badge-lock {
            position: absolute;
            top: 6px;
            right: 8px;
            font-size: 0.7rem;
            color: var(--text-muted);
        }

        /* Друзья */
        .friend-card {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            margin-bottom: 8px;
            transition: all var(--transition-fast);
        }
        .friend-card:hover {
            border-color: var(--border-active);
            box-shadow: var(--shadow-sm);
        }
        .friend-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--bg-elevated);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 1rem;
            flex-shrink: 0;
            border: 2px solid var(--border-active);
        }
        .friend-info {
            flex: 1;
            min-width: 0;
        }
        .friend-name {
            font-weight: 600;
            font-size: 0.85rem;
        }
        .friend-stat {
            font-size: 0.7rem;
            color: var(--text-tertiary);
        }
        .friend-action {
            flex-shrink: 0;
        }

        /* Секция настроек */
        .settings-section {
            margin-bottom: 16px;
        }
        .settings-title {
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            margin-bottom: 10px;
            font-weight: 600;
        }
        .setting-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid var(--border-light);
        }
        .setting-label {
            font-size: 0.85rem;
        }
        .toggle-switch {
            width: 44px;
            height: 24px;
            background: var(--border);
            border-radius: var(--radius-full);
            cursor: pointer;
            transition: all var(--transition-fast);
            position: relative;
        }
        .toggle-switch.active {
            background: var(--accent);
        }
        .toggle-switch::after {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            top: 2px;
            left: 2px;
            transition: all var(--transition-fast);
        }
        .toggle-switch.active::after {
            left: 22px;
        }

        /* МОДАЛЬНЫЕ ОКНА */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            z-index: 200;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: all var(--transition-smooth);
            padding: 16px;
        }
        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        .modal-content {
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            border-radius: var(--radius-xl);
            padding: 24px;
            width: 100%;
            max-width: 440px;
            box-shadow: var(--shadow-lg);
            transform: scale(0.95);
            transition: transform var(--transition-smooth);
            max-height: 80vh;
            overflow-y: auto;
        }
        .modal-overlay.active .modal-content {
            transform: scale(1);
        }
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        .modal-close {
            background: none;
            border: none;
            color: var(--text-tertiary);
            cursor: pointer;
            font-size: 1.4rem;
            padding: 4px 8px;
            border-radius: var(--radius-xs);
            transition: all var(--transition-fast);
        }
        .modal-close:hover {
            background: var(--bg-card);
            color: var(--text-primary);
        }
        .modal-input {
            width: 100%;
            padding: 10px 14px;
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            color: var(--text-primary);
            margin-bottom: 12px;
            font-family: var(--font-sans);
            font-size: 0.85rem;
        }
        .modal-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-soft);
        }
        .modal-textarea {
            width: 100%;
            padding: 10px 14px;
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            color: var(--text-primary);
            margin-bottom: 12px;
            font-family: var(--font-sans);
            font-size: 0.85rem;
            resize: vertical;
            min-height: 80px;
        }
        .modal-textarea:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-soft);
        }
        .modal-select {
            width: 100%;
            padding: 10px 14px;
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            color: var(--text-primary);
            margin-bottom: 12px;
            font-family: var(--font-sans);
            font-size: 0.85rem;
        }
        .modal-btn-row {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
            margin-top: 16px;
        }

        .overlay.show {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        /* Адаптивность */
        @media (min-width: 768px) {
            .main-content {
                padding: 16px 16px 24px;
                max-width: 760px;
                margin: 0 auto;
            }
            .profile-cover {
                height: 180px;
            }
            .badges-grid {
                grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
            }
        }
        @media (min-width: 1100px) {
            .main-content {
                padding: 20px 20px 24px;
                max-width: 740px;
                margin: 0 auto;
            }
            .profile-cover {
                height: 200px;
            }
        }
        @media (min-width: 1400px) {
            .main-content {
                max-width: 820px;
            }
        }

        .settings-form .form-group {
            margin-bottom: 14px;
        }
        .settings-form label {
            display: block;
            font-size: 0.8rem;
            color: var(--text-tertiary);
            margin-bottom: 6px;
        }
        .settings-form input[type="text"],
        .settings-form textarea,
        .settings-form select {
            width: 100%;
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            padding: 10px;
            color: var(--text-primary);
        }
        .settings-upload-row {
            margin-bottom: 18px;
        }
        .settings-cover-preview {
            height: 100px;
            border-radius: var(--radius);
            background: linear-gradient(135deg, #1a1a2e, var(--accent));
            position: relative;
            background-size: cover;
            background-position: center;
        }
        .settings-cover-preview input,
        .settings-upload-preview input {
            position: absolute;
            inset: 0;
            opacity: 0;
            cursor: pointer;
        }
        .settings-upload-preview {
            display: flex;
            align-items: center;
            gap: 12px;
            position: relative;
        }
        .settings-hint {
            font-size: 0.72rem;
            color: var(--text-tertiary);
        }
        .settings-alert {
            padding: 10px;
            border-radius: var(--radius-sm);
            margin-bottom: 16px;
            font-size: 0.85rem;
        }
        .settings-alert.success { background: var(--green-soft); }
        .settings-alert.error { background: rgba(239,68,68,0.15); color: var(--red); }
        .profile-avatar-large .profile-avatar-img {
            width: 90px;
            height: 90px;
            border-radius: 50%;
        }
        #followBtn.following {
            background: var(--bg-elevated);
            color: var(--text-secondary);
        }
.friends-section-title {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
        a.cover-edit-icon {
            text-decoration: none;
            color: #fff;
        }

/* Profile upgrades */
.main-content.profile-page {
    max-width: 900px !important;
}
@media (min-width: 1400px) {
    .main-content.profile-page {
        max-width: 960px !important;
    }
}
.profile-cover__badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.profile-cover__badge span {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}
.profile-xp {
    margin: 12px 0 10px;
    max-width: 420px;
}
.profile-xp__meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}
.profile-xp__track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.profile-xp__track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--amber));
}
.profile-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
}
.profile-form__label {
    font-size: 0.68rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 4px;
}
.profile-form__pill {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
}
.profile-form__pill--w {
    background: var(--green-soft);
    color: var(--green);
}
.profile-form__pill--l {
    background: rgba(239,68,68,0.15);
    color: var(--red);
}
.profile-stats-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
@media (min-width: 640px) {
    .profile-stats-row {
        grid-template-columns: repeat(6, 1fr);
    }
}
.profile-posts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profile-post-card {
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.profile-post-card__meta {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}
.profile-post-card__body {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-primary);
    white-space: pre-wrap;
}
.profile-post-card__stats {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}
.profile-post-card__stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.profile-stat-item {
    cursor: pointer;
}
