

.friends-page {
    max-width: 600px;
    margin: 0 auto;
}

.friends-header {
    text-align: center;
    margin-bottom: 32px;
}

.friends-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.friends-subtitle {
    color: var(--color-text-secondary);
    font-size: 16px;
}

.referral-image {
    position: relative;
    width: 100%;
    margin-bottom: 32px;
}

.referral-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-xl);
}

.btn-invite {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    transition: none !important;
    animation: none !important;
}

.btn-invite:hover {
    transform: translateX(-50%) !important;
}

.btn-invite:active {
    transform: translateX(-50%) !important;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 56px 42px 14px 14px;
}

.stat-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 0;
}

.stat-content {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    pointer-events: none;
}

.friends-card .stat-content {
    left: 40%;
    transform: translate(-50%, -50%);
}

.coins-card .stat-content {
    left: 60%;
    transform: translate(-50%, -50%);
}

.stat-value {
    font-size: clamp(24px, 7vw, 40px);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

/* Меньший шрифт для длинных чисел */
.stat-value.digits-4 { font-size: clamp(16px, 5vw, 28px); }
.stat-value.digits-5 { font-size: clamp(14px, 4vw, 22px); }
.stat-value.digits-6 { font-size: clamp(12px, 3.5vw, 18px); }
.stat-value.digits-7 { font-size: clamp(10px, 3vw, 15px); }

.friends-card .stat-value { font-size: clamp(20px, 6vw, 32px); }
.friends-card .stat-value.digits-4 { font-size: clamp(16px, 4.5vw, 24px); }
.friends-card .stat-value.digits-5 { font-size: clamp(14px, 4vw, 20px); }
.friends-card .stat-value.digits-6 { font-size: clamp(12px, 3.5vw, 18px); }
.friends-card .stat-value.digits-7 { font-size: clamp(11px, 3.2vw, 16px); }

.coins-card .stat-value { font-size: clamp(18px, 5.5vw, 28px); }
.coins-card .stat-value.digits-4 { font-size: clamp(14px, 4vw, 22px); }
.coins-card .stat-value.digits-5 { font-size: clamp(13px, 3.6vw, 19px); }
.coins-card .stat-value.digits-6 { font-size: clamp(12px, 3.2vw, 17px); }
.coins-card .stat-value.digits-7 { font-size: clamp(11px, 3vw, 15px); }

@media (max-width: 480px) {
    .stats-container {
        gap: 12px;
    }
    .stat-card {
        min-height: 140px;
        padding: 40px 32px 12px 12px;
    }
    .stat-content { top: 52%; transform: translate(-50%, -50%); }
    .friends-card .stat-content { top: 60%; left: 70%; transform: translate(-50%, -50%); }
    .coins-card .stat-content { top: 60%; left: 70%; transform: translate(-50%, -50%); }
    .stat-value { font-size: clamp(22px, 6vw, 34px); }
}

.referral-card {
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-light));
    padding: 24px;
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    border: 1px solid rgba(255, 120, 90, 0.2);
}

.referral-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
}

.referral-reward {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.referral-description {
    text-align: center;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.referral-link {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.referral-input {
    flex: 1;
    font-size: 14px;
    font-family: monospace;
    background-color: var(--color-surface);
}

.btn-copy {
    min-width: 100px;
}

.referral-link-block {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 32px;
}

.referral-link-header {
    margin-bottom: 16px;
}

.referral-link-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.referral-link-container {
    background: var(--color-background);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 90, 90, 0.2);
}

.referral-link-text {
    flex: 1;
    font-size: 14px;
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
}

.referral-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.friends-list {
    margin-top: 0;
}

.friends-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(178, 255, 90, 0.1);
}

.friends-list-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.friends-count-badge {
    background: rgba(255, 140, 90, 0.15);
    color: var(--color-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(178, 255, 90, 0.3);
}

.friends-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 145, 90, 0.1);
    transition: all 0.2s;
}

.friend-item:hover {
    border-color: rgba(255, 98, 90, 0.3);
}

.friend-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #c3a94a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-background);
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.friend-date {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.friend-reward {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
}


/* ===================================
   MOBILE ADAPTATION FOR FRIENDS PAGE
   =================================== */

@media (max-width: 480px) {
    .friends-header {
        margin-bottom: 24px;
    }

    .friends-title {
        font-size: 24px;
    }

    .friends-subtitle {
        font-size: 15px;
    }

    .referral-image {
        margin-bottom: 24px;
    }

    .btn-invite {
        bottom: 32px;
        min-width: 180px;
        padding: 14px 28px;
        font-size: 15px;
    }

    .stat-card {
        padding: 55px 35px 20px 12px;
        min-height: 130px;
    }

    .referral-card {
        padding: 20px;
        margin-bottom: 24px;
    }

    .referral-icon {
        font-size: 56px;
    }

    .referral-reward {
        font-size: 18px;
    }
}

@media (max-width: 375px) {
    .friends-header {
        margin-bottom: 20px;
    }

    .friends-title {
        font-size: 22px;
    }

    .friends-subtitle {
        font-size: 14px;
    }

    .referral-image {
        margin-bottom: 20px;
    }

    .btn-invite {
        bottom: 24px;
        min-width: 160px;
        padding: 12px 24px;
        font-size: 14px;
    }

    .stats-container {
        gap: 12px;
        margin-bottom: 24px;
    }

    .stat-card {
        padding: 45px 35px 10px 10px;
        min-height: 115px;
    }

    .referral-card {
        padding: 18px;
        margin-bottom: 20px;
    }

    .referral-icon {
        font-size: 52px;
        margin-bottom: 12px;
    }

    .referral-reward {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .referral-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .referral-link-block {
        padding: 16px;
        margin-bottom: 24px;
    }

    .referral-link-title {
        font-size: 16px;
    }

    .friends-list-header {
        margin-bottom: 16px;
    }

    .friends-list-title {
        font-size: 16px;
    }

    .friend-item {
        padding: 14px;
        gap: 14px;
    }

    .friend-avatar {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .friend-name {
        font-size: 15px;
    }

    .friend-reward {
        font-size: 15px;
    }
}

@media (max-width: 320px) {
    .friends-header {
        margin-bottom: 16px;
    }

    .friends-title {
        font-size: 20px;
    }

    .friends-subtitle {
        font-size: 13px;
    }

    .referral-image {
        margin-bottom: 16px;
    }

    .btn-invite {
        bottom: 20px;
        min-width: 140px;
        padding: 10px 20px;
        font-size: 13px;
    }

    .stats-container {
        gap: 10px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 55px 15px 8px 8px;
        min-height: 100px;
    }

    .referral-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .referral-icon {
        font-size: 48px;
        margin-bottom: 10px;
    }

    .referral-reward {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .referral-description {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .referral-link {
        gap: 6px;
        margin-bottom: 12px;
    }

    .referral-input {
        font-size: 12px;
    }

    .btn-copy {
        min-width: 80px;
        font-size: 12px;
    }

    .referral-link-block {
        padding: 14px;
        margin-bottom: 20px;
    }

    .referral-link-title {
        font-size: 15px;
    }

    .referral-link-container {
        padding: 10px 12px;
        gap: 10px;
        margin-bottom: 10px;
    }

    .referral-link-text {
        font-size: 12px;
    }

    .referral-buttons {
        gap: 10px;
    }

    .friends-list-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .friends-list-title {
        font-size: 15px;
    }

    .friends-count-badge {
        padding: 4px 10px;
        font-size: 12px;
    }

    .friends-items {
        gap: 10px;
    }

    .friend-item {
        padding: 12px;
        gap: 12px;
    }

    .friend-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .friend-name {
        font-size: 14px;
    }

    .friend-date {
        font-size: 12px;
    }

    .friend-reward {
        font-size: 14px;
    }
}

/* Landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    .friends-header {
        margin-bottom: 16px;
    }

    .friends-title {
        font-size: 20px;
    }

    .referral-image {
        margin-bottom: 16px;
    }

    .btn-invite {
        bottom: 16px;
        padding: 10px 20px;
    }

    .stats-container {
        margin-bottom: 16px;
    }

    .referral-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .referral-icon {
        font-size: 48px;
        margin-bottom: 8px;
    }
}
