/**
 * Social Features Styles
 * Стили для социальных функций: друзья, приглашения, и т.д.
 */

/* ==================== FRIENDS SYSTEM ==================== */

/* Notification badge on friends button */
.friends-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(255, 0, 0, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Friends Modal */
.friends-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    font-family: 'Rajdhani', sans-serif;
}

.friends-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.friends-modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: var(--backdrop-blur-medium);
    animation: fadeIn 0.2s ease;
}

.friends-modal-content {
    position: relative;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 100%);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: 16px;
    box-shadow:
        0 0 40px rgba(255, 170, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.friends-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(90deg, rgba(255, 170, 0, 0.1), transparent);
    border-bottom: 1px solid rgba(255, 170, 0, 0.2);
    flex-shrink: 0;
}

.friends-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffaa00;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.friends-modal-header h2 i {
    margin-right: 10px;
    opacity: 0.8;
}

/* My ID Badge */
.friends-my-id {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    margin-right: 12px;
}

.friends-my-id:hover {
    background: rgba(255, 170, 0, 0.2);
    border-color: rgba(255, 170, 0, 0.5);
}

.friends-my-id:active {
    transform: scale(0.95);
}

.friends-my-id-label {
    font-size: 11px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
}

.friends-my-id-value {
    font-size: 13px;
    color: #ffaa00;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', monospace;
}

.friends-my-id i {
    font-size: 11px;
    color: #888;
    transition: color 0.2s ease;
}

.friends-my-id:hover i {
    color: #ffaa00;
}

.friends-modal-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friends-modal-close:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
    color: #ff4444;
}

/* Friends Tabs */
.friends-tabs {
    display: flex;
    padding: 12px 16px;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.friends-tab {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #888;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.friends-tab i {
    font-size: 10px;
}

.friends-tab .fa-circle {
    color: #00ff88;
    font-size: 8px;
}

.friends-tab:hover {
    background: rgba(255, 170, 0, 0.1);
    border-color: rgba(255, 170, 0, 0.3);
    color: #fff;
}

.friends-tab.active {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.2), rgba(255, 170, 0, 0.1));
    border-color: rgba(255, 170, 0, 0.5);
    color: #ffaa00;
}

.friends-count {
    min-width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.friends-tab.active .friends-count {
    background: rgba(255, 170, 0, 0.3);
}

.friends-requests-count:not(:empty) {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
}

/* Friends Search */
.friends-search {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.friends-search i {
    color: #666;
    margin-right: 10px;
    font-size: 14px;
}

.friends-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    outline: none;
}

.friends-search input::placeholder {
    color: #555;
}

/* Friends List Container */
.friends-list-container {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 100px;
}

.friends-tab-content {
    display: none;
    padding: 12px;
}

.friends-tab-content.active {
    display: block;
}

/* Section Title */
.friends-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 4px;
    margin-top: 8px;
}

.friends-section-title:first-child {
    margin-top: 0;
}

/* Empty State */
.friends-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.friends-empty i {
    font-size: 48px;
    color: #333;
    margin-bottom: 16px;
}

.friends-empty p {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.friends-empty span {
    font-size: 13px;
    color: #444;
}

/* Friends List */
.friends-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Friend Item */
.friend-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.friend-item:hover {
    background: rgba(255, 170, 0, 0.05);
    border-color: rgba(255, 170, 0, 0.2);
}

.friend-item.request {
    border-color: rgba(0, 170, 255, 0.3);
    background: rgba(0, 170, 255, 0.05);
}

.friend-item.search-result {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Friend Avatar */
.friend-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    margin-right: 12px;
    flex-shrink: 0;
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.friend-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #1a1a2e;
}

.friend-status.online {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.friend-status.offline {
    background: #555;
}

.friend-status.ingame {
    background: linear-gradient(135deg, #ffaa00, #ff8800);
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}

/* Friend Info */
.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-level {
    font-size: 11px;
    color: #ffaa00;
    font-weight: 500;
}

.friend-activity {
    font-size: 11px;
    color: #00ff88;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.friend-activity i {
    font-size: 10px;
}

.friend-activity.playing {
    color: #ffaa00;
}

.friend-activity.playing i {
    animation: playingPulse 1.5s ease-in-out infinite;
}

@keyframes playingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.friend-activity.offline {
    color: #666;
}

.friend-status-text {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.friend-status-text.pending {
    color: #ffaa00;
}

/* Friend Actions */
.friend-actions {
    display: flex;
    gap: 6px;
    margin-left: 8px;
}

.friend-action-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-action-btn:hover {
    transform: scale(1.1);
}

.friend-action-btn.invite:hover,
.friend-action-btn.add:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.4);
    color: #00ff88;
}

.friend-action-btn.remove:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
    color: #ff4444;
}

.friend-action-btn.accept {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

.friend-action-btn.accept:hover {
    background: rgba(0, 255, 136, 0.3);
}

.friend-action-btn.decline {
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.friend-action-btn.decline:hover {
    background: rgba(255, 68, 68, 0.3);
}

.friend-action-btn.add {
    background: rgba(0, 170, 255, 0.1);
    border-color: rgba(0, 170, 255, 0.3);
    color: #00aaff;
}

.friend-action-btn.cancel {
    background: rgba(255, 136, 0, 0.1);
    border-color: rgba(255, 136, 0, 0.3);
    color: #ff8800;
}

.friend-action-btn.cancel:hover {
    background: rgba(255, 136, 0, 0.3);
}

/* Add Friend Section */
.friends-add-section {
    display: flex;
    gap: 10px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.friends-add-section input {
    flex: 1;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.friends-add-section input:focus {
    border-color: rgba(255, 170, 0, 0.5);
    background: rgba(255, 170, 0, 0.05);
}

.friends-add-section input::placeholder {
    color: #555;
}

.friends-add-btn {
    padding: 12px 18px;
    background: linear-gradient(135deg, #ffaa00, #ff8800);
    border: none;
    border-radius: 8px;
    color: #000;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.friends-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.4);
}

.friends-add-btn:active {
    transform: translateY(0);
}

/* Scrollbar for friends list */
.friends-list-container::-webkit-scrollbar {
    width: 6px;
}

.friends-list-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.friends-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 170, 0, 0.3);
    border-radius: 3px;
}

.friends-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 170, 0, 0.5);
}

/* ==================== LOBBY CHAT ADD FRIEND ==================== */

.lobby-chat-msg {
    cursor: pointer;
}

.lobby-chat-msg:hover .lobby-chat-author {
    text-decoration: underline;
}

.lobby-chat-add-friend {
    display: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: rgba(0, 170, 255, 0.2);
    border: 1px solid rgba(0, 170, 255, 0.4);
    border-radius: 6px;
    color: #00aaff;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
}

.lobby-chat-msg:hover .lobby-chat-add-friend {
    display: flex;
}

.lobby-chat-add-friend:hover {
    background: rgba(0, 170, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

/* ==================== MOBILE RESPONSIVE ==================== */

/* Планшеты */
@media (max-width: 768px) {
    .friends-modal-content {
        width: 95%;
        max-height: 85vh;
    }

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

/* Телефоны */
@media (max-width: 480px) {
    .friends-modal.active {
        align-items: stretch;
        justify-content: stretch;
    }

    .friends-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        margin: 0;
        overflow: hidden;
    }

    .friends-modal-header {
        padding: 8px 10px;
        padding-top: max(8px, env(safe-area-inset-top));
    }

    .friends-modal-header h2 {
        font-size: 14px;
    }

    /* ID badge компактный */
    .friends-my-id {
        padding: 3px 6px;
        margin-right: 6px;
        gap: 3px;
        border-radius: 6px;
    }

    .friends-my-id-label {
        display: none;
    }

    .friends-my-id-value {
        font-size: 10px;
    }

    .friends-my-id i {
        font-size: 9px;
    }

    .friends-modal-close {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .friends-tabs {
        padding: 6px 8px;
        gap: 4px;
    }

    .friends-tab {
        padding: 6px 4px;
        font-size: 10px;
    }

    .friends-tab i {
        display: none;
    }

    .friends-count {
        font-size: 9px;
        min-width: 14px;
        height: 14px;
        padding: 0 3px;
    }

    .friends-search {
        padding: 6px 8px;
    }

    .friends-search i {
        font-size: 12px;
        margin-right: 6px;
    }

    .friends-search input {
        padding: 8px;
        font-size: 13px;
    }

    .friends-list-container {
        flex: 1;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .friends-tab-content {
        padding: 6px;
    }

    .friend-item {
        padding: 8px;
        gap: 8px;
        border-radius: 8px;
    }

    .friend-avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
        margin-right: 0;
    }

    .friend-avatar img {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .friend-status {
        width: 10px;
        height: 10px;
        border-width: 2px;
    }

    .friend-info {
        flex: 1;
        min-width: 0;
    }

    .friend-name {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .friend-level {
        font-size: 10px;
    }

    .friend-activity {
        font-size: 9px;
    }

    .friend-actions {
        gap: 4px;
        margin-left: 0;
    }

    .friend-action-btn {
        width: 30px;
        height: 30px;
        font-size: 11px;
        border-radius: 6px;
    }

    .friends-add-section {
        flex-direction: row;
        padding: 8px;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        gap: 6px;
    }

    .friends-add-section input {
        flex: 1;
        padding: 10px;
        font-size: 13px;
        border-radius: 8px;
    }

    .friends-add-btn {
        padding: 10px 12px;
        font-size: 11px;
        border-radius: 8px;
    }

    .friends-add-btn i {
        display: none;
    }

    .friends-empty {
        padding: 20px 15px;
    }

    .friends-empty i {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .friends-empty p {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .friends-empty span {
        font-size: 11px;
    }

    .friends-section-title {
        font-size: 10px;
        padding: 4px 8px;
        margin: 6px 0;
    }

    /* Кнопка добавления в чате */
    .lobby-chat-add-friend {
        display: flex;
        width: 24px;
        height: 24px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .friends-modal-header {
        padding: 6px 8px;
        padding-top: max(6px, env(safe-area-inset-top));
    }

    .friends-modal-header h2 {
        font-size: 12px;
    }

    .friends-my-id {
        padding: 2px 5px;
    }

    .friends-my-id-value {
        font-size: 9px;
        max-width: 50px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .friends-modal-close {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .friends-tabs {
        padding: 4px 6px;
        gap: 3px;
    }

    .friends-tab {
        padding: 5px 3px;
        font-size: 9px;
    }

    .friends-count {
        font-size: 8px;
        min-width: 12px;
        height: 12px;
    }

    .friends-search {
        padding: 5px 6px;
    }

    .friends-search input {
        padding: 6px;
        font-size: 12px;
    }

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

    .friend-avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .friend-avatar img {
        width: 32px;
        height: 32px;
    }

    .friend-status {
        width: 8px;
        height: 8px;
    }

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

    .friend-level {
        font-size: 9px;
    }

    .friend-activity {
        font-size: 8px;
    }

    .friend-action-btn {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    .friends-add-section {
        padding: 6px;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
        gap: 4px;
    }

    .friends-add-section input {
        padding: 8px;
        font-size: 12px;
    }

    .friends-add-btn {
        padding: 8px 10px;
        font-size: 10px;
    }
}

/* Альбомный режим на телефонах (ограниченная высота) */
@media (max-height: 500px) and (orientation: landscape) {
    .friends-modal-content {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .friends-modal-header {
        padding: 4px 8px;
        padding-left: max(8px, env(safe-area-inset-left));
    }

    .friends-modal-header h2 {
        font-size: 12px;
    }

    .friends-modal-header h2 i {
        display: none;
    }

    .friends-my-id {
        padding: 2px 6px;
        margin-right: 6px;
    }

    .friends-my-id-label {
        display: none;
    }

    .friends-my-id-value {
        font-size: 9px;
    }

    .friends-my-id i {
        font-size: 8px;
    }

    .friends-modal-close {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .friends-tabs {
        padding: 3px 6px;
        gap: 3px;
    }

    .friends-tab {
        padding: 4px 6px;
        font-size: 9px;
    }

    .friends-tab i {
        display: none;
    }

    .friends-count {
        font-size: 8px;
        min-width: 12px;
        height: 12px;
    }

    .friends-search {
        padding: 3px 6px;
    }

    .friends-search i {
        font-size: 10px;
        margin-right: 4px;
    }

    .friends-search input {
        padding: 4px 6px;
        font-size: 11px;
    }

    .friends-list-container {
        flex: 1;
        min-height: 0;
        max-height: none;
    }

    .friends-tab-content {
        padding: 4px;
    }

    .friends-list {
        gap: 4px;
    }

    .friend-item {
        padding: 4px 6px;
        gap: 6px;
        border-radius: 6px;
    }

    .friend-avatar {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    .friend-avatar img {
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }

    .friend-status {
        width: 8px;
        height: 8px;
        border-width: 1px;
    }

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

    .friend-level {
        font-size: 9px;
    }

    .friend-activity {
        font-size: 8px;
    }

    .friend-action-btn {
        width: 24px;
        height: 24px;
        font-size: 9px;
        border-radius: 4px;
    }

    .friends-add-section {
        flex-direction: row;
        padding: 4px 6px;
        padding-bottom: max(4px, env(safe-area-inset-bottom));
        padding-right: max(6px, env(safe-area-inset-right));
        gap: 4px;
    }

    .friends-add-section input {
        flex: 1;
        padding: 6px 8px;
        font-size: 11px;
        border-radius: 6px;
    }

    .friends-add-btn {
        padding: 6px 10px;
        font-size: 10px;
        border-radius: 6px;
        white-space: nowrap;
    }

    .friends-add-btn i {
        display: none;
    }

    .friends-empty {
        padding: 10px;
    }

    .friends-empty i {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .friends-empty p {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .friends-empty span {
        font-size: 9px;
    }

    .friends-section-title {
        font-size: 9px;
        padding: 2px 6px;
        margin: 4px 0;
    }
}

/* Очень маленькая высота в landscape */
@media (max-height: 400px) and (orientation: landscape) {
    .friends-search {
        display: none;
    }

    .friends-modal-header {
        padding: 3px 6px;
    }

    .friends-tabs {
        padding: 2px 4px;
    }

    .friends-tab {
        padding: 3px 4px;
        font-size: 8px;
    }

    .friend-item {
        padding: 3px 5px;
    }

    .friend-avatar {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .friend-avatar img {
        width: 24px;
        height: 24px;
    }

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

    .friend-level {
        font-size: 8px;
    }

    .friend-action-btn {
        width: 22px;
        height: 22px;
        font-size: 8px;
    }

    .friends-add-section {
        padding: 3px 5px;
    }

    .friends-add-section input {
        padding: 5px 6px;
        font-size: 10px;
    }

    .friends-add-btn {
        padding: 5px 8px;
        font-size: 9px;
    }
}

/* ==================== CONFIRM MODAL ==================== */

.social-confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30000;
    font-family: 'Rajdhani', sans-serif;
}

.social-confirm-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-confirm-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: var(--backdrop-blur-light);
    animation: fadeIn 0.2s ease;
}

.social-confirm-content {
    position: relative;
    background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 100%);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 16px;
    padding: 24px 32px;
    text-align: center;
    box-shadow: 0 0 40px rgba(255, 68, 68, 0.2);
    animation: modalSlideIn 0.3s ease;
    max-width: 320px;
    width: 90%;
}

.social-confirm-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: rgba(255, 68, 68, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ff4444;
}

.social-confirm-text {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.social-confirm-name {
    font-size: 16px;
    color: #ffaa00;
    font-weight: 700;
    margin-bottom: 20px;
}

.social-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-confirm-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 100px;
}

.social-confirm-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-confirm-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.social-confirm-btn.confirm {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
}

.social-confirm-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}

/* ==================== NOTIFICATION ==================== */

.social-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 40000;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.social-notification.active {
    transform: translateX(-50%) translateY(0);
}

.social-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(13, 13, 26, 0.95));
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    backdrop-filter: var(--backdrop-blur-medium);
}

.social-notification-content.success {
    border: 1px solid rgba(0, 255, 136, 0.4);
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.2);
}

.social-notification-content.success i {
    color: #00ff88;
    font-size: 18px;
}

.social-notification-content.error {
    border: 1px solid rgba(255, 68, 68, 0.4);
    box-shadow: 0 8px 32px rgba(255, 68, 68, 0.2);
}

.social-notification-content.error i {
    color: #ff4444;
    font-size: 18px;
}

.social-notification-content.info {
    border: 1px solid rgba(0, 170, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 170, 255, 0.2);
}

.social-notification-content.info i {
    color: #00aaff;
    font-size: 18px;
}

/* Mobile responsive for confirm and notification */
@media (max-width: 480px) {
    .social-confirm-content {
        padding: 16px 20px;
        margin: 0 12px;
        max-width: 280px;
    }

    .social-confirm-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
        margin-bottom: 12px;
    }

    .social-confirm-text {
        font-size: 14px;
    }

    .social-confirm-name {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .social-confirm-buttons {
        gap: 8px;
    }

    .social-confirm-btn {
        padding: 10px 16px;
        font-size: 12px;
        min-width: 80px;
    }

    .social-notification {
        top: max(10px, env(safe-area-inset-top));
        width: calc(100% - 24px);
        max-width: 320px;
    }

    .social-notification-content {
        padding: 10px 14px;
        font-size: 12px;
        justify-content: center;
        border-radius: 8px;
    }

    .social-notification-content i {
        font-size: 14px;
    }
}

/* Landscape для confirm modal */
@media (max-height: 500px) and (orientation: landscape) {
    .social-confirm-content {
        padding: 12px 16px;
        max-width: 260px;
    }

    .social-confirm-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin-bottom: 8px;
    }

    .social-confirm-text {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .social-confirm-name {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .social-confirm-btn {
        padding: 8px 14px;
        font-size: 11px;
        min-width: 70px;
    }

    .social-notification {
        top: max(6px, env(safe-area-inset-top));
    }

    .social-notification-content {
        padding: 8px 12px;
        font-size: 11px;
    }

    .social-notification-content i {
        font-size: 12px;
    }
}

/* =============================================
   TACTICAL STYLE OVERRIDES
   ============================================= */

/* Тактический backdrop для Friends Modal */
.friends-modal-backdrop {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Тактический контейнер модалки */
.friends-modal-content {
    background: linear-gradient(145deg, rgba(10, 10, 20, 0.98), rgba(5, 5, 15, 0.98));
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-left: 3px solid #ffaa00;
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    box-shadow: 0 0 50px rgba(255, 170, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Тактический header */
.friends-modal-header {
    background: linear-gradient(90deg, rgba(255, 170, 0, 0.08), transparent);
    border-bottom: 1px solid rgba(255, 170, 0, 0.15);
    padding: 14px 18px;
}

.friends-modal-header h2 {
    font-size: 18px;
    letter-spacing: 2px;
}

/* Тактическая кнопка закрытия */
.friends-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 170, 0, 0.15);
    border-radius: 0;
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    color: #666;
}

.friends-modal-close:hover {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

/* Тактический My ID badge */
.friends-my-id {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-radius: 0;
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    padding: 5px 10px;
}

.friends-my-id:hover {
    background: rgba(255, 170, 0, 0.1);
    border-color: rgba(255, 170, 0, 0.4);
}

/* Тактические табы */
.friends-tabs {
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 170, 0, 0.1);
    padding: 10px 14px;
    gap: 6px;
}

.friends-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
    padding: 8px 10px;
    font-size: 11px;
}

.friends-tab:hover {
    background: rgba(255, 170, 0, 0.08);
    border-color: rgba(255, 170, 0, 0.25);
}

.friends-tab.active {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(255, 170, 0, 0.08));
    border-color: rgba(255, 170, 0, 0.4);
    border-left: 2px solid #ffaa00;
}

.friends-count {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0;
    clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px);
}

.friends-tab.active .friends-count {
    background: rgba(255, 170, 0, 0.25);
}

/* Тактический поиск */
.friends-search {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 170, 0, 0.08);
    padding: 10px 14px;
}

.friends-search input {
    font-size: 13px;
}

/* Тактические карточки друзей */
.friend-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 170, 0, 0.1);
    border-radius: 0;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
    padding: 10px 12px;
}

.friend-item:hover {
    background: rgba(255, 170, 0, 0.06);
    border-color: rgba(255, 170, 0, 0.25);
    border-left: 2px solid rgba(255, 170, 0, 0.5);
}

.friend-item.request {
    border-color: rgba(0, 170, 255, 0.25);
    background: rgba(0, 170, 255, 0.04);
    border-left: 2px solid rgba(0, 170, 255, 0.6);
}

/* Тактические аватары */
.friend-avatar img {
    border-radius: 0;
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    border: 2px solid rgba(255, 170, 0, 0.15);
}

.friend-status {
    border-radius: 0;
    clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px);
    border: 2px solid rgba(10, 10, 20, 0.95);
}

/* Тактические action кнопки */
.friend-action {
    border-radius: 0;
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}

/* Тактическая секция добавления */
.friends-add-section {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 170, 0, 0.15);
    padding: 12px 14px;
}

.friends-add-section input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-radius: 0;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}

.friends-add-section input:focus {
    border-color: rgba(255, 170, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.1);
}

.friends-add-btn {
    border-radius: 0;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}

/* Тактический confirm modal */
.social-confirm-content {
    background: linear-gradient(145deg, rgba(10, 10, 20, 0.98), rgba(5, 5, 15, 0.98));
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-left: 3px solid #ffaa00;
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.social-confirm-btn {
    border-radius: 0;
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}

/* Тактические notifications */
.social-notification-content {
    border-radius: 0;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
    border-left: 3px solid #ffaa00;
}

.social-notification.success .social-notification-content {
    border-left-color: #00ff88;
}

.social-notification.error .social-notification-content {
    border-left-color: #ff4444;
}

/* Mobile tactical fixes */
@media (max-width: 500px) {
    .friends-modal-content {
        clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    }

    .friends-tabs {
        padding: 8px 10px;
        gap: 4px;
    }

    .friends-tab {
        padding: 7px 6px;
        font-size: 10px;
        clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    }

    .friend-item {
        clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    }
}
