.transfer-modal {
    background: rgba(13, 13, 16, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1100;
}

.transfer-modal .filter-modal-content {
    background: var(--surface-dark);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
}


.transfer-header {
    padding: 20px 20px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(42, 127, 255, 0.1) 100%);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    flex-shrink: 0;
}

.transfer-header h3 {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.transfer-header p {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.transfer-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    min-height: 400px;
    flex-direction: column;
}

.search-container {
    margin-bottom: 20px;
    margin-top: auto;
}

.search-input-container {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-icon {
    color: var(--text-secondary);
    font-size: 1.1em;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1em;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-hint {
    font-size: 0.85em;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 8px;
    padding: 8px;
}

.search-results {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
}

.empty-search, .loading-search {
    height: 150px;
}

.empty-search {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-search-icon {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: 0.5;
}

.user-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-result:hover,
.user-result:active {
    background: var(--surface-light);
    transform: translateY(-1px);
    border-color: var(--primary);
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.user-id {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.select-button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.select-button:hover,
.select-button:active {
    background: var(--primary-dark);
}

.transfer-footer {
    padding: 10px 20px 10px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.transfer-back {
    flex: 1;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.transfer-confirm {
    flex: 2;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.transfer-back:active {
    background: var(--surface-light);
}

.transfer-confirm:active {
    background: #00c29a;
}

.transfer-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading-search {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
}

.search-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--surface);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.transfer-modal.active .filter-modal-content {
    transform: translateY(0);
}

.transfer-modal {
    display: none;
}

.transfer-modal.active {
    display: flex;
}

.selected-user-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--success);
    border-radius: 12px;
    padding: 10px 14px;
    width: 100%;
}

.selected-user-clear {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9em;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.selected-user-clear:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.selected-user-avatar {
    width: 32px;
    height: 32px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    flex-shrink: 0;
}

.selected-user-info {
    flex: 1;
    overflow: hidden;
}

.selected-user-id {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-input-container {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .selected-user-display {
        padding: 8px 12px;
    }
    
    .selected-user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.9em;
    }
    
    .selected-user-id {
        font-size: 0.85em;
    }
}
/* Стиль для мини-спиннера */
.mini-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для модалки подтверждения в центре экрана */
.confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1200;
}

.confirmation-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 16, 0.8);
    backdrop-filter: blur(5px);
}

.confirmation-modal-content {
    position: relative;
    background: var(--surface-dark);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    z-index: 10;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirmation-header {
    text-align: center;
    margin-bottom: 20px;
}

.confirmation-header h3 {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.confirmation-body {
    text-align: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.confirmation-body p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 1.05em;
    margin: 0;
}

.confirmation-footer {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.confirmation-cancel {
    flex: 1;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirmation-confirm {
    flex: 1;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.confirmation-cancel:active {
    background: var(--surface-light);
    transform: translateY(1px);
}

.confirmation-confirm:active {
    background: #00c29a;
    transform: translateY(1px);
}

.confirmation-confirm:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Стиль для мини-спиннера */
.mini-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 480px) {
    .confirmation-modal-content {
        width: 85%;
        padding: 20px;
        margin: 20px;
    }
    
    .confirmation-body p {
        font-size: 1em;
    }
    
    .confirmation-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .confirmation-cancel,
    .confirmation-confirm {
        padding: 12px;
    }
}