/* ==========================================================================
   referral.css - Стили для страницы друзей/рефералов
   Полностью соответствует huli.html
   ========================================================================== */

/* ===== FULL-WIDTH TOP HERO ===== */
.trumpamole__ref-hero {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: rgba(0, 0, 0, 0.18);
}

.trumpamole__ref-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../../assets/ref/bg_ref.webp') center/cover no-repeat;
    filter: blur(1.1px) saturate(1.05) contrast(1.05);
    transform: scale(1.08);
    opacity: 0.96;
}

.trumpamole__ref-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.10) 0%,
        rgba(36, 26, 26, 0.35) 38%,
        rgba(36, 26, 26, 0.88) 100%);
    pointer-events: none;
}

.trumpamole__ref-hero-inner {
    position: relative;
    z-index: 2;
    width: min(440px, 100%);
    margin: 0 auto;
    padding: calc(12px + var(--safe-top)) 14px 12px 14px;
    display: grid;
    gap: 10px;
}

.trumpamole__ref-hero-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: rgba(255, 248, 230, 0.96);
    margin: 0;
    padding-top: 10px;
}

/* ===== HERO TOP ROW С НАГРАДАМИ ===== */
.trumpamole__ref-top-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2px;
    align-items: center;
    min-height: 148px;
    overflow: visible;
    margin-top: -20px;
}

/* ===== БЛОКИ НАГРАД ===== */
.trumpamole__reward-box {
    border-radius: 14px;
    padding: 10px 10px;
    background: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 22px rgba(0, 0, 0, 0.22);
    min-height: 104px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    position: relative;
    z-index: 3;
}

.trumpamole__reward-box.left {
    margin-right: -14px;
}

.trumpamole__reward-box.right {
    margin-left: -14px;
}

.trumpamole__reward-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 0.2px;
    font-size: 16px;
    color: rgba(255, 248, 230, 0.98);
    line-height: 1.05;
}

.trumpamole__reward-value img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.28));
    opacity: 0.96;
}

.trumpamole__reward-text {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    color: rgba(255, 246, 230, 0.80);
}

/* ===== ИКОНКА В ЦЕНТРЕ ===== */
.trumpamole__ref-hero-icon {
    width: 172px;
    height: 150px;
    display: grid;
    place-items: center;
    pointer-events: none;
    position: relative;
    z-index: 2;
    transform: translateY(2px);
}

.trumpamole__ref-hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.44));
    transform: translateY(2px) scale(1.05);
}

/* ===== FULL-WIDTH REF CARD ===== */
.trumpamole__ref-card-full {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(255, 232, 170, 0.10);
    -webkit-box-shadow: 0px -9px 13px -2px rgba(0, 0, 0, 0.82);
    box-shadow: 0px -9px 13px -2px rgb(31, 22, 22);
}

.trumpamole__ref-card-full::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../../assets/ref/bg_ref2.webp') center/cover no-repeat;
    transform: scale(1.05);
    filter: saturate(1.05) contrast(1.05);
    opacity: 0.92;
}

.trumpamole__ref-card-full::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.10) 0%,
        rgba(0, 0, 0, 0.18) 42%,
        rgba(36, 26, 26, 0.86) 100%);
    pointer-events: none;
}

.trumpamole__ref-inner {
    position: relative;
    z-index: 2;
    width: min(440px, 100%);
    margin: 0 auto;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 1fr 92px;
    gap: 10px;
    align-items: center;
    min-height: 132px;
}

.trumpamole__ref-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* ===== ПОЛЕ С РЕФЕРАЛЬНОЙ ССЫЛКОЙ ===== */
.trumpamole__ref-field {
    border-radius: 14px;
    padding: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 22px rgba(0, 0, 0, 0.22);
    border: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    backdrop-filter: blur(8px);
}

.trumpamole__ref-field-label {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.trumpamole__ref-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.trumpamole__ref-field-value {
    font-size: 12px;
    background: #2c1f1c42;
    padding: 10px 6px;
    border-radius: 8px;
    font-weight: 900;
    color: rgba(255, 248, 230, 0.98);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* ===== КНОПКА ПОДЕЛИТЬСЯ (ПОЛНАЯ ШИРИНА) ===== */
.trumpamole__ref-share-wide {
    position: relative;
    z-index: 2;
    width: min(440px, 100%);
    margin: 0 auto;
    padding: 0 14px 12px;
}

/* ===== MAIN PANEL (СПИСОК ДРУЗЕЙ) ===== */
.trumpamole__ref-main-panel {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 16px;
    padding-bottom: calc(18px + var(--safe-bottom));
    border-top: 1px solid rgba(255, 232, 170, 0.10);
    -webkit-box-shadow: 0px -9px 13px -2px rgba(0, 0, 0, 0.82);
    box-shadow: 0px -9px 13px -2px rgb(31, 22, 22);
    overflow: hidden;
}

.trumpamole__ref-main-panel::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    width: 54px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 246, 230, 0.22);
    opacity: 0.55;
    z-index: 1;
    pointer-events: none;
}

.trumpamole__ref-main-inner {
    position: relative;
    z-index: 2;
    width: min(440px, 100%);
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== HEADER СПИСКА ===== */
.trumpamole__ref-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 2px 8px;
    margin: 0;
    gap: 10px;
}

.trumpamole__ref-section-header h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: rgba(255, 248, 230, 0.96);
}

.trumpamole__ref-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

/* ===== СПИСОК ДРУЗЕЙ ===== */
.trumpamole__ref-player-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 18px;
}

.trumpamole__ref-row {
    border-radius: var(--radius);
    background: var(--rowA);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
    padding: 10px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.trumpamole__ref-row.alt {
    background: var(--rowB);
}

/* ===== АВАТАР С РАМКОЙ ===== */
.trumpamole__ref-avatar-frame {
    width: 70px;
    height: 70px;
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
}

.trumpamole__ref-ava {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
    transform: translateY(1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.trumpamole__ref-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.28));
    pointer-events: none;
}

/* ===== ИНФОРМАЦИЯ О ДРУГЕ ===== */
.trumpamole__ref-who {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.trumpamole__ref-nick {
    font-weight: 900;
    font-size: var(--fs-rowNick);
    color: rgba(255, 248, 230, 0.98);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== МЕТА ИНФОРМАЦИЯ ===== */
.trumpamole__ref-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-rowMeta);
    color: rgba(255, 246, 230, 0.78);
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
    justify-content: flex-start;
}

.trumpamole__ref-meta-fixed {
    flex: 0 0 auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.trumpamole__ref-meta-sep {
    width: 1px;
    height: 12px;
    background: rgba(255, 246, 230, 0.22);
    border-radius: 999px;
    transform: translateY(1px);
    flex: 0 0 auto;
    flex-shrink: 0;
}

.trumpamole__ref-meta-ellipsis {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 56%;
}

.trumpamole__ref-meta-ellipsis-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trumpamole__ref-meta b {
    color: #faf3e1;
    font-size: 14px;
}

/* ===== ПРАВАЯ ЧАСТЬ ===== */
.trumpamole__ref-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== КНОПКА БОЯ ===== */
.trumpamole__ref-fight-btn {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    border: none;
    background: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 10px 18px rgba(0, 0, 0, 0.22);
    color: rgba(255, 246, 230, 0.92);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, background 0.18s ease, filter 0.16s ease;
    display: grid;
    place-items: center;
    padding: 0;
}

.trumpamole__ref-fight-btn:active {
    transform: translateY(1px) scale(0.99);
    background: rgba(0, 0, 0, 0.28);
}

.trumpamole__ref-fight-btn img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.25));
    opacity: 0.96;
}

/* ===== ПУСТОЙ СПИСОК ===== */
.trumpamole__ref-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.22);
    border-radius: var(--radiusCard, 12px);
    border: 1px solid rgba(255, 232, 170, 0.10);
}

.trumpamole__ref-empty-icon {
    margin-bottom: 16px;
}

.trumpamole__ref-empty-icon svg {
    width: 48px;
    height: 48px;
    opacity: 0.7;
}

.trumpamole__ref-empty-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 8px;
}

.trumpamole__ref-empty-desc {
    font-size: 13px;
    line-height: 1.4;
    max-width: 300px;
    color: var(--muted);
}

/* ===== АДАПТАЦИЯ ===== */
@media (max-width: 360px) {
    .trumpamole__ref-top-row {
        grid-template-columns: 1fr auto 1fr;
    }
    
    .trumpamole__ref-hero-icon {
        width: 136px;
        height: 160px;
    }
    
    .trumpamole__reward-box.left {
        margin-right: -10px;
    }
    
    .trumpamole__reward-box.right {
        margin-left: -10px;
    }
    
    .trumpamole__ref-inner {
        grid-template-columns: 1fr 84px;
    }
}