/* Clan Modal Styles */
.clan-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.clan-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
}

.clan-tab.active {
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}

.clan-tab-content {
    display: none;
}

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

/* Clan Info */
.clan-info-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.clan-header {
    background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.2), rgba(var(--secondary-rgb), 0.2));
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-name-tag {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.clan-tag {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
}

.clan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.clan-description {
    color: #94a3b8;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.clan-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.clan-stat {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.clan-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.clan-stat-label {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Clan Bonus */
.clan-bonus {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.1));
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.clan-bonus-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: #a855f7;
    font-weight: 600;
}

.clan-bonus-progress {
    margin: 1rem 0;
}

.clan-bonus-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.clan-bonus-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a855f7);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.clan-bonus-info {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Clan Members */
.clan-members {
    margin-top: 1.5rem;
}

.clan-members-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.member-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.clan-member {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.clan-member:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.member-role {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.role-leader {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    color: white;
}

.role-officer {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    color: white;
}

.role-member {
    background: linear-gradient(145deg, #10b981, #059669);
    color: white;
}

.member-contribution {
    text-align: right;
}

.contribution-value {
    font-weight: 700;
    color: var(--text);
    font-size: 1.1rem;
}

.contribution-label {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Clan Actions */
.clan-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.clan-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.clan-btn.primary {
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    color: white;
}

.clan-btn.danger {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    color: white;
}

.clan-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

/* Create Clan Form */
.clan-form-group {
    margin-bottom: 1.5rem;
}

.clan-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.clan-form-group input,
.clan-form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.clan-form-group input:focus,
.clan-form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.clan-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.clan-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.price-label {
    font-weight: 600;
    color: #ffd700;
}

.price-amount {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: #ffd700;
}

/* Top Clans */
.top-clans-container {
    max-height: 400px;
    overflow-y: auto;
}

.top-clan-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.top-clan-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.clan-rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.clan-rank.rank-1 {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    color: white;
}

.clan-rank.rank-2 {
    background: linear-gradient(145deg, #94a3b8, #64748b);
    color: white;
}

.clan-rank.rank-3 {
    background: linear-gradient(145deg, #92400e, #78350f);
    color: white;
}

.clan-rank.rank-other {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.top-clan-info {
    flex: 1;
}

.top-clan-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.top-clan-tag {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.8rem;
}

.top-clan-members {
    font-size: 0.85rem;
    color: #94a3b8;
}

.top-clan-clicks {
    text-align: right;
}

.clan-clicks-value {
    font-weight: 700;
    color: var(--text);
    font-size: 1.1rem;
}

.clan-clicks-label {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Invites */
.invites-container {
    max-height: 400px;
    overflow-y: auto;
}

.clan-invite {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.invite-clan-info {
    flex: 1;
}

.invite-clan-name {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.invite-clan-details {
    font-size: 0.85rem;
    color: #94a3b8;
}

.invite-actions {
    display: flex;
    gap: 0.5rem;
}

.invite-btn {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.invite-btn.accept {
    background: linear-gradient(145deg, #10b981, #059669);
    color: white;
}

.invite-btn.decline {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

/* Empty States */
.clan-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.clan-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.clan-empty-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.clan-empty-text {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Clan Badge in Menu */
.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(145deg, #ef4444, #dc2626);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}


/* Clan Chat */
.clan-chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.clan-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.clan-message {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 3px solid var(--primary);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.message-sender {
    font-weight: 600;
    color: var(--text);
}

.message-role {
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.message-role.leader {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    color: white;
}

.message-role.officer {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    color: white;
}

.message-role.member {
    background: linear-gradient(145deg, #10b981, #059669);
    color: white;
}

.message-time {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: auto;
}

.message-content {
    color: #e2e8f0;
    line-height: 1.4;
    word-break: break-word;
}

.clan-chat-input-container {
    display: flex;
    gap: 0.5rem;
}

.clan-chat-input-container input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.clan-chat-input-container input:focus {
    border-color: var(--primary);
}

.chat-send-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

/* Clan Settings */
.clan-settings-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.clan-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text);
    font-size: 1rem;
}

.setting-info p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(145deg, var(--primary), var(--secondary));
}

input:checked + .slider:before {
    transform: translateX(30px);
}

/* Level Input */
.level-input {
    width: 60px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text);
    text-align: center;
    font-size: 1rem;
    outline: none;
}

.level-input:focus {
    border-color: var(--primary);
}

/* Danger Zone */
.danger-zone {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.danger-zone h4 {
    color: #ef4444;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Transfer Leadership */
.transfer-search {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.transfer-results {
    max-height: 200px;
    overflow-y: auto;
    margin: 1rem 0;
}

.transfer-member {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.transfer-member:hover {
    background: rgba(255, 255, 255, 0.1);
}

.transfer-member.selected {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
}

/* Disband Clan */
.disband-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ef4444;
    margin: 1rem 0;
    font-weight: 600;
}

.disband-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.disband-input:focus {
    border-color: #ef4444;
}



/* Invite to Clan Modal */
.invite-clan-container {
    max-height: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.invite-search-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.search-input-group .search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input-group .search-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
}

.search-input-group .search-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-input-group .search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

.search-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
}

/* Search Results */
.search-results-container {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.no-search-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-search-results h4 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.no-search-results p {
    font-size: 0.9rem;
}

/* Player Result Item */
.player-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.player-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.player-details {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

.player-detail-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.player-actions {
    display: flex;
    gap: 0.5rem;
}

.invite-action-btn {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.invite-action-btn.primary {
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    color: white;
}

.invite-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

.invite-action-btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.invite-action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.invite-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Clan Members Preview */
.clan-members-preview {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-members-preview h4 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.members-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.member-preview-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 0.9rem;
}

.member-preview-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(145deg, #8b5cf6, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.member-role-badge {
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.role-leader-badge {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    color: white;
}

.role-officer-badge {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    color: white;
}

.role-member-badge {
    background: linear-gradient(145deg, #10b981, #059669);
    color: white;
}

/* Loading State */
.loading-results {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.error-results {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
}

.error-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.clan-requests {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.clan-requests-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: white;
    margin-bottom: 15px;
}

.requests-badge {
    background: #8b5cf6;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.clan-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
}

.request-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.request-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(145deg, #8b5cf6, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.request-user-details {
    flex: 1;
}

.request-user-name {
    font-weight: 600;
    color: white;
}

.request-user-stats {
    display: flex;
    gap: 15px;
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

.request-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.request-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.request-btn.accept {
    background: linear-gradient(145deg, #10b981, #059669);
    color: white;
}

.request-btn.decline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==============================================
   КОМПЛЕКТНЫЕ СТИЛИ ДЛЯ КЛАНОВОЙ СИСТЕМЫ
   ============================================== */

/* 1. ОСНОВНЫЕ СТИЛИ МОДАЛЬНОГО ОКНА */
#clanModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.clan-modal-content {
    width: 100%;
    max-width: 900px;
    min-height: 600px;
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.clan-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.9);
    position: relative;
}

.clan-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.clan-modal-header .material-symbols-rounded {
    font-size: 32px;
}

.clan-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}

.clan-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

/* 2. СТИЛИ ВКЛАДОК */
.clan-tabs {
    display: flex;
    padding: 0 32px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 4px;
}

.clan-tab {
    padding: 16px 24px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clan-tab:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

.clan-tab.active {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.clan-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    border-radius: 3px 3px 0 0;
}

.clan-tab .material-symbols-rounded {
    font-size: 20px;
}

.clan-tab-content {
    display: none;
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.clan-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 3. СТИЛИ КАРТОЧКИ КЛАНА */
.clan-header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.clan-name-tag {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.clan-tag {
    background: rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    border: 1px solid rgba(139, 92, 246, 0.5);
}

.clan-name {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.clan-description {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid #8b5cf6;
}

.clan-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.clan-stat {
    flex: 1;
    background: rgba(30, 41, 59, 0.8);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.clan-stat:hover {
    transform: translateY(-4px);
    border-color: #8b5cf6;
}

.clan-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
}

.clan-stat-label {
    font-size: 14px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 4. БОНУСЫ КЛАНА */
.clan-bonus {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.15));
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.clan-bonus-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f59e0b;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.clan-bonus-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.clan-bonus-info div {
    background: rgba(245, 158, 11, 0.1);
    padding: 12px;
    border-radius: 8px;
    color: #fbbf24;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clan-bonus-progress {
    margin-top: 20px;
}

.clan-bonus-progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.clan-bonus-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.clan-bonus-progress-info {
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
}

/* 5. СПИСОК УЧАСТНИКОВ */
.clan-members {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-members-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clan-member {
    display: flex;
    align-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    position: relative;
}

.clan-member:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(4px);
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    margin-right: 16px;
    flex-shrink: 0;
}

.member-info {
    flex: 1;
}

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

.member-role {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
}

.role-leader {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1e293b;
}

.role-officer {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
}

.role-member {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.member-contribution {
    text-align: right;
    padding: 0 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
}

.contribution-value {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 4px;
}

.contribution-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 6. КНОПКИ ДЕЙСТВИЙ */
.clan-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-btn {
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
}

.clan-btn.primary {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
}

.clan-btn.primary:hover {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.clan-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.clan-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.5);
}

.clan-btn.chat {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.clan-btn.chat:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.clan-btn.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.clan-btn.danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.clan-btn.transfer {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.clan-btn.transfer:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

/* 7. ТОП КЛАНОВ */
.top-clans-container {
    padding: 24px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.top-clans-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
    text-align: center;
}

.top-clans-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.top-clan-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s;
}

.top-clan-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(8px);
}

.top-clan-rank {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-right: 24px;
    flex-shrink: 0;
}

.rank-1 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.rank-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: 0 0 20px rgba(148, 163, 184, 0.5);
}

.rank-3 {
    background: linear-gradient(135deg, #92400e, #78350f);
    box-shadow: 0 0 20px rgba(146, 64, 14, 0.5);
}

.top-clan-info {
    flex: 1;
}

.top-clan-name {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.top-clan-tag {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.top-clan-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.top-clan-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
}

.top-clan-stats .clan-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
    background: none;
    padding: 0;
    border: none;
}

.top-clan-description {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.5;
}

.top-clan-action {
    color: #94a3b8;
    font-size: 24px;
}

/* 8. ФОРМА СОЗДАНИЯ КЛАНА */
.create-clan-form {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.create-clan-form h3 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 32px;
    text-align: center;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 8px;
}

/* 9. ПРИГЛАШЕНИЯ */
.invites-container {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.invites-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.invites-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.clan-invite-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.invite-clan-info {
    flex: 1;
}

.invite-clan-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.invite-clan-tag {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.invite-clan-name {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.invite-clan-details {
    display: flex;
    gap: 24px;
}

.invite-clan-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
}

.invite-actions {
    display: flex;
    gap: 12px;
}

.invite-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.invite-btn.accept {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.invite-btn.accept:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
}

.invite-btn.decline {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.invite-btn.decline:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* 10. ЗАЯВКИ НА ВСТУПЛЕНИЕ */
.clan-requests {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-requests-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.requests-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clan-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.request-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.request-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.request-user-details {
    flex: 1;
}

.request-user-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.request-user-stats {
    display: flex;
    gap: 16px;
}

.request-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 13px;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.request-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.request-btn.accept {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.request-btn.accept:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
}

.request-btn.decline {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.request-btn.decline:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* 11. АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    .clan-modal-content {
        max-width: 95%;
        min-height: 500px;
    }
    
    .clan-tabs {
        padding: 0 16px;
        overflow-x: auto;
    }
    
    .clan-tab {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .clan-tab-content {
        padding: 20px;
    }
    
    .clan-stats {
        flex-direction: column;
    }
    
    .clan-actions {
        grid-template-columns: 1fr;
    }
    
    .top-clan-item {
        flex-direction: column;
        text-align: center;
    }
    
    .top-clan-rank {
        margin-right: 0;
        margin-bottom: 16px;
    }
    
    .invite-actions,
    .request-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .invite-btn,
    .request-btn {
        width: 100%;
        justify-content: center;
    }
    
    .clan-member {
        flex-wrap: wrap;
    }
    
    .member-contribution {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 8px 0 0;
        margin-top: 8px;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .clan-name-tag {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .clan-name {
        font-size: 24px;
    }
    
    .clan-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* 12. АНИМАЦИИ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.loading-state {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.loading-state .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(139, 92, 246, 0.3);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.empty-requests,
.empty-members {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 16px;
}

/* 13. ПОЛЬЗОВАТЕЛЬСКИЕ МОДАЛКИ */
.view-clan-modal,
.clan-chat-modal,
.settings-modal,
.transfer-modal,
.invite-modal {
    width: 90%;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease;
}

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

/* 14. СКРОЛЛБАР */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #db2777);
}

/* 15. СПЕЦИАЛЬНЫЕ ЭЛЕМЕНТЫ */
.requests-badge,
#invitesBadge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    padding: 0 6px;
}

.clan-search-input {
    width: 100%;
    padding: 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    margin-bottom: 20px;
}

.clan-search-input::placeholder {
    color: #64748b;
}
/* ==============================================
   ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ КЛАНОВОЙ СИСТЕМЫ
   ============================================== */

/* 1. ОСНОВНЫЕ ФИКСЫ ДЛЯ МОДАЛЬНОГО ОКНА */
#clanModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999; /* Увеличил z-index */
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden; /* Запрещаем прокрутку самого модального окна */
}

.clan-modal-content {
    width: 100%;
    max-width: 900px;
    max-height: 90vh; /* Ограничиваем высоту */
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10000; /* Выше чем фон */
}

/* 2. ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ 1 ЗАПРОСА (МАЛОГО КОЛИЧЕСТВА) */
.clan-requests {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; /* Для правильного позиционирования */
}

/* Стиль когда заявок мало (1 или 2) */
.clan-requests:has(.clan-request-item:only-child),
.clan-requests:has(.clan-request-item:first-child:nth-last-child(2)) {
    padding-bottom: 80px; /* Добавляем место для кнопок */
}

.clan-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 12px; /* Отступ между элементами */
    position: relative;
    z-index: 1;
}

/* Исправляем позиционирование кнопок для 1 заявки */
.clan-request-item:only-child .request-actions {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

/* Исправляем позиционирование кнопок для 2 заявок */
.clan-request-item:first-child:nth-last-child(2) .request-actions {
    position: static;
    margin-top: 12px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 3. ИСПРАВЛЕНИЕ НАКЛАДЫВАНИЯ ЭЛЕМЕНТОВ */
.clan-member {
    display: flex;
    align-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    position: relative;
    margin-bottom: 8px; /* Отступ между участниками */
    min-height: 80px; /* Фиксированная высота */
    z-index: 1; /* Гарантируем правильный z-index */
}

/* Фикс для кнопки действий участника */
.member-action-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto; /* Автоматический отступ слева */
    margin-right: 0;
    position: relative;
    z-index: 2;
    width: 36px;
    height: 36px;
    flex-shrink: 0; /* Запрещаем сжатие */
}

.member-action-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

/* 4. ИСПРАВЛЕНИЕ КОНТЕЙНЕРОВ СКРОЛЛА */
.clan-tab-content {
    display: none;
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.clan-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Фикс для прокрутки внутри вкладки */
#my-clan-tab,
#top-clans-tab,
#create-clan-tab,
#invites-tab {
    overflow-y: auto;
    max-height: calc(90vh - 160px); /* Высота минус заголовок и вкладки */
}
/* 1. УБРАТЬ РАЗДЕЛИТЕЛЬ И УВЕЛИЧИТЬ ОТСТУП ДЛЯ ИМЕНИ */
.clan-member .member-contribution {
    border-left: none !important; /* ← ЭТО ГЛАВНОЕ: убрать вертикальную линию */
    padding-left: 20px !important; /* ← Уменьшить отступ слева */
    margin-left: 0 !important; /* ← Убрать отступ */
}

/* 2. ДАТЬ БОЛЬШЕ МЕСТА ДЛЯ ИМЕНИ */
.clan-member .member-info {
    flex: 2 !important; /* ← Дать больше пространства имени (было flex: 1) */
    min-width: 200px !important; /* ← Минимальная ширина для имени */
    padding-right: 20px !important; /* ← Добавить отступ справа */
}

/* 3. РАЗРЕШИТЬ ПОЛНОЕ ОТОБРАЖЕНИЕ ИМЕНИ */
.member-name {
    white-space: normal !important; /* ← Разрешить перенос строк */
    word-break: break-word !important; /* ← Переносить длинные слова */
    max-width: none !important; /* ← Убрать ограничение ширины */
    overflow: visible !important; /* ← Разрешить переполнение */
}
/* ==============================================
   ИСПРАВЛЕНИЕ: ВКЛАД И 3 ТОЧКИ В КОНТЕЙНЕРЕ
   ============================================== */

/* 1. ОСНОВНОЙ КОНТЕЙНЕР УЧАСТНИКА */
.clan-member {
    display: flex;
    align-items: center;
    padding: 16px 20px !important;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
    min-height: 84px;
    position: relative;
    overflow: visible !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 16px !important;
}

/* 2. ПРАВИЛЬНОЕ РАСПРЕДЕЛЕНИЕ ПРОСТРАНСТВА */
.clan-member .member-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 22px;
    flex-shrink: 0;
}

.clan-member .member-info {
    flex: 1 !important; /* ЗАНИМАЕТ ОСТАВШЕЕСЯ ПРОСТРАНСТВО */
    min-width: 0 !important; /* РАЗРЕШАЕМ СЖАТИЕ */
    padding-right: 16px !important;
    overflow: hidden !important; /* СКРЫВАЕМ ПЕРЕПОЛНЕНИЕ ТЕКСТА */
}

/* 3. ВКЛАД - ФИКСИРОВАННАЯ ШИРИНА */
.clan-member .member-contribution {
    text-align: right;
    padding: 8px 12px !important;
    min-width: 70px !important; /* ФИКСИРОВАННАЯ ШИРИНА */
    max-width: 80px !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    margin-left: 8px !important;
    margin-right: 8px !important;
    box-sizing: border-box !important;
}

/* 4. КНОПКА 3 ТОЧЕК */
.clan-member .member-action-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 5. ИМЯ С ПРАВИЛЬНЫМ ПЕРЕНОСОМ */
.member-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    white-space: nowrap !important; /* НЕ ПЕРЕНОСИТЬ НА НОВУЮ СТРОКУ */
    overflow: hidden !important; /* СКРЫТЬ ПЕРЕПОЛНЕНИЕ */
    text-overflow: ellipsis !important; /* МНОГОТОЧИЕ ЕСЛИ ДЛИННОЕ */
    max-width: 100% !important;
    display: block;
}

/* 6. АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ */
@media (max-width: 768px) {
    .clan-member {
        flex-wrap: wrap;
        padding: 16px !important;
        gap: 12px !important;
    }
    
    .clan-member .member-avatar {
        width: 48px;
        height: 48px;
    }
    
    .clan-member .member-info {
        flex: 1 1 calc(100% - 60px) !important;
        padding-right: 40px !important;
    }
    
    .member-name {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        padding-right: 40px;
    }
    
    .clan-member .member-contribution {
        order: 4;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 12px 0 0 0 !important;
        padding: 12px !important;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 0 0 8px 8px !important;
        border: none !important;
        background: transparent !important;
    }
    
    .clan-member .member-action-btn {
        position: absolute;
        top: 16px;
        right: 16px;
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    .clan-member {
        padding: 12px !important;
    }
    
    .clan-member .member-avatar {
        width: 44px;
        height: 44px;
    }
    
    .member-name {
        font-size: 14px;
        padding-right: 36px;
    }
    
    .clan-member .member-action-btn {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
    }
}

/* 7. ГАРАНТИЯ ЧТО ВСЕ В КОНТЕЙНЕРЕ */
.member-list {
    width: 100% !important;
    overflow-x: hidden !important; /* Скрываем горизонтальный скролл */
}

.clan-members {
    overflow: hidden !important; /* Гарантируем что ничего не вылезет */
}

/* 8. ПОДСКАЗКА ДЛЯ ДЛИННЫХ ИМЕН */
.member-name {
    position: relative;
}

.member-name[title]:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: normal;
    max-width: 300px;
    z-index: 1000;
    margin-top: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 9. ФИНАЛЬНЫЕ ИСПРАВЛЕНИЯ */
.clan-member > * {
    box-sizing: border-box !important;
}

/* Убираем горизонтальный скролл */
#myClanInfo {
    overflow-x: hidden !important;
}
/* 5. ИСПРАВЛЕНИЕ СПИСКОВ */
.member-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

/* 6. ИСПРАВЛЕНИЕ КНОПОК ЗАЯВОК */
.request-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0; /* Запрещаем сжатие */
    margin-left: 16px; /* Фиксированный отступ */
}

.request-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap; /* Запрещаем перенос текста */
    flex-shrink: 0; /* Запрещаем сжатие */
}

/* 7. ИСПРАВЛЕНИЕ РАСПОЛОЖЕНИЯ ЭЛЕМЕНТОВ */
.member-contribution {
    text-align: right;
    padding: 0 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
    margin-left: auto; /* Автоматический отступ слева */
    margin-right: 16px; /* Фиксированный отступ справа */
    flex-shrink: 0; /* Запрещаем сжатие */
}

/* 8. ИСПРАВЛЕНИЕ ПРИГЛАШЕНИЙ */
.clan-invite-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    min-height: 100px;
}

.invite-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0; /* Запрещаем сжатие */
    margin-left: 16px; /* Фиксированный отступ */
}

/* 9. ИСПРАВЛЕНИЕ ЗАГОЛОВКОВ */
.clan-members-title,
.clan-requests-title,
.invites-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 10. ИСПРАВЛЕНИЕ ПРОГРЕСС БАРА */
.clan-bonus-progress {
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.clan-bonus-progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

/* 11. ИСПРАВЛЕНИЕ СТИЛЕЙ ДЛЯ МАЛОГО КОЛИЧЕСТВА ДАННЫХ */
/* Стиль когда нет заявок */
.requests-list:has(.empty-requests) {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-requests {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 16px;
    width: 100%;
}

/* Стиль когда 1 заявка */
.requests-list:has(.clan-request-item:only-child) {
    padding-bottom: 60px; /* Добавляем место для кнопок снизу */
}

/* Стиль когда 2 заявки */
.requests-list:has(.clan-request-item:first-child:nth-last-child(2)) {
    padding-bottom: 40px;
}

/* 12. ИСПРАВЛЕНИЕ ПОЗИЦИОНИРОВАНИЯ ЭЛЕМЕНТОВ ВНУТРИ ЗАЯВКИ */
.request-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0; /* Разрешаем сжатие текста */
}

.request-user-details {
    flex: 1;
    min-width: 0; /* Разрешаем сжатие текста */
    overflow: hidden; /* Скрываем переполнение */
}

.request-user-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 13. ИСПРАВЛЕНИЕ КОНТЕКСТНОГО МЕНЮ */
.member-actions-menu {
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 8px;
    min-width: 200px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10001; /* Выше чем основной контент */
    position: fixed; /* Фиксированное позиционирование */
}

/* 14. ИСПРАВЛЕНИЕ СТИЛЕЙ ДЛЯ АДАПТИВНОСТИ */
@media (max-width: 768px) {
    /* Исправление для мобильных с 1 заявкой */
    .clan-request-item:only-child .request-actions {
        position: static;
        width: 100%;
        margin-top: 16px;
        justify-content: center;
    }
    
    .clan-request-item:first-child:nth-last-child(2) .request-actions {
        justify-content: center;
    }
    
    /* Исправление наложения на мобильных */
    .clan-member {
        flex-wrap: wrap;
        padding-bottom: 60px; /* Добавляем место для кнопок */
    }
    
    .member-action-btn {
        position: absolute;
        bottom: 16px;
        right: 16px;
        margin: 0;
    }
    
    .member-contribution {
        position: absolute;
        bottom: 16px;
        left: 16px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 8px 0 0;
        margin: 0;
        width: calc(100% - 32px);
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .contribution-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* Дополнительные фиксы для очень маленьких экранов */
    .request-actions {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
        margin-top: 12px;
    }
    
    .request-btn {
        width: 100%;
        justify-content: center;
    }
    
    .clan-request-item {
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 80px; /* Больше места для кнопок */
    }
    
    .request-user-info {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* 15. ИСПРАВЛЕНИЕ ПЕРЕПОЛНЕНИЯ ТЕКСТА */
.member-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* 16. ФИКС ДЛЯ ВКЛАДОК */
.clan-tabs {
    display: flex;
    padding: 0 32px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 4px;
    position: sticky;
    top: 0;
    z-index: 10; /* Выше чем контент вкладок */
}

/* 17. ИСПРАВЛЕНИЕ СКРОЛЛБАРА ВНУТРИ ВКЛАДОК */
.clan-tab-content::-webkit-scrollbar {
    width: 6px;
}

.clan-tab-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.clan-tab-content::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 3px;
}

/* 18. ПРЕДОТВРАЩЕНИЕ ВЫПАДАНИЯ ЗА ПРЕДЕЛЫ КОНТЕЙНЕРА */
.clan-modal-content > * {
    box-sizing: border-box;
}

/* 19. ИСПРАВЛЕНИЕ ДЛЯ ПУСТОГО СОСТОЯНИЯ КЛАНА */
.clan-empty-state {
    text-align: center;
    padding: 60px 40px;
    color: #94a3b8;
    position: relative;
    z-index: 1;
}

/* 20. ФИНАЛЬНЫЕ ИСПРАВЛЕНИЯ ДЛЯ КНОПОК */
.clan-btn {
    position: relative;
    z-index: 1;
}

/* Убедимся что все элементы имеют правильные z-index */
.clan-modal-content > * {
    position: relative;
    z-index: 1;
}

/* Фон для предотвращения наложения */
.clan-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, #0f172a, #1e293b);
    z-index: -1;
    pointer-events: none;
}

/* ==============================================
   СТИЛИ ДЛЯ ОКНА ПРОСМОТРА КЛАНА (ИЗ ТОПА)
   ============================================== */

/* Модальное окно просмотра клана */
#viewClanModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 99999; /* Самый высокий z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalBgFadeIn 0.3s ease;
}

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

.view-clan-modal {
    width: 90%;
    max-width: 500px;
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border-radius: 24px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: viewClanSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes viewClanSlideIn {
    from {
        opacity: 0;
        transform: translateY(-60px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.view-clan-modal .modal-header {
    padding: 28px 32px 20px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(15, 23, 42, 0.9);
}

.view-clan-modal .modal-title {
    font-size: 24px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    gap: 12px;
}

.view-clan-content {
    padding: 0;
}

.view-clan-header {
    padding: 32px;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1), 
        rgba(236, 72, 153, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.view-clan-name-tag {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.view-clan-tag {
    background: rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 1.5px;
    border: 2px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.view-clan-header h3 {
    font-size: 32px;
    font-weight: 900;
    color: white;
    margin: 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    flex: 1;
}

.view-clan-description {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.6;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid #8b5cf6;
    margin-bottom: 24px;
}

.view-clan-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.view-clan-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.view-clan-stat:hover {
    transform: translateY(-4px);
    border-color: #8b5cf6;
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.2);
}

.view-clan-stat .material-symbols-rounded {
    font-size: 28px;
    color: #8b5cf6;
    margin-bottom: 8px;
}

.view-clan-stat:nth-child(2) .material-symbols-rounded {
    color: #10b981;
}

.view-clan-stat:nth-child(3) .material-symbols-rounded {
    color: #f59e0b;
}

.view-clan-stat span:last-child {
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
    font-weight: 600;
}

.view-clan-bonus {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.15), 
        rgba(251, 191, 36, 0.15));
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    font-weight: 700;
    font-size: 16px;
}

.view-clan-bonus .material-symbols-rounded {
    font-size: 24px;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.8));
    }
}

.view-clan-actions {
    padding: 32px;
    text-align: center;
    background: rgba(15, 23, 42, 0.9);
}

.view-clan-actions .modal-btn {
    min-width: 280px;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.view-clan-actions .modal-btn::before {

    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s;
}

.view-clan-actions .modal-btn:hover::before {
    left: 100%;
}

.view-clan-actions .modal-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.view-clan-actions .modal-btn:disabled:hover {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

/* Адаптивность для окна просмотра клана */
@media (max-width: 768px) {
    .view-clan-modal {
        max-width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .view-clan-header {
        padding: 24px;
    }
    
    .view-clan-name-tag {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .view-clan-header h3 {
        font-size: 24px;
    }
    
    .view-clan-tag {
        font-size: 16px;
        padding: 8px 16px;
    }
    
    .view-clan-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .view-clan-description {
        font-size: 14px;
        padding: 16px;
    }
    
    .view-clan-actions {
        padding: 24px;
    }
    
    .view-clan-actions .modal-btn {
        min-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .view-clan-modal {
        border-radius: 16px;
    }
    
    .view-clan-header {
        padding: 20px;
    }
    
    .view-clan-actions {
        padding: 20px;
    }
    
    .view-clan-actions .modal-btn {
        padding: 16px 24px;
        font-size: 16px;
    }
}

/* Стили для кнопок в топ-кланах при наведении */
.top-clan-item {
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-clan-item:hover {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.15), 
        rgba(236, 72, 153, 0.15));
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.2);
}

.top-clan-item::after {

    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(139, 92, 246, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s, top 0.3s;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.top-clan-item:hover::after {
    opacity: 1;
    top: -40px;
}

/* Иконка стрелки в топ-кланах */
.top-clan-action .material-symbols-rounded {
    transition: all 0.3s;
    font-size: 28px;
}

.top-clan-item:hover .top-clan-action .material-symbols-rounded {
    color: #8b5cf6;
    transform: translateX(5px);
}

/* Улучшенные анимации для модалки */
.view-clan-modal {
    animation: modalAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalAppear {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.95) rotateX(-10deg);
    }
    50% {
        transform: translateY(10px) scale(1.02) rotateX(5deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
    }
}

/* Пульсирующая анимация для кнопки подачи заявки */
@keyframes pulseRequest {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(139, 92, 246, 0.8), 
                    0 0 0 5px rgba(139, 92, 246, 0.2);
    }
}

.view-clan-actions .modal-btn:not(:disabled) {
    animation: pulseRequest 2s infinite;
}

.view-clan-actions .modal-btn:not(:disabled):hover {
    animation: none;
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6);
}

/* Индикатор загрузки при отправке заявки */
.loading-request {
    position: relative;
    color: transparent !important;
}

.loading-request::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Уведомление об успешной отправке заявки */
.request-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    z-index: 100000;
    animation: slideInRight 0.3s ease, slideOutRight 0.3s ease 2.7s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ==============================================
   СТИЛИ ДЛЯ КОНТЕКСТНОГО МЕНЮ УЧАСТНИКОВ
   ============================================== */

/* 1. КОНТЕКСТНОЕ МЕНЮ ДЕЙСТВИЙ */
.member-actions-menu {
    position: fixed;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    min-width: 280px;
    max-width: 320px;
    backdrop-filter: blur(20px);
    z-index: 100001; /* Выше всех других элементов */
    animation: menuSlideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 2. ЗАГОЛОВОК МЕНЮ */
.member-actions-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.2), 
        rgba(236, 72, 153, 0.2));
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.member-actions-title {
    font-size: 18px;
    font-weight: 800;
    color: white;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-actions-title::before {
    content: '👤';
    font-size: 20px;
}

.member-actions-role {
    font-size: 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    display: inline-block;
}

/* 3. СПИСОК ДЕЙСТВИЙ */
.member-actions-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.member-action-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(139, 92, 246, 0.1), 
        transparent);
    transition: left 0.5s;
}

.member-action-item:hover::before {
    left: 100%;
}

.member-action-item:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateX(4px);
    color: white;
}

.member-action-item .material-symbols-rounded {
    font-size: 20px;
    transition: transform 0.2s;
    min-width: 24px;
}

.member-action-item:hover .material-symbols-rounded {
    transform: scale(1.2);
}

/* 4. СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ КНОПОК */
.member-action-item.promote {
    color: #8b5cf6;
}

.member-action-item.promote:hover {
    background: rgba(139, 92, 246, 0.2);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.member-action-item.danger {
    color: #ef4444;
}

.member-action-item.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.member-action-item.transfer {
    color: #f59e0b;
}

.member-action-item.transfer:hover {
    background: rgba(245, 158, 11, 0.2);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* 5. РАЗДЕЛИТЕЛЬ */
.member-actions-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 20px;
}

/* 6. АДАПТИВНОСТЬ МЕНЮ */
@media (max-width: 768px) {
    .member-actions-menu {
        position: fixed;
        top: auto !important;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        animation: menuSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes menuSlideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .member-action-item {
        padding: 18px 24px;
        font-size: 16px;
    }
}

/* 7. МОДАЛЬНЫЕ ОКНА ПОДТВЕРЖДЕНИЯ */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalBgFadeIn 0.3s ease;
}

.confirm-modal-content {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 24px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    animation: confirmModalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.confirm-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.confirm-modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.confirm-modal-icon.promote {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    color: #8b5cf6;
}

.confirm-modal-icon.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    color: #ef4444;
}

.confirm-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin: 0;
}

.confirm-modal-text {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.confirm-modal-player {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.confirm-modal-player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 20px;
}

.confirm-modal-player-name {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.confirm-modal-player-role {
    font-size: 14px;
    color: #94a3b8;
}

.confirm-modal-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.confirm-modal-btn {
    flex: 1;
    padding: 18px 32px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.confirm-modal-btn.yes {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.confirm-modal-btn.yes:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.confirm-modal-btn.promote {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.confirm-modal-btn.promote:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.confirm-modal-btn.no {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.confirm-modal-btn.no:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 8. УВЕДОМЛЕНИЯ О ДЕЙСТВИЯХ */
.action-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px 24px;
    border-radius: 16px;
    color: white;
    font-weight: 600;
    z-index: 100003;
    animation: notificationSlideIn 0.3s ease, 
               notificationSlideOut 0.3s ease 2.7s;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 400px;
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.action-notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
    border-left: 4px solid #34d399;
}

.action-notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-left: 4px solid #f87171;
}

.action-notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-left: 4px solid #60a5fa;
}

/* 9. СТИЛИ ДЛЯ КНОПКИ В УЧАСТНИКАХ */
.clan-member .member-action-btn {
    position: relative;
    z-index: 2;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 16px;
}

.clan-member .member-action-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
    transform: rotate(90deg);
}

.clan-member .member-action-btn .material-symbols-rounded {
    font-size: 20px;
}

/* 10. ИНДИКАТОР РОЛИ В МЕНЮ */
.role-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.role-indicator.leader {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.2));
    color: #f59e0b;
}

.role-indicator.officer {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    color: #8b5cf6;
}

.role-indicator.member {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

/* 11. ЗАЩИТНЫЕ СТИЛИ ДЛЯ ПЕРЕКРЫТИЙ */
.member-actions-menu::before,
.confirm-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

/* 12. АДАПТИВНОСТЬ ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ */
@media (max-width: 480px) {
    .confirm-modal-content {
        padding: 24px;
    }
    
    .confirm-modal-header {
        flex-direction: column;
        text-align: center;
    }
    
    .confirm-modal-title {
        font-size: 20px;
    }
    
    .confirm-modal-text {
        font-size: 14px;
        padding: 16px;
    }
    
    .confirm-modal-buttons {
        flex-direction: column;
    }
    
    .confirm-modal-btn {
        width: 100%;
    }
    
    .action-notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* 13. АНИМАЦИИ ЗАКРЫТИЯ */
.member-actions-menu.closing {
    animation: menuSlideOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes menuSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
}

.confirm-modal.closing .confirm-modal-content {
    animation: confirmModalSlideOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* ==============================================
   СТИЛИ ДЛЯ КНОПКИ ЗАКРЫТИЯ ОКНА ЗАЯВКИ В КЛАН
   ============================================== */

/* 1. КНОПКА ЗАКРЫТИЯ В МОДАЛКЕ ПРОСМОТРА КЛАНА */
.view-clan-modal .modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.view-clan-modal .modal-close:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: transparent;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.view-clan-modal .modal-close .material-symbols-rounded {
    font-size: 24px;
    transition: transform 0.3s;
}

.view-clan-modal .modal-close:hover .material-symbols-rounded {
    transform: scale(1.2);
}

/* 2. АНИМАЦИЯ ЗАКРЫТИЯ ОКНА */
.view-clan-modal.closing {
    animation: viewClanSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes viewClanSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

/* 3. КНОПКА ЗАКРЫТИЯ В ОСНОВНОЙ МОДАЛКЕ КЛАНА */
.clan-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.clan-modal-close:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: transparent;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.clan-modal-close .material-symbols-rounded {
    font-size: 24px;
    transition: transform 0.3s;
}

.clan-modal-close:hover .material-symbols-rounded {
    transform: scale(1.2);
}

/* 4. КНОПКА ЗАКРЫТИЯ В ЧАТЕ КЛАНА */
.clan-chat-modal .modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.clan-chat-modal .modal-close:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: transparent;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

/* 5. КНОПКА ЗАКРЫТИЯ В НАСТРОЙКАХ КЛАНА */
.settings-modal .modal-close,
.transfer-modal .modal-close,
.invite-modal .modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.settings-modal .modal-close:hover,
.transfer-modal .modal-close:hover,
.invite-modal .modal-close:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: transparent;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

/* 6. УНИВЕРСАЛЬНАЯ КНОПКА ЗАКРЫТИЯ ДЛЯ ЛЮБЫХ МОДАЛОК */
.modal .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1000;
    margin: 0;
    padding: 0;
}

.modal .modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

/* 7. СТИЛЬ ДЛЯ ЗАКРЫТИЯ ЧЕРЕЗ ESC ИЛИ КЛИК НА ФОН */
.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: -1;
    cursor: pointer;
}

.modal .modal-content {
    cursor: default;
}

/* 8. ИНДИКАТОР ЧТО ЭТО КНОПКА ЗАКРЫТИЯ */
.modal-close {
    position: relative;
}

.modal-close::after {
    content: 'ESC';
    position: absolute;
    top: -25px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #94a3b8;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    font-weight: 600;
    letter-spacing: 1px;
}

.modal-close:hover::after {
    opacity: 1;
}

/* 9. АДАПТИВНОСТЬ КНОПОК ЗАКРЫТИЯ */
@media (max-width: 768px) {
    .view-clan-modal .modal-close,
    .clan-modal-close,
    .clan-chat-modal .modal-close,
    .settings-modal .modal-close,
    .transfer-modal .modal-close,
    .invite-modal .modal-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
    }
    
    .view-clan-modal .modal-close .material-symbols-rounded,
    .clan-modal-close .material-symbols-rounded,
    .clan-chat-modal .modal-close .material-symbols-rounded,
    .settings-modal .modal-close .material-symbols-rounded,
    .transfer-modal .modal-close .material-symbols-rounded,
    .invite-modal .modal-close .material-symbols-rounded {
        font-size: 20px;
    }
    
    .modal-close::after {
        display: none; /* На мобильных не показываем ESC */
    }
}

@media (max-width: 480px) {
    .view-clan-modal .modal-close,
    .clan-modal-close,
    .clan-chat-modal .modal-close,
    .settings-modal .modal-close,
    .transfer-modal .modal-close,
    .invite-modal .modal-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    
    .view-clan-modal .modal-close .material-symbols-rounded,
    .clan-modal-close .material-symbols-rounded,
    .clan-chat-modal .modal-close .material-symbols-rounded,
    .settings-modal .modal-close .material-symbols-rounded,
    .transfer-modal .modal-close .material-symbols-rounded,
    .invite-modal .modal-close .material-symbols-rounded {
        font-size: 18px;
    }
}

/* 10. АНИМАЦИЯ ПРИ НАЖАТИИ КНОПКИ */
.modal-close:active {
    transform: scale(0.95);
}

/* 11. КНОПКА ЗАКРЫТИЯ ДЛЯ КОНТЕКСТНОГО МЕНЮ (если нужно) */
.member-actions-menu-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 11;
}

.member-actions-menu-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

/* 12. ЭФФЕКТ ПРИ ОТКРЫТИИ/ЗАКРЫТИИ */
.modal.closing {
    animation: modalFadeOut 0.3s ease forwards;
}

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

.modal.closing .modal-content {
    animation: modalContentOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalContentOut {
    from {
        transform: scale(1) translateY(0);
    }
    to {
        transform: scale(0.9) translateY(20px);
    }
}

/* 13. ПОДСВЕТКА ПРИ FOCUS (для доступности) */
.modal-close:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

/* 14. ИКОНКА ЗАКРЫТИЯ С АНИМАЦИЕЙ */
.modal-close .close-icon {
    position: relative;
    width: 20px;
    height: 20px;
}

.modal-close .close-icon::before,
.modal-close .close-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: all 0.3s;
}

.modal-close .close-icon::before {
    transform: rotate(45deg);
}

.modal-close .close-icon::after {
    transform: rotate(-45deg);
}

.modal-close:hover .close-icon::before {
    transform: rotate(135deg);
}

.modal-close:hover .close-icon::after {
    transform: rotate(45deg);
}

/* 15. ПРОГРЕСС БАР ЗАКРЫТИЯ (опционально) */
.modal-close-progress {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s linear;
}

.modal-close:hover .modal-close-progress {
    transform: scaleX(1);
}

/* ==============================================
   ИСПРАВЛЕНИЕ 3 ТОЧЕК ДЛЯ ДЕЙСТВИЙ С УЧАСТНИКАМИ
   ============================================== */

/* 1. ПРАВИЛЬНОЕ ПОЗИЦИОНИРОВАНИЕ КОНТЕЙНЕРА УЧАСТНИКА */
.clan-member {
    display: flex;
    align-items: center;
    padding: 16px 16px 16px 20px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 10px;
    min-height: 84px;
    z-index: 1;
    overflow: visible !important; /* Важно: разрешаем переполнение */
    gap: 16px; /* Используем gap вместо margin */
}

/* 2. ИСПРАВЛЕННАЯ КНОПКА 3 ТОЧЕК */
.clan-member .member-action-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
    z-index: 20; /* Выше чем другие элементы */
    margin-left: auto; /* Автоматический отступ слева */
    margin-right: 0;
    order: 4; /* Ставим после вклада */
}

.clan-member .member-action-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    border-color: rgba(139, 92, 246, 0.4);
    color: #8b5cf6;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.clan-member .member-action-btn .material-symbols-rounded {
    font-size: 22px;
    font-weight: 600;
    transition: transform 0.3s;
}

.clan-member .member-action-btn:hover .material-symbols-rounded {
    transform: scale(1.2);
}

/* 3. ПРАВИЛЬНЫЙ ПОРЯДОК ЭЛЕМЕНТОВ */
.clan-member .member-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 22px;
    flex-shrink: 0;
    order: 1;
}

.clan-member .member-info {
    flex: 1;
    min-width: 0;
    order: 2;
}

.clan-member .member-contribution {
    text-align: right;
    padding: 0 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
    flex-shrink: 0;
    order: 3;
}

/* 4. УБЕРЕМ ВЫПАДАНИЕ ЗА ПРЕДЕЛЫ */
.member-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
    padding-right: 8px; /* Добавляем отступ справа */
}

/* 5. ИСПРАВЛЕНИЕ ДЛЯ СКРОЛЛА */
.clan-members {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden; /* Скрываем переполнение контейнера */
}

/* 6. АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ */
@media (max-width: 768px) {
    .clan-member {
        flex-wrap: wrap;
        padding: 16px;
        gap: 12px;
    }
    
    .clan-member .member-action-btn {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        margin: 0;
        order: 5;
    }
    
    .clan-member .member-avatar {
        width: 48px;
        height: 48px;
        order: 1;
    }
    
    .clan-member .member-info {
        flex: 1;
        order: 2;
        padding-right: 40px; /* Отступ для кнопки */
    }
    
    .clan-member .member-contribution {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 12px 0 0;
        margin: 12px 0 0;
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        order: 4;
    }
    
    .member-list {
        padding-right: 4px;
    }
}

@media (max-width: 480px) {
    .clan-member {
        min-height: 76px;
    }
    
    .clan-member .member-action-btn {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
    }
    
    .clan-member .member-action-btn .material-symbols-rounded {
        font-size: 18px;
    }
    
    .clan-member .member-contribution {
        padding: 8px 0 0;
    }
}

/* 7. ПРАВИЛЬНОЕ ПОЗИЦИОНИРОВАНИЕ КОНТЕКСТНОГО МЕНЮ */
.member-actions-menu {
    position: fixed !important;
    z-index: 100001 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform-origin: top right;
    animation: menuPopup 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes menuPopup {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 8. ГАРАНТИРУЕМ ЧТО МЕНЮ НЕ ВЫЙДЕТ ЗА ПРЕДЕЛЫ ЭКРАНА */
.member-actions-menu {
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 100px);
    overflow: auto;
}

/* 9. ПРАВИЛЬНЫЕ ОТСТУПЫ ВНУТРИ КОНТЕЙНЕРА */
.member-info {
    padding-right: 16px;
}

.member-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* 10. ИСПРАВЛЕНИЕ ДЛЯ РОЛИ */
.member-role {
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* 11. ПРАВИЛЬНОЕ ОТОБРАЖЕНИЕ ВКЛАДА */
.contribution-value {
    font-size: 20px;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 4px;
}

.contribution-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 12. ИСПРАВЛЕНИЕ ДЛЯ HOVER ЭФФЕКТОВ */
.clan-member:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(4px);
}

.clan-member:hover .member-action-btn {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}

/* 13. ПРАВИЛЬНОЕ РАСПОЛОЖЕНИЕ ДЛЯ РАЗНЫХ РОЛЕЙ */
.clan-member[data-role="leader"] {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(90deg, 
        rgba(245, 158, 11, 0.05), 
        rgba(15, 23, 42, 0.8) 20%);
}

.clan-member[data-role="officer"] {
    border-left: 4px solid #8b5cf6;
    background: linear-gradient(90deg, 
        rgba(139, 92, 246, 0.05), 
        rgba(15, 23, 42, 0.8) 20%);
}

/* 14. ИСПРАВЛЕНИЕ ПРОКРУТКИ */
#myClanInfo {
    overflow: visible;
}

.clan-tab-content.active {
    overflow-y: auto;
    overflow-x: hidden;
}

/* 15. ФИНАЛЬНЫЕ ИСПРАВЛЕНИЯ ДЛЯ ПРЕДОТВРАЩЕНИЯ НАЛОЖЕНИЯ */
.clan-member * {
    position: relative;
    z-index: 1;
}

.clan-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
}

/* 16. ОБНОВЛЕННЫЙ СТИЛЬ ДЛЯ МЕНЮ */
.member-actions-menu {
    min-width: 260px;
    max-width: 320px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* 17. ИНДИКАТОР АКТИВНОСТИ ДЛЯ КНОПКИ */
.member-action-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border-color: transparent;
    transform: rotate(90deg);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

/* 18. АНИМАЦИЯ ПУЛЬСА ДЛЯ ВАЖНЫХ ДЕЙСТВИЙ */
@keyframes pulseImportant {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

.member-action-btn.important {
    animation: pulseImportant 2s infinite;
}

/* ==============================================
   СТИЛИ ДЛЯ ОКНА ПРИГЛАШЕНИЯ ИГРОКОВ В КЛАН
   ============================================== */

/* 1. ОКНО ПОИСКА И ПРИГЛАШЕНИЯ ИГРОКОВ */
#inviteToClanModal .invite-modal {
    width: 90%;
    max-width: 600px;
    padding-top: 60px;
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.2);
}

/* 2. ЗАГОЛОВОК */
#inviteToClanModal .modal-title {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

#inviteToClanModal .modal-title .material-symbols-rounded {
    font-size: 28px;
}

/* 3. ПОДЗАГОЛОВОК */
.invite-modal-subtitle {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 28px;
    padding-left: 40px;
    line-height: 1.5;
}

/* 4. ПОИСКОВАЯ СТРОКА */
.invite-search-container {
    padding: 0 32px 32px;
}

.search-input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 18px 24px;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.95);
}

.search-input::placeholder {
    color: #64748b;
    font-weight: 400;
}

.search-btn {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.search-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.search-btn .material-symbols-rounded {
    font-size: 24px;
}

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

/* 5. РЕЗУЛЬТАТЫ ПОИСКА */
.search-results {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
}

/* Скроллбар для результатов */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
}

/* 6. КАРТОЧКА РЕЗУЛЬТАТА ПОИСКА */
.player-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
    transition: all 0.3s;
}

.player-search-result:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
}

.player-search-result:last-child {
    margin-bottom: 0;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 20px;
    flex-shrink: 0;
}

.player-details {
    flex: 1;
}

.player-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.player-id {
    font-size: 12px;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* 7. КНОПКА ПРИГЛАШЕНИЯ */
.invite-action-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.invite-action-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.invite-action-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.invite-action-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
    box-shadow: none;
}

.invite-action-btn .material-symbols-rounded {
    font-size: 18px;
}

/* 8. УЧАСТНИКИ КЛАНА (ПРЕВЬЮ) */
.current-members-preview {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
}

.current-members-preview h4 {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-members-preview h4 .material-symbols-rounded {
    font-size: 20px;
    color: #3b82f6;
}

.members-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.member-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.member-preview:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.member-preview-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.member-preview-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 9. СОСТОЯНИЯ */
.search-loading {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.search-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.search-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.search-empty-icon {
    font-size: 48px;
    color: #64748b;
    margin-bottom: 16px;
    opacity: 0.5;
}

.search-error {
    text-align: center;
    padding: 40px 20px;
    color: #ef4444;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* 10. УВЕДОМЛЕНИЕ ОБ УСПЕШНОМ ПРИГЛАШЕНИИ */
.invite-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    z-index: 100000;
    animation: slideInRight 0.3s ease, slideOutRight 0.3s ease 2.7s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    max-width: 400px;
}

.invite-success-notification .material-symbols-rounded {
    font-size: 24px;
}

/* 11. ФИЛЬТР ПО РОЛЯМ (если нужно добавить) */
.invite-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: transparent;
}

/* 12. ПАГИНАЦИЯ (если много результатов) */
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn {
    width: 36px;
    height: 36px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 13. АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    #inviteToClanModal .invite-modal {
        max-width: 95%;
        max-height: 90vh;
        padding-top: 50px;
    }
    
    .invite-search-container {
        padding: 0 20px 20px;
    }
    
    .search-input-container {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
        height: 48px;
    }
    
    .player-search-result {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .invite-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .members-preview-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    #inviteToClanModal .invite-modal {
        padding-top: 45px;
        border-radius: 12px;
    }
    
    #inviteToClanModal .modal-title {
        font-size: 20px;
    }
    
    .invite-modal-subtitle {
        font-size: 12px;
        padding-left: 0;
    }
    
    .search-input {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .player-info {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .members-preview-list {
        grid-template-columns: 1fr;
    }
}

/* 14. АНИМАЦИЯ ПОИСКА */
@keyframes searchPulse {
    0%, 100% {
        border-color: rgba(59, 130, 246, 0.3);
    }
    50% {
        border-color: #3b82f6;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    }
}

.search-input.searching {
    animation: searchPulse 2s infinite;
}

/* 15. ИНДИКАТОР РЕЗУЛЬТАТОВ */
.results-count {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.results-count .material-symbols-rounded {
    font-size: 16px;
}
/* ==============================================
   ПРОСТОЙ ИНТЕРФЕЙС "У ВАС НЕТ КЛАНА"
   ============================================== */

/* 1. ОСНОВНОЙ КОНТЕЙНЕР */
.clan-empty-simple {
    text-align: center;
    padding: 40px 24px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

/* 2. ИКОНКА */
.clan-empty-icon-simple {
    margin-bottom: 20px;
}

.clan-empty-icon-simple .material-symbols-rounded {
    font-size: 64px;
    color: #8b5cf6;
    opacity: 0.8;
}

/* 3. ТЕКСТ */
.clan-empty-title-simple {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.clan-empty-text-simple {
    color: #94a3b8;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* 4. КНОПКИ */
.clan-empty-actions-simple {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.clan-empty-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    justify-content: center;
}

.clan-empty-btn.create {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.clan-empty-btn.create:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.clan-empty-btn.find {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.clan-empty-btn.find:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 5. АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    .clan-empty-simple {
        padding: 32px 20px;
        margin: 16px;
    }
    
    .clan-empty-title-simple {
        font-size: 20px;
    }
    
    .clan-empty-text-simple {
        font-size: 14px;
    }
    
    .clan-empty-actions-simple {
        flex-direction: column;
        gap: 12px;
    }
    
    .clan-empty-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .clan-empty-simple {
        padding: 24px 16px;
    }
    
    .clan-empty-icon-simple .material-symbols-rounded {
        font-size: 48px;
    }
    
    .clan-empty-title-simple {
        font-size: 18px;
    }
    
    .clan-empty-text-simple {
        font-size: 13px;
    }
    
    .clan-empty-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}














/* Класс для состояния "крестик" */
.menu-btn.active {
    transform: rotate(180deg);
}

/* Скрытие иконки меню при активном состоянии */
.menu-btn.active .material-symbols-rounded:first-child {
    opacity: 0;
    transform: scale(0);
}

/* Добавление крестика через псевдоэлемент */
.menu-btn.active::after {
    content: "close";
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 28px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: inherit;
}

/* Супер простая анимация - только смена иконки */
.menu-btn .material-symbols-rounded {
    transition: transform 0.2s ease;
}

.menu-btn.active .material-symbols-rounded {
    transform: scale(1.1); /* Легкое увеличение */
}

/* Просто показ/скрытие баннера */
.menu-banner {
    display: none;
}

.menu-banner.open {
    display: flex; /* или block, в зависимости от вашей верстки */
}
