/* profile-modal.css - стили для модального окна профиля (в стиле leaderboard) */

/* Оверлей модального окна */
.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(3px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.profile-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Контейнер модального окна */
.profile-modal-container {
    background: linear-gradient(135deg, #0c0c0c 0%, #080808 100%);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.profile-modal-overlay.active .profile-modal-container {
    transform: scale(1) translateY(0);
}

/* Заголовок */
.profile-modal-header {
    position: relative;
    justify-content: center;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #101010 0%, #0c0c0c 100%);
    padding: 0 10px;
    height: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 5px 5px 0 0;
    overflow: hidden;
}

/* .profile-modal-header::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: repeating-linear-gradient(-45deg, #d7fe7b 0 20px, #0b0b0b 20px 50px);
    background-size: 56px 56px;
    animation: lbTapeMove 1.6s linear infinite;
    opacity: .85;
} */
.discord-link.YT{
    height: 18px;
    padding: 0 5px;
    border-radius: 3px;
}

@keyframes lbTapeMove {
    from { background-position: 0 0; }
    to   { background-position: 56px 0; }
}

.profile-modal-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #d7fe7b;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.profile-modal-title svg {
    width: 16px;
    height: 16px;
    stroke: #d7fe7b;
}

.profile-modal-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #0a0a0a;
    border: 1px solid #242424;
    color: #929292;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.25s ease;
}

.profile-modal-close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.profile-modal-close:hover {
    background: rgba(255, 80, 80, 0.12);
    border-color: rgba(255, 80, 80, 0.5);
    color: #ff6b6b;
}

/* Контент */
.profile-modal-content {
    padding: 10px;
    gap: 10px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-radius: 0 0 5px 5px;
    flex: 1;
    background: #080808;
    position: relative;
}


.profile-modal-content > * {
    position: relative;
    z-index: 1;
}

/* Секции */
.profile-section {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, #101010 0%, #0c0c0c 100%);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    animation: lbFadeUp .5s cubic-bezier(.2, .8, .2, 1) both;
}


@keyframes lbShine {
    0%, 55% { transform: translateX(-100%); }
    75%, 100% { transform: translateX(100%); }
}

@keyframes lbFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.infmod {
    overflow-y: auto;
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.infmod > .profile-section {
    height: auto;
    flex: 0 0 auto;
}

.profile-section-header {
    background: #0a0a0a;
    padding: 0 12px;
    height: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    font-weight: 600;
    color: #d7fe7b;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
    position: relative;
    z-index: 1;
}

.profile-section-header svg {
    width: 14px;
    height: 14px;
    stroke: #d7fe7b;
}

.profile-section-content {
    padding: 6px;
    position: relative;
    z-index: 1;
}

/* Информационные строки */
.profile-info-row {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
    gap: 10px;
    transition: background .2s ease;
}

.profile-info-row:hover {
    background: rgba(215, 254, 123, 0.03);
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-label {
    color: #929292;
    font-weight: 400;
    flex-shrink: 0;
}

.profile-info-value > span {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px !important;
    border-radius: 3px;
    padding: 0 10px !important;
}

.profile-info-value > div {
    height: 22px !important;
    padding: 0 8px !important;
}

.profile-info-value {
    color: #f5f5f5;
    font-weight: 500;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.profile-info-value.hwid {
    font-size: 10px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Аватар */
.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: #1a1a1a;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    transition: border-color .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1);
}

.profile-avatar:hover {
    border-color: rgba(215, 254, 123, 0.28);
    transform: scale(1.04);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-letter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    color: #d7fe7b;
}

.profile-avatar img[src=""] + .profile-avatar-letter,
.profile-avatar img:not([src]) + .profile-avatar-letter {
    display: flex;
}

.profile-avatar-info {
    flex: 1;
}

.profile-avatar-info h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #f5f5f5;
}

.profile-avatar-info p {
    margin: 0;
    font-size: 10px;
    color: #929292;
}

/* Статус-бейджи */
.profile-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    height: 22px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid transparent;
}

.profile-status-badge.active {
    background: rgba(215, 254, 123, 0.08);
    color: #d7fe7b;
    border-color: rgba(215, 254, 123, 0.28);
}

.profile-status-badge.expired {
    background: rgba(255, 100, 100, 0.08);
    color: #ff8888;
    border-color: rgba(255, 100, 100, 0.25);
}

.profile-status-badge.forever {
    background: rgba(215, 254, 123, 0.08);
    color: #d7fe7b;
    border-color: rgba(215, 254, 123, 0.28);
}

.profile-status-badge.banned {
    background: rgba(255, 80, 80, 0.12);
    color: #ff6b6b;
    border-color: rgba(255, 80, 80, 0.35);
}

.profile-status-badge.nolicense {
    background: rgba(255, 138, 84, 0.1);
    color: #ff8a54;
    border-color: rgba(255, 138, 84, 0.3);
}

/* Роль */
.profile-role {
    display: inline-block;
    font-size: 10px;
    font-weight: 400;
}

.profile-role.creator { color: #ff99bb; }
.profile-role.admin { color: #ffb347; }
.profile-role.partner-rehvh { color: #ffb347; }
.profile-role.manager { color: #61edff; }
.profile-role.media { color: #FF5454; }
.profile-role.partner { color: #fb7aff; }
.profile-role.player { color: #a7ff54; }
.profile-role.banned { color: #ff6666; }

/* Прогресс-бар */
.profile-progress-bar {
    height: 3px;
    background: #1a1a1a;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.profile-progress-fill {
    height: 100%;
    background: #d7fe7b;
    width: 0%;
    transition: width 0.3s;
}

/* Ссылки */
.profile-links {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 5px;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    font-size: 10px;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.2s;
}

.profile-link svg {
    width: 12px;
    height: 12px;
}

.profile-link.discord {
    border-left: 3px solid #5865f2;
}

.profile-link.discord:hover {
    background: rgba(88, 101, 242, 0.08);
    border-color: rgba(88, 101, 242, 0.4);
    border-left-color: #5865f2;
}

.profile-link.telegram {
    border-left: 3px solid #30a3e6;
}

.profile-link.telegram:hover {
    background: rgba(48, 163, 230, 0.08);
    border-color: rgba(48, 163, 230, 0.4);
    border-left-color: #30a3e6;
}

/* Лоадер */
.profile-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 12px;
}

.profile-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #242424;
    border-top: 2px solid #d7fe7b;
    border-radius: 50%;
    animation: profileSpin 0.6s linear infinite;
}

@keyframes profileSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-loader p {
    margin: 0;
    font-size: 12px;
    color: #929292;
}

/* Сообщение об ошибке */
.profile-error {
    text-align: center;
    padding: 30px;
    color: #ff6b6b;
}

.profile-error svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    stroke: #ff6b6b;
}

.profile-error p {
    margin: 0;
    font-size: 13px;
}

/* Секция бана */
.profile-ban-reason {
    background: rgba(255, 50, 50, 0.08);
    border: 1px solid rgba(255, 50, 50, 0.2);
    border-left: 3px solid #ff4444;
    padding: 8px 10px;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
}

.profile-ban-reason .label {
    font-size: 9px;
    color: #ff8888;
    display: block;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.profile-ban-reason .reason {
    font-size: 11px;
    color: #ffaaaa;
}

.profile-ban-reason2 {
    position: relative;
    background: rgba(255, 50, 50, 0.08);
    border: 1px solid rgba(255, 50, 50, 0.2);
    border-left: 3px solid #ff4444;
    padding: 8px 10px;
    max-height: 26px;
    min-height: 26px;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.profile-ban-reason2::after {
    opacity: 1;
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, transparent, #1A0505);
    pointer-events: none;
    transition: all 0.3s;
}

.profile-ban-reason2:hover::after {
    opacity: 0;
}

.profile-ban-reason2:hover {
    max-height: 200px;
}

.profile-ban-reason2 .label {
    font-size: 9px;
    color: #ff8888;
    display: block;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.profile-ban-reason2 .reason {
    font-size: 10px;
    color: #ffaaaa;
}

.admin_card {
    height: max-content;
}

.user-profile {
    cursor: unset;
}

/* Секция без данных */
.profile-no-data {
    text-align: center;
    padding: 20px;
    color: #929292;
    font-size: 12px;
}

/* Адаптация */
@media (max-width: 480px) {
    .profile-modal-container {
        width: 95%;
        max-height: 90vh;
    }
    
    .profile-info-value {
        max-width: 55%;
        font-size: 11px;
    }
    
    .profile-info-row {
        font-size: 11px;
    }
}

@media (min-width: 900px) {
    .profile-modal-content {
        display: flex;
        flex-direction: row;
    }
    .profile-modal-container {
        max-width: 800px !important;
    }
    #profile-launches-section {
        width: 100%;
    }
    .infmod {
        width: 100%;
    }
    .profile-section {
        height: 100%;
    }
    .profile-launches-list, 
    .profile-launches-loading, .profile-launches-empty, .profile-launches-error {
        min-height: 300px !important;
        max-height: 40vh !important;
    }
}

/* ===== АНИМИРОВАННАЯ ГРАДИЕНТНАЯ РАМКА ДЛЯ .card ===== */
.profile-modal-container {
    outline: 4px solid transparent;
    outline-offset: 4px;
    position: relative;
}

.profile-modal-container::before {
    content: '';
    position: absolute;
    inset: -1px;
    padding: 1px;
    background: linear-gradient(
        90deg,
        #ff6b9d,
        #ffa07a,
        #ffd93d,
        #6bcb77,
        #4d96ff,
        #9b59b6,
        #ff6b9d
    );
    background-size: 400% 100%;
    animation: moveGradient 4s ease-in-out infinite;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
    pointer-events: none;
}

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== ДОПОЛНИТЕЛЬНО: СВЕЧЕНИЕ ===== */
.profile-modal-container::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 0px;
    background: linear-gradient(
        90deg,
        #ff6b9d,
        #ffa07a,
        #ffd93d,
        #6bcb77,
        #4d96ff,
        #9b59b6,
        #ff6b9d
    );
    background-size: 400% 100%;
    animation: moveGradient 4s ease-in-out infinite;
    filter: blur(40px);
    opacity: 0.2;
    z-index: -2;
    pointer-events: none;
}

.kps-sw {
    height: 22px !important;
    width: 34px !important;
}
.kps-sl {
    border-radius: 3px !important;
}
.kps-sl::before {
    height: 16px !important;
    width: 16px !important;
    border-radius: 2px !important;
}

/* ===== Список всех ролей пользователя (в стиле мастерской) ===== */
.profile-info-row .profile-info-value:has(.ws-post-dlroles) {
    max-width: 100% !important;
    text-align: left !important;
    justify-content: flex-start !important;
    word-break: normal !important;
}
.profile-info-value .ws-post-dlroles {
    height: auto !important;
    max-width: 100% !important;
    padding: 0 !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}
.profile-info-value .ws-dlroles-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    height: auto !important;
    padding: 0 !important;
}
.ws-role-tag {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 9px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(217, 255, 138, .08);
    color: #d9ff8a;
    border: 1px solid rgba(217, 255, 138, .30);
}
.ws-role-tag:hover {
    background: #d9ff8a;
    color: #0e1505;
}